buildenv: replace // optionalAttrs with nullable attr names

Convert 2 optionalAttrs (args ? nativeBuildInputs, args ? buildInputs) in the compatArgs block into nullable attribute names in a single attrset.
This commit is contained in:
Aliaksandr
2026-05-18 03:54:27 +03:00
parent fbfe0b610e
commit 18e7551efc
+4 -7
View File
@@ -86,13 +86,10 @@ lib.makeOverridable (
buildInputs ? null,
}@args:
let
compatArgs =
lib.optionalAttrs (args ? nativeBuildInputs) {
inherit nativeBuildInputs;
}
// lib.optionalAttrs (args ? buildInputs) {
inherit buildInputs;
};
compatArgs = {
${if args ? nativeBuildInputs then "nativeBuildInputs" else null} = nativeBuildInputs;
${if args ? buildInputs then "buildInputs" else null} = buildInputs;
};
in
compatArgs
// derivationArgs