0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #169310 from Xiami2012/zookeeper-jre

nixos/zookeeper: Take the same JRE we build zookeeper with by default
This commit is contained in:
Robert Hensing 2022-05-02 10:51:42 +02:00 committed by GitHub
commit e4054fe0a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 3 deletions

View file

@ -1358,6 +1358,16 @@ Existing 3rd party modules that provided similar functionality, like <literal>pu
<literal>otelcorecol</literal> and enjoy a 7x smaller binary. <literal>otelcorecol</literal> and enjoy a 7x smaller binary.
</para> </para>
</listitem> </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 that
<literal>pkgs.zookeeper</literal> was wrapped with, instead of
<literal>pkgs.jre</literal>. This changes the JRE to
<literal>pkgs.jdk11_headless</literal> by default.
</para>
</listitem>
<listitem> <listitem>
<para> <para>
<literal>pkgs.pgadmin</literal> now refers to <literal>pkgs.pgadmin</literal> now refers to

View file

@ -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 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. 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.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` - `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; 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" ]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${pkgs.jre}/bin/java \ ${cfg.jre}/bin/java \
-cp "${cfg.package}/lib/*:${configDir}" \ -cp "${cfg.package}/lib/*:${configDir}" \
${escapeShellArgs cfg.extraCmdLineOptions} \ ${escapeShellArgs cfg.extraCmdLineOptions} \
-Dzookeeper.datadir.autocreate=false \ -Dzookeeper.datadir.autocreate=false \

View file

@ -37,8 +37,11 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
passthru.tests = { passthru = {
nixos = nixosTests.zookeeper; tests = {
nixos = nixosTests.zookeeper;
};
inherit jre;
}; };
meta = with lib; { meta = with lib; {