1{ stdenv, lib
2, fetchFromGitHub
3, cmake, nodejs, libelf, libunwind
4}:
5
6stdenv.mkDerivation rec {
7 pname = "malt";
8 version = "1.2.1";
9
10 src = fetchFromGitHub {
11 owner = "memtt";
12 repo = "malt";
13 rev = "v${version}";
14 sha256 = "1yh9gmf7cggf3mx15cwmm99dha34aibkzhnpd0ckl0fkc6w17xqg";
15 };
16
17 postPatch = ''
18 sed -i s,@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@,@CMAKE_INSTALL_LIBDIR@, \
19 src/integration/malt.sh.in
20 sed -i -e 's,^NODE=""$,NODE=${nodejs}/bin/node,' -e s,^detectNodeJS$,, \
21 src/integration/malt-{webview,passwd}.sh.in
22 '';
23
24 nativeBuildInputs = [ cmake ];
25 buildInputs = [ libelf libunwind ];
26
27 meta = with lib; {
28 description = "Memory tool to find where you allocate your memory";
29 homepage = "https://github.com/memtt/malt";
30 license = licenses.cecill-c;
31 maintainers = with maintainers; [ viric ];
32 platforms = platforms.linux;
33 };
34}