diff options
author | Ragnar Dahlén <r.dahlen@gmail.com> | 2015-01-28 22:06:28 +0000 |
---|---|---|
committer | Ragnar Dahlén <r.dahlen@gmail.com> | 2015-01-29 11:10:12 +0000 |
commit | 736764afee9c67a0aa5017bcd186a83e12de29fb (patch) | |
tree | 872178508ca5c9653bfbd65d32dfb63f5a56d270 | |
parent | d1acaf276093467d57acd4c9ba26e2e10af5bcc8 (diff) | |
download | nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar.gz nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar.bz2 nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar.lz nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar.xz nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.tar.zst nixpkgs-736764afee9c67a0aa5017bcd186a83e12de29fb.zip |
apache-kafka: New package for Apache Kafka
-rwxr-xr-x | pkgs/servers/apache-kafka/default.nix | 48 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/servers/apache-kafka/default.nix b/pkgs/servers/apache-kafka/default.nix new file mode 100755 index 00000000000..b1f732a451f --- /dev/null +++ b/pkgs/servers/apache-kafka/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, jre, makeWrapper, bash }: + +let + kafkaVersion = "0.8.1.1"; + scalaVersion = "2.8.0"; + +in + +stdenv.mkDerivation rec { + version = "${scalaVersion}-${kafkaVersion}"; + name = "apache-kafka-${version}"; + + src = fetchurl { + url = "mirror://apache/kafka/${kafkaVersion}/kafka_${version}.tgz"; + sha256 = "1bya4qs0ccrqibmdivgdxcsyiay4c3vywddrkci1dz9v3ymrqby9"; + }; + + buildInputs = [ jre makeWrapper bash ]; + + installPhase = '' + mkdir -p $out + cp -R config libs $out + + mkdir -p $out/bin + cp bin/kafka* $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' + + 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" + done + chmod +x $out/bin\/* + ''; + + meta = with stdenv.lib; { + homepage = "http://kafka.apache.org"; + description = "A high-throughput distributed messaging system"; + license = licenses.asl20; + maintainers = [ maintainers.ragge ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 08a6ba9e5f8..5ebad301175 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4509,6 +4509,8 @@ let apacheAnt = callPackage ../development/tools/build-managers/apache-ant { }; + apacheKafka = callPackage ../servers/apache-kafka { }; + astyle = callPackage ../development/tools/misc/astyle { }; atom-shell = callPackage ../development/tools/atom-shell { |