nixos/stirling-pdf: make calibre dependency optional based on config (#337060)

This commit is contained in:
Sandro 2024-08-28 09:53:33 +02:00 committed by GitHub
commit 7f9873b3b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,9 @@ in
environment = lib.mapAttrs (_: toString) cfg.environment; environment = lib.mapAttrs (_: toString) cfg.environment;
# following https://github.com/Stirling-Tools/Stirling-PDF#locally # following https://github.com/Stirling-Tools/Stirling-PDF#locally
path = with pkgs; [ path =
with pkgs;
[
unpaper unpaper
libreoffice libreoffice
ocrmypdf ocrmypdf
@ -57,8 +59,8 @@ in
pngquant pngquant
tesseract tesseract
python3Packages.weasyprint python3Packages.weasyprint
calibre ]
]; ++ lib.optional (cfg.environment.INSTALL_BOOK_AND_ADVANCED_HTML_OPS or "false" == "true") calibre;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];