Skip to content

Commit

Permalink
nixos/jenkins: add an option for the package
Browse files Browse the repository at this point in the history
This allows NixOS configuration to specify the desired Jenkins package.
  • Loading branch information
earldouglas authored and rycee committed Oct 19, 2017
1 parent 7771edb commit aae32e1
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -78,6 +78,13 @@ in {
'';
};

package = mkOption {
default = pkgs.jenkins;
defaultText = "pkgs.jenkins";
type = types.package;
description = "Jenkins package to use.";
};

packages = mkOption {
default = [ pkgs.stdenv pkgs.git pkgs.jdk config.programs.ssh.package pkgs.nix ];
defaultText = "[ pkgs.stdenv pkgs.git pkgs.jdk config.programs.ssh.package pkgs.nix ]";
Expand Down Expand Up @@ -194,7 +201,7 @@ in {
'';

script = ''
${pkgs.jdk}/bin/java ${concatStringsSep " " cfg.extraJavaOptions} -jar ${pkgs.jenkins}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
${pkgs.jdk}/bin/java ${concatStringsSep " " cfg.extraJavaOptions} -jar ${cfg.package}/webapps/jenkins.war --httpListenAddress=${cfg.listenAddress} \
--httpPort=${toString cfg.port} \
--prefix=${cfg.prefix} \
${concatStringsSep " " cfg.extraOptions}
Expand Down

0 comments on commit aae32e1

Please sign in to comment.