summary refs log tree commit diff
path: root/pkgs/development/tools/java
diff options
context:
space:
mode:
authorMichal Rus <m@michalrus.com>2016-08-15 05:45:48 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-08-15 05:45:48 +0200
commit397a17aef9e6c213cc2b3adc2c2ca3db76b213cb (patch)
treed338354279e3de5b2da42d5b81e1fee8df5f5b52 /pkgs/development/tools/java
parent64c79e85269f34059593e3490800dd9e9d80b44a (diff)
downloadnixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar.gz
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar.bz2
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar.lz
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar.xz
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.tar.zst
nixlib-397a17aef9e6c213cc2b3adc2c2ca3db76b213cb.zip
visualvm: init at 1.3.8 (#17745)
Diffstat (limited to 'pkgs/development/tools/java')
-rw-r--r--pkgs/development/tools/java/visualvm/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/tools/java/visualvm/default.nix b/pkgs/development/tools/java/visualvm/default.nix
new file mode 100644
index 000000000000..2620a5b7741a
--- /dev/null
+++ b/pkgs/development/tools/java/visualvm/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchzip, lib, makeWrapper, jdk, gtk }:
+
+stdenv.mkDerivation rec {
+  name = "visualvm-1.3.8";
+
+  src = fetchzip {
+    url = "https://java.net/projects/visualvm/downloads/download/release138/visualvm_138.zip";
+    sha256 = "09wsi85z1g7bwyfhb37vw0gy3wl0j1cy35aj59rg7067q262gy1y";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    rm bin/visualvm.exe
+
+    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 '
+
+    cp -r . $out
+
+    # To get the native LAF, JVM needs to see GTK’s .so-s.
+    wrapProgram $out/bin/visualvm \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A visual interface for viewing information about Java applications";
+    longDescription = ''
+      VisualVM is a visual tool integrating several commandline JDK
+      tools and lightweight profiling capabilities. Designed for both
+      production and development time use, it further enhances the
+      capability of monitoring and performance analysis for the Java
+      SE platform.
+    '';
+    homepage = https://visualvm.java.net/;
+    license = licenses.gpl2ClasspathPlus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ michalrus ];
+  };
+}