cassandra: Wrap new binaries (#59090)

The new releases of cassandra added some binaries that the install
script didn't wrap and thus were unusable.
This commit is contained in:
Daniel Schaefer 2019-04-07 15:53:57 +02:00 committed by xeji
parent 0fba99dedf
commit 2e6b8ae970

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, python, makeWrapper, gawk, bash, getopt, procps
, which, jre, version, sha256, ...
, which, jre, version, sha256, coreutils, ...
}:
let
@ -43,16 +43,30 @@ stdenv.mkDerivation rec {
rmdir $out/doc
fi
for cmd in bin/cassandra bin/nodetool bin/sstablekeys \
bin/sstableloader bin/sstableupgrade \
tools/bin/cassandra-stress tools/bin/cassandra-stressd \
tools/bin/sstablemetadata tools/bin/sstableofflinerelevel \
tools/bin/token-generator tools/bin/sstablelevelreset; do
for cmd in bin/cassandra \
bin/nodetool \
bin/sstablekeys \
bin/sstableloader \
bin/sstablescrub \
bin/sstableupgrade \
bin/sstableutil \
bin/sstableverify \
tools/bin/cassandra-stress \
tools/bin/cassandra-stressd \
tools/bin/sstabledump \
tools/bin/sstableexpiredblockers \
tools/bin/sstablelevelreset \
tools/bin/sstablemetadata \
tools/bin/sstableofflinerelevel \
tools/bin/sstablerepairedset \
tools/bin/sstablesplit \
tools/bin/token-generator; do
# check if file exists because some bin tools don't exist across all
# cassandra versions
if [ -f $out/$cmd ]; then
wrapProgram $out/$cmd \
makeWrapper $out/$cmd $out/bin/$(${coreutils}/bin/basename "$cmd") \
--suffix-each LD_LIBRARY_PATH : ${libPath} \
--prefix PATH : ${binPath} \
--set JAVA_HOME ${jre}