mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
makeStaticDarwin: handle when env.NIX_CFLAGS_LINK
is set
This commit is contained in:
parent
66fcbb94e7
commit
1c26a2fabc
@ -138,11 +138,16 @@ rec {
|
|||||||
# but more portable than Nix store binaries.
|
# but more portable than Nix store binaries.
|
||||||
makeStaticDarwin = stdenv: stdenv.override (old: {
|
makeStaticDarwin = stdenv: stdenv.override (old: {
|
||||||
mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args:
|
mkDerivationFromStdenv = withOldMkDerivation old (stdenv: mkDerivationSuper: args:
|
||||||
(mkDerivationSuper args).overrideAttrs (prevAttrs: {
|
(mkDerivationSuper args).overrideAttrs (prevAttrs:
|
||||||
NIX_CFLAGS_LINK = toString (prevAttrs.NIX_CFLAGS_LINK or "")
|
if prevAttrs ? env.NIX_CFLAGS_LINK then {
|
||||||
+ lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
|
env = prevAttrs.env // {
|
||||||
nativeBuildInputs = (prevAttrs.nativeBuildInputs or []);
|
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";
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
# Puts all the other ones together
|
# Puts all the other ones together
|
||||||
|
Loading…
Reference in New Issue
Block a user