2023-08-06 17:38:19 +00:00
|
|
|
{
|
|
|
|
bash
|
|
|
|
, fetchurl
|
|
|
|
, gnused
|
|
|
|
, jre
|
|
|
|
, lib
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "confluent-platform";
|
2024-02-16 03:49:20 +00:00
|
|
|
version = "7.6.0";
|
2018-08-01 19:35:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-08-06 17:38:19 +00:00
|
|
|
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor finalAttrs.version}/confluent-${finalAttrs.version}.tar.gz";
|
2024-02-16 03:49:20 +00:00
|
|
|
hash = "sha256-bHT8VWSUqxiM/g7opRXZmEOAs2d61dWBTtuwwlzPgBc=";
|
2019-08-04 11:05:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-06 17:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bash
|
|
|
|
jre
|
|
|
|
];
|
2018-08-01 19:35:42 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2023-08-06 17:38:19 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-08-01 19:35:42 +00:00
|
|
|
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 11:05:30 +00:00
|
|
|
--prefix PATH : "${jre}/bin:${bash}/bin:${gnused}/bin"
|
2018-08-01 19:35:42 +00:00
|
|
|
done
|
2023-08-06 17:38:19 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2018-08-01 19:35:42 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-06 17:38:19 +00:00
|
|
|
meta = {
|
2019-05-24 01:17:49 +00:00
|
|
|
description = "Confluent event streaming platform based on Apache Kafka";
|
2023-08-06 17:38:19 +00:00
|
|
|
homepage = "https://www.confluent.io/";
|
|
|
|
license = lib.licenses.asl20;
|
2023-10-07 19:59:44 +00:00
|
|
|
maintainers = with lib.maintainers; [ zoedsoupe autophagy ];
|
2023-08-06 17:38:19 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2018-08-01 19:35:42 +00:00
|
|
|
};
|
2023-08-06 17:38:19 +00:00
|
|
|
})
|