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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user