5 , gsettings-desktop-schemas
23 pVersion = "1.13.0.20220615";
24 pVersionTriple = splitVersion pVersion;
25 majorVersion = elemAt pVersionTriple 0;
26 minorVersion = elemAt pVersionTriple 1;
27 patchVersion = elemAt pVersionTriple 2;
28 baseVersion = "${majorVersion}.${minorVersion}.${patchVersion}";
31 stdenv.mkDerivation rec {
32 pname = "eclipse-mat";
36 url = "http://ftp.halifax.rwth-aachen.de/eclipse//mat/${baseVersion}/rcp/MemoryAnalyzer-${version}-linux.gtk.x86_64.zip";
37 sha256 = "sha256-LwtP76kb9xgdcsWCSCXeRbhFVyFS3xkl15F075Cq4Os=";
40 desktopItem = makeDesktopItem {
44 comment = "Eclipse Memory Analyzer";
45 desktopName = "Eclipse MAT";
46 genericName = "Java Memory Analyzer";
47 categories = [ "Development" ];
60 interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
61 libCairo=$out/eclipse/libcairo-swt.so
62 patchelf --set-interpreter $interpreter $out/mat/MemoryAnalyzer
63 [ -f $libCairo ] && patchelf --set-rpath ${
64 lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]
67 # Create wrapper script. Pass -configuration to store settings in ~/.eclipse-mat/<version>
68 makeWrapper $out/mat/MemoryAnalyzer $out/bin/eclipse-mat \
69 --prefix PATH : ${jdk}/bin \
70 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk3 libXtst webkitgtk ])} \
71 --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
72 --add-flags "-configuration \$HOME/.eclipse-mat/''${version}/configuration"
74 # Create desktop item.
75 mkdir -p $out/share/applications
76 cp ${desktopItem}/share/applications/* $out/share/applications
77 mkdir -p $out/share/pixmaps
78 find $out/mat/plugins -name 'eclipse*.png' -type f -exec cp {} $out/share/pixmaps \;
79 mv $out/share/pixmaps/eclipse64.png $out/share/pixmaps/eclipse.png
82 nativeBuildInputs = [ unzip makeWrapper ];
87 gsettings-desktop-schemas
102 description = "Fast and feature-rich Java heap analyzer";
104 The Eclipse Memory Analyzer is a tool that helps you find memory
105 leaks and reduce memory consumption. Use the Memory Analyzer to
106 analyze productive heap dumps with hundreds of millions of
107 objects, quickly calculate the retained sizes of objects, see
108 who is preventing the Garbage Collector from collecting objects,
109 run a report to automatically extract leak suspects.
111 homepage = "https://www.eclipse.org/mat";
112 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
113 license = licenses.epl20;
114 maintainers = [ maintainers.ktor ];
115 platforms = [ "x86_64-linux" ];