diff --git a/pkgs/development/tools/java/visualvm/default.nix b/pkgs/development/tools/java/visualvm/default.nix index a71ee53dced9..2eeefb23e042 100644 --- a/pkgs/development/tools/java/visualvm/default.nix +++ b/pkgs/development/tools/java/visualvm/default.nix @@ -1,27 +1,27 @@ -{ stdenv, fetchzip, lib, makeWrapper, jdk, gtk2, gawk }: +{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gtk2, gawk }: stdenv.mkDerivation rec { - name = "visualvm-1.3.9"; + version = "1.4"; + name = "visualvm-${version}"; src = fetchzip { - url = "https://github.com/visualvm/visualvm.src/releases/download/1.3.9/visualvm_139.zip"; - sha256 = "1gkdkxssh51jczhgv680i42jjrlia1vbpcqhxvf45xcq9xj95bm5"; + url = "https://github.com/visualvm/visualvm.src/releases/download/${version}/visualvm_${builtins.replaceStrings ["."] [""] version}.zip"; + sha256 = "0qpkal3yc8c8di4dmdglq54a4m7hciqximn5n6hwx2zqnfwx909z"; + }; + + desktopItem = makeDesktopItem { + name = "visualvm"; + exec = "visualvm"; + comment = "Java Troubleshooting Tool"; + desktopName = "VisualVM"; + genericName = "Java Troubleshooting Tool"; + categories = "Application;Development;"; }; nativeBuildInputs = [ makeWrapper ]; installPhase = '' - rm bin/visualvm.exe - rm platform/lib/nbexec64.exe - rm platform/lib/nbexec.exe - rm profiler/lib/deployed/jdk15/windows-amd64/profilerinterface.dll - rm profiler/lib/deployed/jdk15/windows/profilerinterface.dll - rm profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll - rm profiler/lib/deployed/jdk16/windows/profilerinterface.dll - rm platform/modules/lib/amd64/jnidispatch-410.dll - rm platform/modules/lib/x86/jnidispatch-410.dll - rm platform/lib/nbexec.dll - rm platform/lib/nbexec64.dll + find . -type f -name "*.dll" -o -name "*.exe" -delete; substituteInPlace etc/visualvm.conf \ --replace "#visualvm_jdkhome=" "visualvm_jdkhome=" \ @@ -50,6 +50,6 @@ stdenv.mkDerivation rec { homepage = https://visualvm.java.net/; license = licenses.gpl2ClasspathPlus; platforms = platforms.all; - maintainers = with maintainers; [ michalrus ]; + maintainers = with maintainers; [ michalrus moaxcp ]; }; }