diff --git a/lib/debug.nix b/lib/debug.nix index c2226f16c6a3..7a30d8120554 100644 --- a/lib/debug.nix +++ b/lib/debug.nix @@ -26,11 +26,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 e10332ca58dd..750d36a61527 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 @@ -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 ; diff --git a/lib/trivial.nix b/lib/trivial.nix index e940a67d778d..88fece307dca 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 @@ -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 /**