mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib: move remaining builtins to appropriate places (#458280)
This commit is contained in:
@@ -28,11 +28,15 @@ let
|
||||
generators
|
||||
id
|
||||
mapAttrs
|
||||
trace
|
||||
;
|
||||
in
|
||||
|
||||
rec {
|
||||
inherit (builtins)
|
||||
trace
|
||||
addErrorContext
|
||||
unsafeGetAttrPos
|
||||
;
|
||||
|
||||
# -- TRACING --
|
||||
|
||||
|
||||
@@ -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
|
||||
;
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user