lib: move remaining builtins to appropriate place

This commit is contained in:
Aliaksandr
2025-11-04 01:42:19 +02:00
parent 22ad7f2b9c
commit 02fb25e850
3 changed files with 27 additions and 28 deletions
+5 -1
View File
@@ -26,11 +26,15 @@ let
generators
id
mapAttrs
trace
;
in
rec {
inherit (builtins)
trace
addErrorContext
unsafeGetAttrPos
;
# -- TRACING --
+5 -9
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
@@ -334,6 +325,7 @@ let
escape
escapeShellArg
escapeShellArgs
isPath
isStorePath
isStringLike
isValidPosixName
@@ -350,6 +342,7 @@ let
toUpper
toCamelCase
toSentenceCase
typeOf
addContextFrom
splitString
splitStringBy
@@ -517,6 +510,7 @@ let
assertOneOf
;
inherit (self.debug)
trace
traceIf
traceVal
traceValFn
@@ -527,6 +521,8 @@ let
traceValSeqN
traceValSeqNFn
traceFnSeqN
addErrorContext
unsafeGetAttrPos
runTests
testAllTrue
;
+17 -18
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
@@ -384,24 +401,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
/**