forked from mirrors/nixpkgs
stdenvAdapters: fix preservation of env
This commit is contained in:
parent
49f40c090c
commit
9adf83737f
|
@ -176,7 +176,7 @@ rec {
|
|||
stdenv.override (old: {
|
||||
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
|
||||
dontStrip = true;
|
||||
env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og";
|
||||
env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -ggdb -Og"; };
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -219,7 +219,8 @@ rec {
|
|||
impureUseNativeOptimizations = stdenv:
|
||||
stdenv.override (old: {
|
||||
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
|
||||
env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -march=native";
|
||||
env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -march=native"; };
|
||||
|
||||
NIX_ENFORCE_NO_NATIVE = false;
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
@ -244,7 +245,7 @@ rec {
|
|||
withCFlags = compilerFlags: stdenv:
|
||||
stdenv.override (old: {
|
||||
mkDerivationFromStdenv = extendMkDerivationArgs old (args: {
|
||||
env.NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}";
|
||||
env = (args.env or {}) // { NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " ${toString compilerFlags}"; };
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue