2020-04-24 23:36:52 +00:00
|
|
|
{
|
2024-06-05 15:53:02 +00:00
|
|
|
lib, stdenv, mkDerivation, fetchFromGitHub, cmake, extra-cmake-modules, makeBinaryWrapper,
|
2023-08-04 22:07:22 +00:00
|
|
|
zlib, boost179, libunwind, elfutils, sparsehash, zstd,
|
2020-04-24 23:36:52 +00:00
|
|
|
qtbase, kio, kitemmodels, threadweaver, kconfigwidgets, kcoreaddons, kdiagram
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "heaptrack";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KDE";
|
|
|
|
repo = "heaptrack";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-pP+s60ERnmOctYTe/vezCg0VYzziApNY0QaF3aTccZU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ cmake extra-cmake-modules makeBinaryWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2024-06-05 15:53:02 +00:00
|
|
|
zlib boost179 libunwind sparsehash zstd
|
2020-04-24 23:36:52 +00:00
|
|
|
qtbase kio kitemmodels threadweaver kconfigwidgets kcoreaddons kdiagram
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
elfutils
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
makeWrapper \
|
|
|
|
$out/Applications/KDE/heaptrack_gui.app/Contents/MacOS/heaptrack_gui \
|
|
|
|
$out/bin/heaptrack_gui
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Heap memory profiler for Linux";
|
|
|
|
homepage = "https://github.com/KDE/heaptrack";
|
|
|
|
license = licenses.lgpl21Plus;
|
2024-06-05 15:53:02 +00:00
|
|
|
mainProgram = "heaptrack_gui";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2024-06-05 15:53:02 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|