mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-07 23:04:00 +01:00
lib: don't inherit unused functions
This commit is contained in:
parent
e394a579b0
commit
6acae46c84
7 changed files with 2 additions and 25 deletions
|
|
@ -4,9 +4,8 @@
|
|||
{ lib }:
|
||||
|
||||
let
|
||||
inherit (builtins) head length typeOf;
|
||||
inherit (lib.asserts) assertMsg;
|
||||
inherit (lib.trivial) oldestSupportedReleaseIsAtLeast mergeAttrs;
|
||||
inherit (builtins) head length;
|
||||
inherit (lib.trivial) mergeAttrs;
|
||||
inherit (lib.strings)
|
||||
concatStringsSep
|
||||
concatMapStringsSep
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ let
|
|||
take
|
||||
length
|
||||
filterAttrs
|
||||
optionalString
|
||||
flip
|
||||
head
|
||||
pipe
|
||||
|
|
|
|||
|
|
@ -6,26 +6,20 @@ let
|
|||
any
|
||||
attrByPath
|
||||
attrNames
|
||||
compare
|
||||
concat
|
||||
concatMap
|
||||
elem
|
||||
filter
|
||||
foldl
|
||||
foldr
|
||||
genericClosure
|
||||
head
|
||||
imap1
|
||||
init
|
||||
isAttrs
|
||||
isFunction
|
||||
isInt
|
||||
isList
|
||||
lists
|
||||
listToAttrs
|
||||
mapAttrs
|
||||
mergeAttrs
|
||||
meta
|
||||
nameValuePair
|
||||
tail
|
||||
toList
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ let
|
|||
isAttrs
|
||||
isPath
|
||||
isString
|
||||
nixVersion
|
||||
pathExists
|
||||
readDir
|
||||
split
|
||||
|
|
@ -21,7 +20,6 @@ let
|
|||
attrValues
|
||||
mapAttrs
|
||||
mapAttrsToList
|
||||
optionalAttrs
|
||||
zipAttrsWith
|
||||
;
|
||||
|
||||
|
|
@ -48,7 +46,6 @@ let
|
|||
append
|
||||
splitRoot
|
||||
hasStorePathPrefix
|
||||
splitStorePath
|
||||
;
|
||||
|
||||
inherit (lib.path.subpath)
|
||||
|
|
@ -62,11 +59,6 @@ let
|
|||
substring
|
||||
stringLength
|
||||
hasSuffix
|
||||
versionAtLeast
|
||||
;
|
||||
|
||||
inherit (lib.trivial)
|
||||
inPureEvalMode
|
||||
;
|
||||
in
|
||||
# Rare case of justified usage of rec:
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@
|
|||
# Tested in lib/tests/filesystem.sh
|
||||
let
|
||||
inherit (builtins)
|
||||
readDir
|
||||
pathExists
|
||||
toString
|
||||
;
|
||||
|
||||
inherit (lib.filesystem)
|
||||
pathIsDirectory
|
||||
pathIsRegularFile
|
||||
pathType
|
||||
packagesFromDirectoryRecursive
|
||||
;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ let
|
|||
concatMap
|
||||
concatStringsSep
|
||||
elem
|
||||
elemAt
|
||||
filter
|
||||
foldl'
|
||||
functionArgs
|
||||
|
|
|
|||
|
|
@ -47,13 +47,9 @@ let
|
|||
|
||||
inherit (lib.types)
|
||||
enum
|
||||
float
|
||||
isType
|
||||
mkOptionType
|
||||
number
|
||||
setType
|
||||
string
|
||||
types
|
||||
;
|
||||
|
||||
setTypes =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue