mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
makeStaticDarwin: handle when env.NIX_CFLAGS_LINK
is set
This commit is contained in:
parent
66fcbb94e7
commit
1c26a2fabc
@ -138,10 +138,15 @@ rec {
|
||||
# but more portable than Nix store binaries.
|
||||
makeStaticDarwin = stdenv: stdenv.override (old: {
|
||||
mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args:
|
||||
(mkDerivationSuper args).overrideAttrs (prevAttrs: {
|
||||
(mkDerivationSuper args).overrideAttrs (prevAttrs:
|
||||
if prevAttrs ? env.NIX_CFLAGS_LINK then {
|
||||
env = prevAttrs.env // {
|
||||
NIX_CFLAGS_LINK = toString args.env.NIX_CFLAGS_LINK
|
||||
+ lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
|
||||
};
|
||||
} else {
|
||||
NIX_CFLAGS_LINK = toString (prevAttrs.NIX_CFLAGS_LINK or "")
|
||||
+ lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
|
||||
nativeBuildInputs = (prevAttrs.nativeBuildInputs or []);
|
||||
}));
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user