apacheKafka: Version-configurable JREs for package

This commit is contained in:
Sarah Brofeldt 2020-09-22 08:28:28 +02:00
parent 189ff35d71
commit 640961beb8

View file

@ -1,21 +1,23 @@
{ lib, stdenv, fetchurl, jre8, makeWrapper, bash, coreutils, gnugrep, gnused, ps,
{ lib, stdenv, fetchurl, jdk8_headless, jdk11_headless, makeWrapper, bash, coreutils, gnugrep, gnused, ps,
majorVersion ? "1.0" }:
let
jre8 = jdk8_headless;
jre11 = jdk11_headless;
versionMap = {
"2.4" = {
kafkaVersion = "2.4.1";
scalaVersion = "2.12";
sha256 = "0ahsprmpjz026mhbr79187wfdrxcg352iipyfqfrx68q878wnxr1";
jre = jre8;
};
"2.5" = {
kafkaVersion = "2.5.0";
scalaVersion = "2.13";
sha256 = "0w3g7ii8x63m2blv2a8c491d0diczpliaqm9f7w5yn98hikh0aqi";
jre = jre8;
};
};
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
in
with versionMap.${majorVersion};
@ -63,5 +65,5 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.ragge ];
platforms = platforms.unix;
};
passthru = { inherit jre; };
}