summaryrefslogtreecommitdiffstats
path: root/pkgs/servers/confluent-platform
diff options
context:
space:
mode:
authorAnte Salinovic <ante.salinovic@uptickhq.com>2019-05-24 11:17:49 +1000
committerAnte Salinovic <ante.salinovic@uptickhq.com>2019-05-24 12:07:27 +1000
commitf25550e840438355a83b87f62f813fc7c03f71d9 (patch)
treee053a9b59444ca583ee20286f6b2198ebe7ccf85 /pkgs/servers/confluent-platform
parent1bc73d1a9a46e264bafd386ead366093b066cba8 (diff)
confluent-platform: Rename confluent package and update to 5.2.1
* Renamed confluent -> confluent-plaform * Added longer description to search index by Apache Kafka term * Upgraded to 5.2.1 version of the platform
Diffstat (limited to 'pkgs/servers/confluent-platform')
-rw-r--r--pkgs/servers/confluent-platform/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/servers/confluent-platform/default.nix b/pkgs/servers/confluent-platform/default.nix
new file mode 100644
index 000000000000..349502289207
--- /dev/null
+++ b/pkgs/servers/confluent-platform/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, fetchurl, jre, makeWrapper, bash, gnused }:
+
+let
+ scalaVersion = "2.12";
+in
+stdenv.mkDerivation rec {
+ name = "confluent-platform-${version}";
+ version = "5.2.1";
+
+ src = fetchurl {
+ url = "http://packages.confluent.io/archive/${lib.versions.majorMinor version}/confluent-${version}-${scalaVersion}.tar.gz";
+ sha256 = "11fdcc557aca782e87352ed6e655c37c71fb7b3a003796ee956970b01dedbbb1";
+ };
+
+ buildInputs = [ jre makeWrapper bash ];
+
+ 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 : "${bash}/bin:${gnused}/bin"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://www.confluent.io/;
+ description = "Confluent event streaming platform based on Apache Kafka";
+ license = licenses.asl20;
+ maintainers = [ maintainers.offline ];
+ platforms = platforms.unix;
+ };
+}