mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05: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 \
. \
pkgs \
--exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
30 lines
704 B
Nix
30 lines
704 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
nim-unwrapped-2,
|
|
}:
|
|
|
|
nim-unwrapped-2.overrideAttrs (
|
|
finalAttrs: prevAttrs: {
|
|
version = "1.6.20";
|
|
src = fetchurl {
|
|
url = "https://nim-lang.org/download/nim-${finalAttrs.version}.tar.xz";
|
|
hash = "sha256-/+0EdQTR/K9hDw3Xzz4Ce+kaKSsMnFEWFQTC87mE/7k=";
|
|
};
|
|
|
|
patches =
|
|
builtins.filter (
|
|
p:
|
|
builtins.elem (baseNameOf p) [
|
|
"NIM_CONFIG_DIR.patch"
|
|
"nixbuild.patch"
|
|
]
|
|
) nim-unwrapped-2.patches
|
|
++ [
|
|
./extra-mangling.patch
|
|
# Mangle store paths of modules to prevent runtime dependence.
|
|
]
|
|
++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
|
|
}
|
|
)
|