pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd \
--type file \
. \
pkgs \
--exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
This commit is contained in:
@@ -171,12 +171,12 @@ let
|
||||
checkDrv = drv: if (isPythonModule drv) && (isMismatchedPython drv) then throwMismatch drv else drv;
|
||||
|
||||
in
|
||||
inputs: builtins.map (checkDrv) inputs;
|
||||
inputs: map (checkDrv) inputs;
|
||||
|
||||
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
|
||||
self = toPythonModule (
|
||||
stdenv.mkDerivation (
|
||||
(builtins.removeAttrs attrs [
|
||||
(removeAttrs attrs [
|
||||
"disabled"
|
||||
"checkPhase"
|
||||
"checkInputs"
|
||||
|
||||
Reference in New Issue
Block a user