about summary refs log tree commit diff
path: root/pkgs/development/tools/profiling/heaptrack/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-05-22 18:01:30 +0000
committerGitHub <noreply@github.com>2024-05-22 18:01:30 +0000
commitdfe5aa3439ee8778fff34b825c59d8344365a913 (patch)
treeadc57c6ab5809b4601fcfd42aa89208a559cd263 /pkgs/development/tools/profiling/heaptrack/default.nix
parent94bdc4bbbb1ae53474c219a1770385b9c6a92082 (diff)
parentb73bfe9a7c245264f96d5a9dcd8809b2ec88aff0 (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/tools/profiling/heaptrack/default.nix')
-rw-r--r--pkgs/development/tools/profiling/heaptrack/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/tools/profiling/heaptrack/default.nix b/pkgs/development/tools/profiling/heaptrack/default.nix
index 2e4d996af01e3..88de0065e8ec2 100644
--- a/pkgs/development/tools/profiling/heaptrack/default.nix
+++ b/pkgs/development/tools/profiling/heaptrack/default.nix
@@ -1,5 +1,5 @@
 {
-  lib, mkDerivation, fetchFromGitHub, cmake, extra-cmake-modules,
+  lib, stdenv, mkDerivation, fetchFromGitHub, cmake, extra-cmake-modules, makeBinaryWrapper,
   zlib, boost179, libunwind, elfutils, sparsehash, zstd,
   qtbase, kio, kitemmodels, threadweaver, kconfigwidgets, kcoreaddons, kdiagram
 }:
@@ -12,20 +12,29 @@ mkDerivation rec {
     owner = "KDE";
     repo = "heaptrack";
     rev = "v${version}";
-    sha256 = "sha256-pP+s60ERnmOctYTe/vezCg0VYzziApNY0QaF3aTccZU=";
+    hash = "sha256-pP+s60ERnmOctYTe/vezCg0VYzziApNY0QaF3aTccZU=";
   };
 
-  nativeBuildInputs = [ cmake extra-cmake-modules ];
+  nativeBuildInputs = [ cmake extra-cmake-modules makeBinaryWrapper ];
   buildInputs = [
-    zlib boost179 libunwind elfutils sparsehash zstd
+    zlib boost179 libunwind sparsehash zstd
     qtbase kio kitemmodels threadweaver kconfigwidgets kcoreaddons kdiagram
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    elfutils
   ];
 
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    makeWrapper \
+      $out/Applications/KDE/heaptrack_gui.app/Contents/MacOS/heaptrack_gui \
+      $out/bin/heaptrack_gui
+  '';
+
   meta = with lib; {
     description = "Heap memory profiler for Linux";
     homepage = "https://github.com/KDE/heaptrack";
     license = licenses.lgpl21Plus;
+    mainProgram = "heaptrack_gui";
     maintainers = with maintainers; [ gebner ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }