about summary refs log tree commit diff
path: root/pkgs/development/tools/tracy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/tracy/default.nix')
-rw-r--r--pkgs/development/tools/tracy/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/development/tools/tracy/default.nix b/pkgs/development/tools/tracy/default.nix
index 4f0fad54c1b6..724e74098dec 100644
--- a/pkgs/development/tools/tracy/default.nix
+++ b/pkgs/development/tools/tracy/default.nix
@@ -1,14 +1,16 @@
 { stdenv, lib, darwin, fetchFromGitHub, tbb, gtk3, glfw, pkg-config, freetype, Carbon, AppKit, capstone }:
 
-stdenv.mkDerivation rec {
+let
+  disableLTO = stdenv.cc.isClang && stdenv.isDarwin;  # workaround issue #19098
+in stdenv.mkDerivation rec {
   pname = "tracy";
-  version = "0.7.6";
+  version = "0.7.7";
 
   src = fetchFromGitHub {
     owner = "wolfpld";
     repo = "tracy";
     rev = "v${version}";
-    sha256 = "sha256-Fk/Kuc7DwmdoyLx/YjdEHQ7S0M+ksAXl9QqeSPH2vJ8=";
+    sha256 = "sha256-jp+Geqk39ZPoe2KzUJJ0w5hvCnyUlHGwVKn73lJJt94=";
   };
 
   nativeBuildInputs = [ pkg-config ];
@@ -19,7 +21,10 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = [ ]
     ++ lib.optional stdenv.isLinux "-ltbb"
-    ++ lib.optional stdenv.cc.isClang "-faligned-allocation";
+    ++ lib.optional stdenv.cc.isClang "-faligned-allocation"
+    ++ lib.optional disableLTO "-fno-lto";
+
+  NIX_CFLAGS_LINK = lib.optional disableLTO "-fno-lto";
 
   buildPhase = ''
     make -j $NIX_BUILD_CORES -C profiler/build/unix release
@@ -35,7 +40,7 @@ stdenv.mkDerivation rec {
     install -D ./update/build/unix/update-release $out/bin/update
   '';
 
-  fixupPhase = lib.optionalString stdenv.isDarwin ''
+  postFixup = lib.optionalString stdenv.isDarwin ''
     install_name_tool -change libcapstone.4.dylib ${capstone}/lib/libcapstone.4.dylib $out/bin/Tracy
   '';