nixos/zookeeper: Take the same JRE we build zookeeper with

This commit is contained in:
Xiami 2022-04-19 18:49:44 +08:00
parent 4978685d9e
commit 1637e039d2
No known key found for this signature in database
GPG key ID: 53E2BDD8BD17882C
3 changed files with 21 additions and 1 deletions

View file

@ -1307,6 +1307,15 @@
<literal>otelcorecol</literal> and enjoy a 7x smaller binary.
</para>
</listitem>
<listitem>
<para>
<literal>services.zookeeper</literal> has a new option
<literal>jre</literal> for specifying the JRE to start
zookeeper with. It defaults to the JRE built with
<literal>pkgs.zookeeper</literal> instead of
<literal>pkgs.jre</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>pkgs.pgadmin</literal> now refers to

View file

@ -518,6 +518,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 built with `pkgs.zookeeper` instead of
`pkgs.jre`.
- `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`

View file

@ -114,6 +114,13 @@ in {
type = types.package;
};
jre = mkOption {
description = "The JRE with which to run Zookeeper";
default = cfg.package.passthru.jre;
defaultText = literalExpression "pkgs.zookeeper.passthru.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 \