summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohannes Kirschbauer <hsjobeki+github@gmail.com>2026-01-23 09:34:19 +0000
committerGitHub <noreply@github.com>2026-01-23 09:34:19 +0000
commitc6578a37be34cdc9c3ee704c24678440bfc2a088 (patch)
tree4b2e55d223128cf73e0b95342e1ce144eff8e6d1 /lib
parentnixos-facter: 0.4.2 -> 0.4.3 (#475249) (diff)
parentlib: re-export missing builtins in lib (diff)
downloadnixpkgs-c6578a37be34cdc9c3ee704c24678440bfc2a088.tar.gz
lib: re-export missing builtins in lib (#482743)
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix26
-rw-r--r--lib/filesystem.nix5
-rw-r--r--lib/sources.nix2
-rw-r--r--lib/trivial.nix4
-rw-r--r--lib/versions.nix2
5 files changed, 38 insertions, 1 deletions
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.