diff --git a/pkgs/applications/science/logic/logisim/default.nix b/pkgs/applications/science/logic/logisim/default.nix index 27c8947b8cc..50ef1edf63e 100644 --- a/pkgs/applications/science/logic/logisim/default.nix +++ b/pkgs/applications/science/logic/logisim/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jre }: +{ stdenv, fetchurl, jre, makeWrapper }: let version = "2.7.1"; in @@ -11,17 +11,12 @@ stdenv.mkDerivation { }; phases = [ "installPhase" ]; - + + nativeBuildInputs = [makeWrapper]; + installPhase = '' mkdir -pv $out/bin - cp -v $src $out/logisim.jar - - cat > $out/bin/logisim << EOF - #!${stdenv.shell} - ${jre}/bin/java -jar $out/logisim.jar - EOF - - chmod +x $out/bin/logisim + makeWrapper ${jre}/bin/java $out/bin/logisim --add-flags "-jar $src" ''; meta = {