mirror of
https://github.com/NixOS/nix
synced 2025-06-24 09:41:15 +02:00
Remove propagated-build-inputs when static
This commit is contained in:
parent
a2f65dd43b
commit
d07852b5f3
1 changed files with 14 additions and 0 deletions
|
@ -166,6 +166,17 @@ let
|
|||
outputs = prevAttrs.outputs or [ "out" ] ++ [ "dev" ];
|
||||
};
|
||||
|
||||
fixupStaticLayer = finalAttrs: prevAttrs: {
|
||||
postFixup =
|
||||
prevAttrs.postFixup or ""
|
||||
+ lib.optionalString (stdenv.hostPlatform.isStatic) ''
|
||||
# HACK: Otherwise the result will have the entire buildInputs closure
|
||||
# injected by the pkgsStatic stdenv
|
||||
# <https://github.com/NixOS/nixpkgs/issues/83667>
|
||||
rm -f $out/nix-support/propagated-build-inputs
|
||||
'';
|
||||
};
|
||||
|
||||
# Work around weird `--as-needed` linker behavior with BSD, see
|
||||
# https://github.com/mesonbuild/meson/issues/3593
|
||||
bsdNoLinkAsNeeded =
|
||||
|
@ -301,6 +312,7 @@ in
|
|||
scope.sourceLayer
|
||||
setVersionLayer
|
||||
mesonLayer
|
||||
fixupStaticLayer
|
||||
scope.mesonComponentOverrides
|
||||
];
|
||||
mkMesonExecutable = mkPackageBuilder [
|
||||
|
@ -310,6 +322,7 @@ in
|
|||
setVersionLayer
|
||||
mesonLayer
|
||||
mesonBuildLayer
|
||||
fixupStaticLayer
|
||||
scope.mesonComponentOverrides
|
||||
];
|
||||
mkMesonLibrary = mkPackageBuilder [
|
||||
|
@ -320,6 +333,7 @@ in
|
|||
setVersionLayer
|
||||
mesonBuildLayer
|
||||
mesonLibraryLayer
|
||||
fixupStaticLayer
|
||||
scope.mesonComponentOverrides
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue