2019-08-04 12:05:59 +01:00
|
|
|
{ stdenv, lib, fetchurl, fetchFromGitHub
|
|
|
|
, jre, makeWrapper, bash, gnused }:
|
2018-08-01 20:35:42 +01:00
|
|
|
|
2019-05-24 02:17:49 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "confluent-platform";
|
2022-07-28 05:53:51 +01:00
|
|
|
version = "7.2.1";
|
2018-08-01 20:35:42 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-26 12:04:19 +00:00
|
|
|
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor version}/confluent-${version}.tar.gz";
|
2022-07-28 05:53:51 +01:00
|
|
|
sha256 = "sha256-vflWZjW8RwaDOwEFy8GHRfcmsHcRKxs8WwFfT66SIM4=";
|
2019-08-04 12:05:59 +01:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre bash ];
|
2018-08-01 20:35:42 +01: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" \
|
2019-08-04 12:05:30 +01:00
|
|
|
--prefix PATH : "${jre}/bin:${bash}/bin:${gnused}/bin"
|
2018-08-01 20:35:42 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.confluent.io/";
|
2019-05-24 02:17:49 +01:00
|
|
|
description = "Confluent event streaming platform based on Apache Kafka";
|
2018-08-01 20:35:42 +01:00
|
|
|
license = licenses.asl20;
|
2022-03-26 12:04:19 +00:00
|
|
|
maintainers = with maintainers; [ zoedsoupe ];
|
2018-08-01 20:35:42 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|