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