diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-06-26 20:22:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 20:22:49 +0200 |
commit | efdfa300eeb8b1bc21dad55a845a673821f903da (patch) | |
tree | 971b04055b7fcf9fd9e032658ed190777ca66ad4 /pkgs | |
parent | 955dd26c09956232bb3cd1eedb32168adbd324dd (diff) | |
parent | 412cce1388910d95980aa06f9fcb687f258240a0 (diff) |
Merge pull request #287036 from srhb/kafka-versions-cleanup
kafka: versions cleanup and drop older
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/apache-kafka/default.nix | 130 | ||||
-rw-r--r-- | pkgs/top-level/aliases.nix | 7 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 13 |
3 files changed, 61 insertions, 89 deletions
diff --git a/pkgs/servers/apache-kafka/default.nix b/pkgs/servers/apache-kafka/default.nix index ef54be5bb71a9..70445612115f6 100644 --- a/pkgs/servers/apache-kafka/default.nix +++ b/pkgs/servers/apache-kafka/default.nix @@ -1,102 +1,70 @@ -{ lib, stdenv, fetchurl, jdk17_headless, jdk11_headless, makeWrapper, bash, coreutils, gnugrep, gnused, ps, - majorVersion ? "1.0" }: +{ lib, stdenv, fetchurl, jdk17_headless, jdk11_headless, makeWrapper, bash, coreutils, gnugrep, gnused, ps }: let versionMap = { - "3.5" = { - kafkaVersion = "3.5.0"; + "3_7" = { + kafkaVersion = "3.7.0"; scalaVersion = "2.13"; - sha256 = "sha256-KjpGjgab5XDxbWEqgZbC96kge36shlvpNNIM4SUusvg="; + sha256 = "sha256-ZfJuWTe7t23+eN+0FnMN+n4zeLJ+E/0eIE8aEJm/r5w="; jre = jdk17_headless; }; - "3.4" = { - kafkaVersion = "3.4.1"; + "3_6" = { + kafkaVersion = "3.6.2"; scalaVersion = "2.13"; - sha256 = "sha256-p28XpSuPLNMd4RVx/zZqcUggtuTgKJOwFZ0J2w7a+Zg="; + sha256 = "sha256-wxfkf3cUHTFG6VY9nLodZIbIHmcLIR7OasRqn3Lkqqw="; jre = jdk17_headless; }; - "3.3" = { - kafkaVersion = "3.3.2"; - scalaVersion = "2.13"; - sha256 = "sha256-Gv5XrpXnEajH8fSbcfIfURz+QPcqTrJ1oe3SGXYLNRc="; - jre = jdk17_headless; - }; - "3.2" = { - kafkaVersion = "3.2.3"; - scalaVersion = "2.13"; - sha256 = "sha256-tvkbwBP83M1zl31J4g6uu4/LEhqJoIA9Eam48fyT24A="; - jre = jdk17_headless; - }; - "3.1" = { - kafkaVersion = "3.1.2"; - scalaVersion = "2.13"; - sha256 = "sha256-SO1bTQkG3YQSv657QjwBeBCWbDlDqS3E5eUp7ciojnI="; - jre = jdk17_headless; - }; - "3.0" = { - kafkaVersion = "3.0.2"; - scalaVersion = "2.13"; - sha256 = "sha256-G8b6STGlwow+iDqMCeZkF3HTKd94TKccmyfZ7AT/7yE="; - jre = jdk17_headless; - }; - "2.8" = { - kafkaVersion = "2.8.2"; - scalaVersion = "2.13"; - sha256 = "sha256-inZXZJSs8ivtEqF6E/ApoyUHn8vg38wUG3KhowP8mfQ="; - jre = jdk11_headless; - }; - }; -in - -with versionMap.${majorVersion}; -stdenv.mkDerivation rec { - version = "${scalaVersion}-${kafkaVersion}"; - pname = "apache-kafka"; + build = versionInfo: with versionInfo; stdenv.mkDerivation rec { + version = "${scalaVersion}-${kafkaVersion}"; + pname = "apache-kafka"; - src = fetchurl { - url = "mirror://apache/kafka/${kafkaVersion}/kafka_${version}.tgz"; - inherit sha256; - }; + src = fetchurl { + url = "mirror://apache/kafka/${kafkaVersion}/kafka_${version}.tgz"; + inherit sha256; + }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ jre bash gnugrep gnused coreutils ps ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ jre bash gnugrep gnused coreutils ps ]; - installPhase = '' - mkdir -p $out - cp -R config libs $out + installPhase = '' + mkdir -p $out + cp -R config libs $out - mkdir -p $out/bin - cp bin/kafka* $out/bin - cp bin/connect* $out/bin + mkdir -p $out/bin + cp bin/kafka* $out/bin + cp bin/connect* $out/bin - # allow us the specify logging directory using env - substituteInPlace $out/bin/kafka-run-class.sh \ - --replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"' + # allow us the specify logging directory using env + substituteInPlace $out/bin/kafka-run-class.sh \ + --replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"' - substituteInPlace $out/bin/kafka-server-stop.sh \ - --replace 'ps' '${ps}/bin/ps' + substituteInPlace $out/bin/kafka-server-stop.sh \ + --replace 'ps' '${ps}/bin/ps' - for p in $out/bin\/*.sh; do - wrapProgram $p \ - --set JAVA_HOME "${jre}" \ - --set KAFKA_LOG_DIR "/tmp/apache-kafka-logs" \ - --prefix PATH : "${bash}/bin:${coreutils}/bin:${gnugrep}/bin:${gnused}/bin" - done - chmod +x $out/bin\/* - ''; + for p in $out/bin\/*.sh; do + wrapProgram $p \ + --set JAVA_HOME "${jre}" \ + --set KAFKA_LOG_DIR "/tmp/apache-kafka-logs" \ + --prefix PATH : "${bash}/bin:${coreutils}/bin:${gnugrep}/bin:${gnused}/bin" + done + chmod +x $out/bin\/* + ''; - passthru = { - inherit jre; # Used by the NixOS module to select the supported jre - }; + passthru = { + inherit jre; # Used by the NixOS module to select the supported jre + }; - meta = with lib; { - homepage = "https://kafka.apache.org"; - description = "High-throughput distributed messaging system"; - license = licenses.asl20; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - maintainers = [ maintainers.ragge ]; - platforms = platforms.unix; + meta = with lib; { + homepage = "https://kafka.apache.org"; + description = "High-throughput distributed messaging system"; + license = licenses.asl20; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + maintainers = [ maintainers.ragge ]; + platforms = platforms.unix; + }; }; -} +in with lib; mapAttrs' + (majorVersion: versionInfo: nameValuePair "apacheKafka_${majorVersion}" (build versionInfo)) + versionMap diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 71c93af775413..3504bc3897239 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -86,6 +86,13 @@ mapAliases ({ ansible_2_13 = throw "Ansible 2.13 goes end of life in 2023/11"; # Added 2023-12-30 ansible_2_14 = throw "Ansible 2.14 goes end of life in 2024/05 and can't be supported throughout the 24.05 release cycle"; # Added 2024-04-11 apacheAnt_1_9 = throw "Ant 1.9 has been removed since it's not used in nixpkgs anymore"; # Added 2023-11-12 + apacheKafka_2_8 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_0 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_1 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_2 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_3 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_4 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-02-12 + apacheKafka_3_5 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-06-13 antimicroX = antimicrox; # Added 2021-10-31 appthreat-depscan = dep-scan; # Added 2024-04-10 arcanist = throw "arcanist was removed as phabricator is not supported and does not accept fixes"; # Added 2024-06-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb3c68a62eec4..5fd2c7817aa96 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17861,14 +17861,11 @@ with pkgs; apacheAnt = callPackage ../development/tools/build-managers/apache-ant { }; ant = apacheAnt; - apacheKafka = apacheKafka_3_5; - apacheKafka_2_8 = callPackage ../servers/apache-kafka { majorVersion = "2.8"; }; - apacheKafka_3_0 = callPackage ../servers/apache-kafka { majorVersion = "3.0"; }; - apacheKafka_3_1 = callPackage ../servers/apache-kafka { majorVersion = "3.1"; }; - apacheKafka_3_2 = callPackage ../servers/apache-kafka { majorVersion = "3.2"; }; - apacheKafka_3_3 = callPackage ../servers/apache-kafka { majorVersion = "3.3"; }; - apacheKafka_3_4 = callPackage ../servers/apache-kafka { majorVersion = "3.4"; }; - apacheKafka_3_5 = callPackage ../servers/apache-kafka { majorVersion = "3.5"; }; + inherit (callPackages ../servers/apache-kafka { }) + apacheKafka_3_6 + apacheKafka_3_7; + + apacheKafka = apacheKafka_3_7; apng2gif = callPackage ../tools/graphics/apng2gif { }; |