2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchFromGitHub
|
|
|
|
, jre, makeWrapper, bash, gnused }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "confluent-platform";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "7.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor version}/confluent-${version}.tar.gz";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-uoJQQZxUGniMLJk/BwwiNnpgYFcqJ+27GFQLEpsFxCw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre bash ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R bin etc share src $out
|
|
|
|
rm -rf $out/bin/windows
|
|
|
|
|
|
|
|
patchShebangs $out/bin
|
|
|
|
|
|
|
|
# allow us the specify logging directory using env
|
|
|
|
substituteInPlace $out/bin/kafka-run-class \
|
|
|
|
--replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"'
|
|
|
|
|
|
|
|
substituteInPlace $out/bin/ksql-run-class \
|
|
|
|
--replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"'
|
|
|
|
|
|
|
|
for p in $out/bin\/*; do
|
|
|
|
wrapProgram $p \
|
|
|
|
--set JAVA_HOME "${jre}" \
|
|
|
|
--set KAFKA_LOG_DIR "/tmp/apache-kafka-logs" \
|
|
|
|
--prefix PATH : "${jre}/bin:${bash}/bin:${gnused}/bin"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.confluent.io/";
|
|
|
|
description = "Confluent event streaming platform based on Apache Kafka";
|
|
|
|
license = licenses.asl20;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ zoedsoupe ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|