Added usage of lib.optionals and created an assersion to check the number of enabled builders

This commit is contained in:
isaacST08 2025-02-11 19:37:14 -07:00
commit d638292e77
3 changed files with 29 additions and 71 deletions

View file

@ -10,6 +10,7 @@
# The builder template
template = import ./builderTemplate.nix;
inherit (lib) optionals;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) bool package str;
in (
@ -42,11 +43,7 @@ in (
args = builderCfg: (
# Flags
(
if builderCfg.pdfOutput
then ["-pdf"]
else []
)
(optionals builderCfg.pdfOutput ["-pdf"])
# Base args
++ [
"-quiet"