Skip to content

Commit

Permalink
Use outputName to pick default for outputs setting
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Oct 17, 2024
1 parent e7ea760 commit b6ccbf7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nix/choose-meta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
contents:

let
hasNontrivialOutputs = (contents.outputs or ["out"]) != ["out"];
hasNontrivialOutputs = (contents.outputs or null) != null;

in

Expand Down Expand Up @@ -48,9 +48,9 @@ in
type = "list";
listType = {
type = "enum";
values = (contents.outputs or ["out"]);
values = (contents.outputs or []);
};
defaultValue = ["out"];
defaultValue = if lib.hasAttr "outputName" contents then [contents.outputName] else [];
};
};
}) // (lib.optionalAttrs (contents ? "modes") {
Expand Down

0 comments on commit b6ccbf7

Please sign in to comment.