mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/redmine: Add PDF export support for gant
Ghostscript is needed to export Gant diagrams as PDF. Thus, add the option `services.redmine.components.ghostscript` allowing to enable or disable the component. The component is disabled by default. Enabling the option will add Ghostscript to the Redmine environment and configure the setting `gs_command` in the Redmine configuration file. Signed-off-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
92b1cf8b4c
commit
4d23eae938
1 changed files with 9 additions and 1 deletions
|
@ -243,6 +243,12 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
description = "Allows exporting Gant diagrams as PNG.";
|
description = "Allows exporting Gant diagrams as PNG.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ghostscript = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Allows exporting Gant diagrams as PDF.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -272,6 +278,7 @@ in
|
||||||
scm_git_command = if cfg.components.git then "${pkgs.git}/bin/git" else "";
|
scm_git_command = if cfg.components.git then "${pkgs.git}/bin/git" else "";
|
||||||
scm_cvs_command = if cfg.components.cvs then "${pkgs.cvs}/bin/cvs" else "";
|
scm_cvs_command = if cfg.components.cvs then "${pkgs.cvs}/bin/cvs" else "";
|
||||||
scm_bazaar_command = if cfg.components.breezy then "${pkgs.breezy}/bin/bzr" else "";
|
scm_bazaar_command = if cfg.components.breezy then "${pkgs.breezy}/bin/bzr" else "";
|
||||||
|
gs_command = if cfg.components.ghostscript then "${pkgs.ghostscript}/bin/gs" else "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -339,7 +346,8 @@ in
|
||||||
++ optional cfg.components.git git
|
++ optional cfg.components.git git
|
||||||
++ optional cfg.components.cvs cvs
|
++ optional cfg.components.cvs cvs
|
||||||
++ optional cfg.components.breezy breezy
|
++ optional cfg.components.breezy breezy
|
||||||
++ optional cfg.components.imagemagick imagemagick;
|
++ optional cfg.components.imagemagick imagemagick
|
||||||
|
++ optional cfg.components.ghostscript ghostscript;
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
rm -rf "${cfg.stateDir}/plugins/"*
|
rm -rf "${cfg.stateDir}/plugins/"*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue