stdenv.mkDerivation: move attrs removed for derivationArg to global scope

This commit is contained in:
Eman Resu
2026-05-09 20:37:22 -04:00
parent 9f278a55db
commit 789a15ef68
+8 -6
View File
@@ -194,6 +194,13 @@ let
"disallowedRequisites"
];
argumentAttrsToRemove = [
"meta"
"passthru"
"pos"
"env"
];
attrsToRemoveLast = [
# Fixed-output derivations may not reference other paths, which means that
# for a fixed-output derivation, the corresponding inputDerivation should
@@ -917,12 +924,7 @@ let
if attrs ? meta.mainProgram then env // { NIX_MAIN_PROGRAM = attrs.meta.mainProgram; } else env;
derivationArg = makeDerivationArgument (
removeAttrs attrs [
"meta"
"passthru"
"pos"
"env"
]
removeAttrs attrs argumentAttrsToRemove
// {
${if __structuredAttrs then "env" else null} = checkedEnv;
cmakeFlags = makeCMakeFlags attrs;