pkgsStatic: fix in combination with __structuredAttrs (#428430)
This commit is contained in:
@@ -135,22 +135,24 @@ rec {
|
||||
else
|
||||
(mkDerivationSuper args).overrideAttrs (
|
||||
args:
|
||||
if args ? env.NIX_CFLAGS_LINK then
|
||||
{
|
||||
env = args.env // {
|
||||
NIX_CFLAGS_LINK = toString args.env.NIX_CFLAGS_LINK + " -static";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -static";
|
||||
}
|
||||
// lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
|
||||
configureFlags = (args.configureFlags or [ ]) ++ [
|
||||
"--disable-shared" # brrr...
|
||||
];
|
||||
cmakeFlags = (args.cmakeFlags or [ ]) ++ [ "-DCMAKE_SKIP_INSTALL_RPATH=On" ];
|
||||
}
|
||||
(
|
||||
if (args.__structuredAttrs or false) || (args ? env.NIX_CFLAGS_LINK) then
|
||||
{
|
||||
env = (args.env or { }) // {
|
||||
NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or "") + " -static";
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -static";
|
||||
}
|
||||
)
|
||||
// lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {
|
||||
configureFlags = (args.configureFlags or [ ]) ++ [
|
||||
"--disable-shared" # brrr...
|
||||
];
|
||||
cmakeFlags = (args.cmakeFlags or [ ]) ++ [ "-DCMAKE_SKIP_INSTALL_RPATH=On" ];
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user