lib: don't inherit unused functions

This commit is contained in:
İlkecan Bozdoğan 2026-03-03 18:34:09 +03:00
parent e394a579b0
commit 6acae46c84
7 changed files with 2 additions and 25 deletions

View file

@ -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

View file

@ -20,7 +20,6 @@ let
take
length
filterAttrs
optionalString
flip
head
pipe

View file

@ -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

View file

@ -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:

View file

@ -7,14 +7,12 @@
# Tested in lib/tests/filesystem.sh
let
inherit (builtins)
readDir
pathExists
toString
;
inherit (lib.filesystem)
pathIsDirectory
pathIsRegularFile
pathType
packagesFromDirectoryRecursive
;

View file

@ -12,7 +12,6 @@ let
concatMap
concatStringsSep
elem
elemAt
filter
foldl'
functionArgs

View file

@ -47,13 +47,9 @@ let
inherit (lib.types)
enum
float
isType
mkOptionType
number
setType
string
types
;
setTypes =