kafka: Fix stop script in pure environments
This commit is contained in:
parent
95a3c8d151
commit
7a9ca5ad1c
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils, gnugrep, gnused,
|
{ stdenv, fetchurl, jre, makeWrapper, bash, coreutils, gnugrep, gnused, ps,
|
||||||
majorVersion ? "1.0" }:
|
majorVersion ? "1.0" }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ jre makeWrapper bash gnugrep gnused coreutils ];
|
buildInputs = [ jre makeWrapper bash gnugrep gnused coreutils ps ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
@ -76,6 +76,9 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace $out/bin/kafka-run-class.sh \
|
substituteInPlace $out/bin/kafka-run-class.sh \
|
||||||
--replace 'LOG_DIR="$base_dir/logs"' 'LOG_DIR="$KAFKA_LOG_DIR"'
|
--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
|
for p in $out/bin\/*.sh; do
|
||||||
wrapProgram $p \
|
wrapProgram $p \
|
||||||
--set JAVA_HOME "${jre}" \
|
--set JAVA_HOME "${jre}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user