nixpkgs/pkgs/servers/confluent-platform/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, fetchFromGitHub
, jre, makeWrapper, bash, gnused }:
2018-08-01 19:35:42 +00:00
stdenv.mkDerivation rec {
pname = "confluent-platform";
2022-11-11 09:21:26 +00:00
version = "7.3.0";
2018-08-01 19:35:42 +00:00
src = fetchurl {
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor version}/confluent-${version}.tar.gz";
2022-11-11 09:21:26 +00:00
sha256 = "sha256-j120gSIky0CHNgzaVnodMAniecRX0RpU6+il86nxdrQ=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre bash ];
2018-08-01 19:35:42 +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" \
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
'';
meta = with lib; {
homepage = "https://www.confluent.io/";
description = "Confluent event streaming platform based on Apache Kafka";
2018-08-01 19:35:42 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ zoedsoupe ];
2018-08-01 19:35:42 +00:00
platforms = platforms.unix;
};
}