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