unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: dan <i@dan.games>
To: 65106@debbugs.gnu.org
Cc: maxim.cournoyer@gmail.com
Subject: [bug#65106] [PATCH v2 2/2] gnu: Add tracy.
Date: Mon, 25 Sep 2023 01:14:00 +0800	[thread overview]
Message-ID: <20230924171400.7496-3-i@dan.games> (raw)
In-Reply-To: <20230924171400.7496-1-i@dan.games>

* 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





      parent reply	other threads:[~2023-09-24 17:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06  5:40 [bug#65106] [PATCH] gnu: Add tracy dan
2023-09-05 13:46 ` Maxim Cournoyer
2023-09-24 17:13 ` [bug#65106] [PATCH v2 0/2] gnu: Add tracy and tracy-wayland dan
2023-09-24 17:13   ` [bug#65106] [PATCH v2 1/2] gnu: Add tracy-wayland dan
2023-09-26 15:22     ` bug#65106: " Maxim Cournoyer
2023-09-24 17:14   ` dan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230924171400.7496-3-i@dan.games \
    --to=i@dan.games \
    --cc=65106@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).