lib: re-export missing pure builtins in lib (#483020)

This commit is contained in:
Philip Taron
2026-01-24 20:15:33 +00:00
committed by GitHub
5 changed files with 43 additions and 1 deletions
+19 -1
View File
@@ -105,6 +105,9 @@ let
# network
network = callLibs ./network;
# flakes
flakes = callLibs ./flakes.nix;
inherit (builtins)
getContext
hasContext
@@ -390,6 +393,8 @@ let
toInt
toIntBase10
fileContents
appendContext
unsafeDiscardStringContext
;
inherit (self.stringsWithDeps)
textClosureList
@@ -414,7 +419,13 @@ let
renameCrossIndexTo
mapCrossIndex
;
inherit (self.derivations) lazyDerivation optionalDrvAttr warnOnInstantiate;
inherit (self.derivations)
lazyDerivation
optionalDrvAttr
warnOnInstantiate
addDrvOutputDependencies
unsafeDiscardOutputDependency
;
inherit (self.generators) mkLuaInline;
inherit (self.meta)
addMetaAttrs
@@ -442,6 +453,9 @@ let
dirOf
isPath
packagesFromDirectoryRecursive
hashFile
readDir
readFileType
;
inherit (self.sources)
cleanSourceFilter
@@ -592,6 +606,10 @@ let
inherit (self.network.ipv6)
mkEUI64Suffix
;
inherit (self.flakes)
parseFlakeRef
flakeRefToString
;
}
);
in
+5
View File
@@ -21,6 +21,11 @@ let
if pkg ? meta.position && isString pkg.meta.position then "${prefix}${pkg.meta.position}" else "";
in
{
inherit (builtins)
addDrvOutputDependencies
unsafeDiscardOutputDependency
;
/**
Restrict a derivation to a predictable set of attribute names, so
that the returned attrset is not strict in the actual derivation,
+6
View File
@@ -31,6 +31,12 @@ in
isPath
;
inherit (builtins)
readDir
readFileType
hashFile
;
/**
The type of a path. The path needs to exist and be accessible.
The result is either `"directory"` for a directory, `"regular"` for a
+12
View File
@@ -0,0 +1,12 @@
/**
Flake operations.
*/
{ lib }:
{
inherit (builtins)
parseFlakeRef
flakeRefToString
;
}
+1
View File
@@ -39,6 +39,7 @@ rec {
toJSON
typeOf
unsafeDiscardStringContext
appendContext
;
/**