diff options
Diffstat (limited to 'pkgs/development/compilers/zig/generic.nix')
-rw-r--r-- | pkgs/development/compilers/zig/generic.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/zig/generic.nix b/pkgs/development/compilers/zig/generic.nix index 220f3240f2852..f3c725e1e5ce0 100644 --- a/pkgs/development/compilers/zig/generic.nix +++ b/pkgs/development/compilers/zig/generic.nix @@ -40,7 +40,10 @@ stdenv.mkDerivation (finalAttrs: { # Zig's build looks at /usr/bin/env to find dynamic linking info. This doesn't # work in Nix's sandbox. Use env from our coreutils instead. - postPatch = '' + postPatch = if lib.versionAtLeast args.version "0.12" then '' + substituteInPlace lib/std/zig/system.zig \ + --replace "/usr/bin/env" "${coreutils}/bin/env" + '' else '' substituteInPlace lib/std/zig/system/NativeTargetInfo.zig \ --replace "/usr/bin/env" "${coreutils}/bin/env" ''; |