2020-03-19 13:13:23 +00:00
|
|
|
{ stdenv, fetchzip, lib, makeWrapper, makeDesktopItem, jdk, gawk }:
|
2016-08-15 04:45:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-03-19 13:13:23 +00:00
|
|
|
version = "2.0";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "visualvm";
|
2016-08-15 04:45:48 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
2018-04-18 03:01:39 +01:00
|
|
|
url = "https://github.com/visualvm/visualvm.src/releases/download/${version}/visualvm_${builtins.replaceStrings ["."] [""] version}.zip";
|
2020-03-19 13:13:23 +00:00
|
|
|
hash = "sha256-+T8U/GwMA46FHd0p6qpklHXb6+HPCbbIbo6s2Y/77RQ=";
|
2018-04-18 03:01:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "visualvm";
|
|
|
|
exec = "visualvm";
|
|
|
|
comment = "Java Troubleshooting Tool";
|
|
|
|
desktopName = "VisualVM";
|
|
|
|
genericName = "Java Troubleshooting Tool";
|
|
|
|
categories = "Application;Development;";
|
2016-08-15 04:45:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-04-18 03:01:39 +01:00
|
|
|
find . -type f -name "*.dll" -o -name "*.exe" -delete;
|
2016-08-15 04:45:48 +01:00
|
|
|
|
|
|
|
substituteInPlace etc/visualvm.conf \
|
|
|
|
--replace "#visualvm_jdkhome=" "visualvm_jdkhome=" \
|
|
|
|
--replace "/path/to/jdk" "${jdk.home}" \
|
|
|
|
|
2017-08-21 11:25:21 +01:00
|
|
|
substituteInPlace platform/lib/nbexec \
|
|
|
|
--replace /usr/bin/\''${awk} ${gawk}/bin/awk
|
|
|
|
|
2016-08-15 04:45:48 +01:00
|
|
|
cp -r . $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
2019-10-12 01:13:45 +01:00
|
|
|
homepage = "https://visualvm.github.io";
|
2016-08-15 04:45:48 +01:00
|
|
|
license = licenses.gpl2ClasspathPlus;
|
|
|
|
platforms = platforms.all;
|
2018-04-18 03:01:39 +01:00
|
|
|
maintainers = with maintainers; [ michalrus moaxcp ];
|
2016-08-15 04:45:48 +01:00
|
|
|
};
|
|
|
|
}
|