diff --git a/lib/debug.nix b/lib/debug.nix index 8dac6bb727a0..775db5a32997 100644 --- a/lib/debug.nix +++ b/lib/debug.nix @@ -28,11 +28,15 @@ let generators id mapAttrs - trace ; in rec { + inherit (builtins) + trace + addErrorContext + unsafeGetAttrPos + ; # -- TRACING -- diff --git a/lib/default.nix b/lib/default.nix index 044277fa24f5..7dfa9354fa7f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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 ; diff --git a/lib/trivial.nix b/lib/trivial.nix index 317b993f12d2..5e527a1614e2 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -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 /**