3
0
Fork 0
forked from mirrors/nixpkgs

visualvm: 1.4.4 -> 2.0 (#82842)

* visualvm: 1.4.4 -> 2.0

* visualvm: gtk is part of the JVM disto
This commit is contained in:
zimbatm 2020-03-19 14:13:23 +01:00 committed by GitHub
parent b00b66e262
commit 8edcbd58f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,12 @@
{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gtk2, gawk }:
{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gawk }:
stdenv.mkDerivation rec {
version = "1.4.4";
version = "2.0";
pname = "visualvm";
src = fetchzip {
url = "https://github.com/visualvm/visualvm.src/releases/download/${version}/visualvm_${builtins.replaceStrings ["."] [""] version}.zip";
sha256 = "04x4z1013nzjgz9nhs743sphjgg7d3yjn0phxfmxdjzqpff9l133";
hash = "sha256-+T8U/GwMA46FHd0p6qpklHXb6+HPCbbIbo6s2Y/77RQ=";
};
desktopItem = makeDesktopItem {
@ -26,16 +26,11 @@ stdenv.mkDerivation rec {
substituteInPlace etc/visualvm.conf \
--replace "#visualvm_jdkhome=" "visualvm_jdkhome=" \
--replace "/path/to/jdk" "${jdk.home}" \
--replace 'visualvm_default_options="' 'visualvm_default_options="--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel -J-Dawt.useSystemAAFontSettings=lcd -J-Dswing.aatext=true '
substituteInPlace platform/lib/nbexec \
--replace /usr/bin/\''${awk} ${gawk}/bin/awk
cp -r . $out
# To get the native LAF, JVM needs to see GTKs .so-s.
wrapProgram $out/bin/visualvm \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk2 ]}"
'';
meta = with stdenv.lib; {