diff --git a/lib/default.nix b/lib/default.nix index af9716cb165f..1bfd5b9ac8b1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -105,6 +105,22 @@ let # network network = callLibs ./network; + inherit (builtins) + getContext + hasContext + convertHash + hashString + hasFile + parseDrvName + placeholder + fromJSON + fromTOML + toFile + toJSON + toString + toXML + tryEval + ; inherit (self.trivial) id const @@ -112,6 +128,8 @@ let concat "or" and + mul + div xor bitAnd bitOr @@ -163,6 +181,8 @@ let pathExists genericClosure readFile + ceil + floor ; inherit (self.fixedPoints) fix @@ -327,7 +347,6 @@ let escape escapeShellArg escapeShellArgs - isPath isStorePath isStringLike isValidPosixName @@ -420,6 +439,9 @@ let pathType pathIsDirectory pathIsRegularFile + baseNameOf + dirOf + isPath packagesFromDirectoryRecursive ; inherit (self.sources) @@ -434,6 +456,7 @@ let pathIsGitRepo revOrTag repoRevToName + filterSource ; inherit (self.modules) evalModules @@ -564,6 +587,7 @@ let imap ; inherit (self.versions) + compareVersions splitVersion ; inherit (self.network.ipv6) diff --git a/lib/filesystem.nix b/lib/filesystem.nix index acc47cd5efdb..7063abfe2079 100644 --- a/lib/filesystem.nix +++ b/lib/filesystem.nix @@ -25,6 +25,11 @@ let in { + inherit (builtins) + baseNameOf + dirOf + isPath + ; /** The type of a path. The path needs to exist and be accessible. diff --git a/lib/sources.nix b/lib/sources.nix index 2936962c2de1..c99f2c265086 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -529,4 +529,6 @@ in trace ; + + inherit (builtins) filterSource; } diff --git a/lib/trivial.nix b/lib/trivial.nix index 45a8ec9169f5..f351fb572fbc 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -27,6 +27,8 @@ in isFloat add sub + mul + div lessThan seq deepSeq @@ -34,6 +36,8 @@ in bitAnd bitOr bitXor + ceil + floor ; ## Simple (higher order) functions diff --git a/lib/versions.nix b/lib/versions.nix index 2355655f179a..0073c5669743 100644 --- a/lib/versions.nix +++ b/lib/versions.nix @@ -3,6 +3,8 @@ rec { + inherit (builtins) compareVersions; + /** Break a version string into its component parts.