From 7a9ca5ad1ca8e10df02acbcf330a16e054b72cc0 Mon Sep 17 00:00:00 2001 From: Philipp Hausmann Date: Thu, 3 Oct 2019 11:48:29 +0200 Subject: [PATCH] kafka: Fix stop script in pure environments --- pkgs/servers/apache-kafka/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/apache-kafka/default.nix b/pkgs/servers/apache-kafka/default.nix index e932b772749a..7b27909856d7 100644 --- a/pkgs/servers/apache-kafka/default.nix +++ b/pkgs/servers/apache-kafka/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils, gnugrep, gnused, +{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils, gnugrep, gnused, ps, majorVersion ? "1.0" }: let @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { inherit sha256; }; - buildInputs = [ jre makeWrapper bash gnugrep gnused coreutils ]; + buildInputs = [ jre makeWrapper bash gnugrep gnused coreutils ps ]; installPhase = '' mkdir -p $out @@ -76,6 +76,9 @@ stdenv.mkDerivation rec { substituteInPlace $out/bin/kafka-run-class.sh \ --replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"' + substituteInPlace $out/bin/kafka-server-stop.sh \ + --replace 'ps' '${ps}/bin/ps' + for p in $out/bin\/*.sh; do wrapProgram $p \ --set JAVA_HOME "${jre}" \