briss: Use makeWrapper so it can take command-line args

This commit is contained in:
Christopher League 2019-05-21 14:33:00 -04:00 committed by Frederik Rietdijk
parent 0b0265a932
commit 53b7e136e5

View File

@ -1,6 +1,6 @@
# The releases of this project are apparently precompiled to .jar files.
{ stdenv, fetchurl, jre, runtimeShell }:
{ stdenv, fetchurl, jre, makeWrapper }:
let
@ -14,13 +14,13 @@ in stdenv.mkDerivation {
inherit sha256;
};
nativeBuildInputs = [makeWrapper];
installPhase = ''
mkdir -p "$out/bin";
mkdir -p "$out/share";
install -D -m444 -t "$out/share" *.jar
echo "#!${runtimeShell}" > "$out/bin/briss"
echo "${jre}/bin/java -Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\"" >> "$out/bin/briss"
chmod +x "$out/bin/briss"
makeWrapper "${jre}/bin/java" "$out/bin/briss" --add-flags "-Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\""
'';
meta = {