diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index eb7ad6025da4..34bfbad7f635 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -1358,6 +1358,16 @@ Existing 3rd party modules that provided similar functionality, like pu otelcorecol and enjoy a 7x smaller binary. + + + services.zookeeper has a new option + jre for specifying the JRE to start + zookeeper with. It defaults to the JRE that + pkgs.zookeeper was wrapped with, instead of + pkgs.jre. This changes the JRE to + pkgs.jdk11_headless by default. + + pkgs.pgadmin now refers to diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index dffa9b4aec88..a83a7ba2b561 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -541,6 +541,10 @@ In addition to numerous new and upgraded packages, this release has the followin you should change the package you refer to. If you don't need them update your commands from `otelcontribcol` to `otelcorecol` and enjoy a 7x smaller binary. +- `services.zookeeper` has a new option `jre` for specifying the JRE to start + zookeeper with. It defaults to the JRE that `pkgs.zookeeper` was wrapped with, + instead of `pkgs.jre`. This changes the JRE to `pkgs.jdk11_headless` by default. + - `pkgs.pgadmin` now refers to `pkgs.pgadmin4`. `pgadmin3` has been removed. - `pkgs.noto-fonts-cjk` is now deprecated in favor of `pkgs.noto-fonts-cjk-sans` diff --git a/nixos/modules/services/misc/zookeeper.nix b/nixos/modules/services/misc/zookeeper.nix index 3809a93a61e1..fefbf9a86de4 100644 --- a/nixos/modules/services/misc/zookeeper.nix +++ b/nixos/modules/services/misc/zookeeper.nix @@ -114,6 +114,13 @@ in { type = types.package; }; + jre = mkOption { + description = "The JRE with which to run Zookeeper"; + default = cfg.package.jre; + defaultText = literalExpression "pkgs.zookeeper.jre"; + example = literalExpression "pkgs.jre"; + type = types.package; + }; }; @@ -131,7 +138,7 @@ in { after = [ "network.target" ]; serviceConfig = { ExecStart = '' - ${pkgs.jre}/bin/java \ + ${cfg.jre}/bin/java \ -cp "${cfg.package}/lib/*:${configDir}" \ ${escapeShellArgs cfg.extraCmdLineOptions} \ -Dzookeeper.datadir.autocreate=false \ diff --git a/pkgs/servers/zookeeper/default.nix b/pkgs/servers/zookeeper/default.nix index f00c749557f1..41603da33be3 100644 --- a/pkgs/servers/zookeeper/default.nix +++ b/pkgs/servers/zookeeper/default.nix @@ -37,8 +37,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; - passthru.tests = { - nixos = nixosTests.zookeeper; + passthru = { + tests = { + nixos = nixosTests.zookeeper; + }; + inherit jre; }; meta = with lib; {