lib: move remaining builtins to appropriate place
This commit is contained in:
+5
-1
@@ -26,11 +26,15 @@ let
|
||||
generators
|
||||
id
|
||||
mapAttrs
|
||||
trace
|
||||
;
|
||||
in
|
||||
|
||||
rec {
|
||||
inherit (builtins)
|
||||
trace
|
||||
addErrorContext
|
||||
unsafeGetAttrPos
|
||||
;
|
||||
|
||||
# -- TRACING --
|
||||
|
||||
|
||||
+5
-9
@@ -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
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user