From 53b7e136e5d12729d7258f18f88a10f4c5d0369d Mon Sep 17 00:00:00 2001 From: Christopher League Date: Tue, 21 May 2019 14:33:00 -0400 Subject: [PATCH] briss: Use makeWrapper so it can take command-line args --- pkgs/tools/graphics/briss/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/graphics/briss/default.nix b/pkgs/tools/graphics/briss/default.nix index a6b3ba01bfa4..57a6c8c9673c 100644 --- a/pkgs/tools/graphics/briss/default.nix +++ b/pkgs/tools/graphics/briss/default.nix @@ -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 = {