mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 17:54:53 +01:00
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 . lib --exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
25 lines
375 B
Nix
25 lines
375 B
Nix
{ config, ... }:
|
|
{
|
|
class = {
|
|
"just" = "data";
|
|
};
|
|
a = "one";
|
|
b = "two";
|
|
meta = "meta";
|
|
|
|
_module.args.result =
|
|
let
|
|
r = removeAttrs config [ "_module" ];
|
|
in
|
|
builtins.trace (builtins.deepSeq r r) (
|
|
r == {
|
|
a = "one";
|
|
b = "two";
|
|
class = {
|
|
"just" = "data";
|
|
};
|
|
meta = "meta";
|
|
}
|
|
);
|
|
}
|