mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
apache-kafka: New package for Apache Kafka
This commit is contained in:
parent
d1acaf2760
commit
736764afee
48
pkgs/servers/apache-kafka/default.nix
Executable file
48
pkgs/servers/apache-kafka/default.nix
Executable file
@ -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;
|
||||
};
|
||||
|
||||
}
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user