1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/development/tools/java/visualvm/default.nix
R. RyanTM c7e11a28dc visualvm: 1.4 -> 1.4.1 (#39721)
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/visualvm/versions.

These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 1.4.1 with grep in /nix/store/a6lr7j812ja6z31lzkpr2j2hf6wc842c-visualvm-1.4.1
- directory tree listing: https://gist.github.com/40c8f8eac649d32dcacc80c5e64dd0fe
2018-05-02 23:43:49 +02:00

56 lines
2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gtk2, gawk }:
stdenv.mkDerivation rec {
version = "1.4.1";
name = "visualvm-${version}";
src = fetchzip {
url = "https://github.com/visualvm/visualvm.src/releases/download/${version}/visualvm_${builtins.replaceStrings ["."] [""] version}.zip";
sha256 = "10ciyggf8mcy3c53shpl03fxqwsa2ilgw3xdgqhb1ah151k18p78";
};
desktopItem = makeDesktopItem {
name = "visualvm";
exec = "visualvm";
comment = "Java Troubleshooting Tool";
desktopName = "VisualVM";
genericName = "Java Troubleshooting Tool";
categories = "Application;Development;";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
find . -type f -name "*.dll" -o -name "*.exe" -delete;
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; {
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 moaxcp ];
};
}