3
0
Fork 0
forked from mirrors/nixpkgs

nixos/apache-kafka: Use version-matched jre

This commit is contained in:
Sarah Brofeldt 2020-09-22 08:30:29 +02:00
parent 08ef827056
commit fd02940262
2 changed files with 23 additions and 1 deletions

View file

@ -562,6 +562,21 @@ self: super:
<xref linkend="opt-services.xserver.videoDrivers" /> no longer uses the deprecated <literal>cirrus</literal> and <literal>vesa</literal> device dependent X drivers by default. It also enables both <literal>amdgpu</literal> and <literal>nouveau</literal> drivers by default now. <xref linkend="opt-services.xserver.videoDrivers" /> no longer uses the deprecated <literal>cirrus</literal> and <literal>vesa</literal> device dependent X drivers by default. It also enables both <literal>amdgpu</literal> and <literal>nouveau</literal> drivers by default now.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The <package>apacheKafka</package> packages are now built with
version-matched JREs. Versions 2.6 and above, the ones that recommend it,
use jdk11, while versions below remain on jdk8. The NixOS service has
been adjusted to start the service using the same version as the package,
adjustable with the new
<link linkend="opt-services.apache-kafka.jre">services.apache-kafka.jre</link>
option. Furthermore, the default list of
<link linkend="opt-services.apache-kafka.jvmOptions">services.apache-kafka.jvmOptions</link>
have been removed. You should set your own according to the
<link xlink:href="https://kafka.apache.org/documentation/#java">upstream documentation</link>
for your Kafka version.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View file

@ -106,6 +106,13 @@ in {
type = types.package; type = types.package;
}; };
jre = mkOption {
description = "The JRE with which to run Kafka";
default = cfg.package.passthru.jre;
defaultText = "pkgs.apacheKafka.passthru.jre";
type = types.package;
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -126,7 +133,7 @@ in {
after = [ "network.target" ]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${pkgs.jre}/bin/java \ ${cfg.jre}/bin/java \
-cp "${cfg.package}/libs/*" \ -cp "${cfg.package}/libs/*" \
-Dlog4j.configuration=file:${logConfig} \ -Dlog4j.configuration=file:${logConfig} \
${toString cfg.jvmOptions} \ ${toString cfg.jvmOptions} \