make-derivation.nix: Float out constant removedOrReplacedAttrs

This commit is contained in:
Robert Hensing 2024-03-12 16:47:02 +01:00
parent 00db4509b8
commit 37f76fd4c3

View File

@ -130,6 +130,15 @@ let
"zerocallusedregs"
];
removedOrReplacedAttrs = [
"checkInputs" "installCheckInputs"
"nativeCheckInputs" "nativeInstallCheckInputs"
"__contentAddressed"
"__darwinAllowLocalNetworking"
"__impureHostDeps" "__propagatedImpureHostDeps"
"sandboxProfile" "propagatedSandboxProfile"
];
# Subset of argument, matching mkDerivation below
makeDerivationArgument = attrs@{
separateDebugInfo ? false,
@ -291,14 +300,7 @@ let
dontAddHostSuffix = attrs ? outputHash && !noNonNativeDeps || !stdenv.hasCC;
in
(removeAttrs attrs
[
"checkInputs" "installCheckInputs"
"nativeCheckInputs" "nativeInstallCheckInputs"
"__contentAddressed"
"__darwinAllowLocalNetworking"
"__impureHostDeps" "__propagatedImpureHostDeps"
"sandboxProfile" "propagatedSandboxProfile"])
(removeAttrs attrs removedOrReplacedAttrs)
// (optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
name =
let