mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
treewide: 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 --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:
parent
d17f0c1bf8
commit
dec908b169
9 changed files with 22 additions and 22 deletions
|
|
@ -19,7 +19,7 @@ let
|
|||
inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt;
|
||||
|
||||
# For `nix-shell -A hello`
|
||||
curPkgs = builtins.removeAttrs (import ./. { inherit system; }) [
|
||||
curPkgs = removeAttrs (import ./. { inherit system; }) [
|
||||
# Although this is what anyone may expect from a `_type = "pkgs"`,
|
||||
# this file is intended to produce a shell in the first place,
|
||||
# and a `_type` tag could confuse some code.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue