mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Added usage of lib.optionals and created an assersion to check the number of enabled builders
This commit is contained in:
parent
d6000a4f78
commit
d638292e77
3 changed files with 29 additions and 71 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue