diff options
Diffstat (limited to 'pkgs/development/tools/tracy/default.nix')
-rw-r--r-- | pkgs/development/tools/tracy/default.nix | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/pkgs/development/tools/tracy/default.nix b/pkgs/development/tools/tracy/default.nix index a5087b3b52c..724e74098de 100644 --- a/pkgs/development/tools/tracy/default.nix +++ b/pkgs/development/tools/tracy/default.nix @@ -1,25 +1,30 @@ -{ stdenv, lib, darwin, fetchFromGitHub, tbb, gtk2, glfw, pkgconfig, freetype, Carbon, AppKit, capstone }: +{ 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"; + version = "0.7.7"; src = fetchFromGitHub { owner = "wolfpld"; repo = "tracy"; rev = "v${version}"; - sha256 = "07cmz2w7iv10f9i9q3fhg80s6riy9bxnk9xvc3q4lw47mc150skp"; + sha256 = "sha256-jp+Geqk39ZPoe2KzUJJ0w5hvCnyUlHGwVKn73lJJt94="; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ glfw capstone ] ++ lib.optionals stdenv.isDarwin [ Carbon AppKit freetype ] - ++ lib.optionals stdenv.isLinux [ gtk2 tbb ]; + ++ lib.optionals stdenv.isLinux [ gtk3 tbb ]; 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,11 +40,15 @@ stdenv.mkDerivation rec { install -D ./update/build/unix/update-release $out/bin/update ''; - meta = with stdenv.lib; { - description = "A real time, nanosecond resolution, remote telemetry frame profiler for games and other applications."; + postFixup = lib.optionalString stdenv.isDarwin '' + install_name_tool -change libcapstone.4.dylib ${capstone}/lib/libcapstone.4.dylib $out/bin/Tracy + ''; + + meta = with lib; { + description = "A real time, nanosecond resolution, remote telemetry frame profiler for games and other applications"; homepage = "https://github.com/wolfpld/tracy"; platforms = platforms.linux ++ platforms.darwin; license = licenses.bsd3; - maintainers = with maintainers; [ mpickering ]; + maintainers = with maintainers; [ mpickering nagisa ]; }; } |