GNU bug report logs - #65106
[PATCH] gnu: Add tracy.

Previous Next

Package: guix-patches;

Reported by: dan <i <at> dan.games>

Date: Sun, 6 Aug 2023 05:42:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: dan <i <at> dan.games>
To: 65106 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com
Subject: [bug#65106] [PATCH v2 2/2] gnu: Add tracy.
Date: Mon, 25 Sep 2023 01:14:00 +0800
* gnu/packages/profiling.scm (tracy): New variable.
---
 gnu/packages/profiling.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/profiling.scm b/gnu/packages/profiling.scm
index af79488c30..5f5b4b07d0 100644
--- a/gnu/packages/profiling.scm
+++ b/gnu/packages/profiling.scm
@@ -438,3 +438,31 @@ (define-public tracy-wayland
      "A real time, nanosecond resolution, remote telemetry, hybrid frame and
 sampling profiler for games and other applications.")
     (license license:bsd-3)))
+
+(define-public tracy
+  (package
+    (inherit tracy-wayland)
+    (name "tracy")
+    (inputs (modify-inputs (package-inputs tracy-wayland)
+              (delete "libxkbcommon" "wayland")
+              (prepend glfw)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments tracy-wayland)
+       ((#:make-flags flags
+         #~'())
+        #~(append #$flags
+                  ;; The LEGACY flag indicate we want to build tracy with glfw
+                  (list "LEGACY=1")))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            ;; Tracy depends on glfw to load libGL.so, but glfw doesn't have
+            ;; mesa in its rpath.  Thus, we need to manually modify tracy's
+            ;; LD_LIBRARY_PATH.
+            (add-after 'install 'wrap-program
+              (lambda _
+                (let ((out (string-append #$output "/bin/tracy"))
+                      (mesa (string-append #$(this-package-input "mesa")
+                                           "/lib")))
+                  (wrap-program out
+                    `("LD_LIBRARY_PATH" ":" =
+                      (,mesa))))))))))))
-- 
2.41.0





This bug report was last modified 1 year and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.