lib: move remaining builtins to appropriate places (#458280)

This commit is contained in:
Johannes Kirschbauer
2025-12-29 20:59:21 +00:00
committed by GitHub
3 changed files with 27 additions and 28 deletions

View File

@@ -28,11 +28,15 @@ let
generators
id
mapAttrs
trace
;
in
rec {
inherit (builtins)
trace
addErrorContext
unsafeGetAttrPos
;
# -- TRACING --

View File

@@ -105,15 +105,6 @@ let
# network
network = callLibs ./network;
# TODO: For consistency, all builtins should also be available from a sub-library;
# these are the only ones that are currently not
inherit (builtins)
addErrorContext
isPath
trace
typeOf
unsafeGetAttrPos
;
inherit (self.trivial)
id
const
@@ -335,6 +326,7 @@ let
escape
escapeShellArg
escapeShellArgs
isPath
isStorePath
isStringLike
isValidPosixName
@@ -351,6 +343,7 @@ let
toUpper
toCamelCase
toSentenceCase
typeOf
addContextFrom
splitString
splitStringBy
@@ -518,6 +511,7 @@ let
assertOneOf
;
inherit (self.debug)
trace
traceIf
traceVal
traceValFn
@@ -528,6 +522,8 @@ let
traceValSeqN
traceValSeqNFn
traceFnSeqN
addErrorContext
unsafeGetAttrPos
runTests
testAllTrue
;

View File

@@ -18,6 +18,23 @@ let
;
in
{
# Pull in some builtins not included elsewhere.
inherit (builtins)
pathExists
readFile
isBool
isInt
isFloat
add
sub
lessThan
seq
deepSeq
genericClosure
bitAnd
bitOr
bitXor
;
## Simple (higher order) functions
@@ -388,24 +405,6 @@ in
*/
mapNullable = f: a: if a == null then a else f a;
# Pull in some builtins not included elsewhere.
inherit (builtins)
pathExists
readFile
isBool
isInt
isFloat
add
sub
lessThan
seq
deepSeq
genericClosure
bitAnd
bitOr
bitXor
;
## nixpkgs version strings
/**