diff options
author | James Earl Douglas <james@earldouglas.com> | 2017-10-19 12:17:47 -0600 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2017-10-20 01:16:12 +0200 |
commit | aae32e15af60cbe96dcb8e70430be9f3eb82960c (patch) | |
tree | 23d4ec592bd63a332284573af3398c424983aadf | |
parent | 7771edb7c8e17d90879d7217351da2c552d9131b (diff) | |
download | nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar.gz nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar.bz2 nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar.lz nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar.xz nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.tar.zst nixlib-aae32e15af60cbe96dcb8e70430be9f3eb82960c.zip |
nixos/jenkins: add an option for the package
This allows NixOS configuration to specify the desired Jenkins package.
-rw-r--r-- | nixos/modules/services/continuous-integration/jenkins/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index c14aa4167231..0dd59e4fb444 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -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 ]"; @@ -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} |