Skip to content

Commit

Permalink
apache-kafka: retain 0.8.x and 0.9.x
Browse files Browse the repository at this point in the history
Should make it a little easier for users who need time to plan for the
major 0.9 update.
  • Loading branch information
benley committed May 28, 2016
1 parent ca4e52d commit cf5af59
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
20 changes: 15 additions & 5 deletions pkgs/servers/apache-kafka/default.nix
@@ -1,18 +1,28 @@
{ stdenv, fetchurl, jre, makeWrapper, bash }:
{ stdenv, fetchurl, jre, makeWrapper, bash,
majorVersion ? "0.9" }:

let
kafkaVersion = "0.9.0.1";
scalaVersion = "2.11";

versionMap = {
"0.8" = { kafkaVersion = "0.8.2.1";
scalaVersion = "2.10";
sha256 = "1klri23fjxbzv7rmi05vcqqfpy7dzi1spn2084y1dxsi1ypfkvc9";
};
"0.9" = { kafkaVersion = "0.9.0.1";
scalaVersion = "2.11";
sha256 = "0ykcjv5dz9i5bws9my2d60pww1g9v2p2nqr67h0i2xrjm7az8a6v";
};
};
in

with versionMap.${majorVersion};

stdenv.mkDerivation rec {
version = "${scalaVersion}-${kafkaVersion}";
name = "apache-kafka-${version}";

src = fetchurl {
url = "mirror://apache/kafka/${kafkaVersion}/kafka_${version}.tgz";
sha256 = "0ykcjv5dz9i5bws9my2d60pww1g9v2p2nqr67h0i2xrjm7az8a6v";
inherit sha256;
};

buildInputs = [ jre makeWrapper bash ];
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -5845,7 +5845,9 @@ in

apacheAnt = callPackage ../development/tools/build-managers/apache-ant { };

apacheKafka = callPackage ../servers/apache-kafka { };
apacheKafka = apacheKafka_0_9;
apacheKafka_0_8 = callPackage ../servers/apache-kafka { majorVersion = "0.8"; };
apacheKafka_0_9 = callPackage ../servers/apache-kafka { majorVersion = "0.9"; };

astyle = callPackage ../development/tools/misc/astyle { };

Expand Down

0 comments on commit cf5af59

Please sign in to comment.