unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: John Kehayias <john.kehayias@protonmail.com>
Cc: "53015-done@debbugs.gnu.org" <53015@debbugs.gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: [bug#53015] [PATCH v3] Add mangohud.
Date: Sat, 26 Feb 2022 21:31:55 -0500	[thread overview]
Message-ID: <87v8x1ujj8.fsf@gmail.com> (raw)
In-Reply-To: <An66NkD40n-mjbCw27e48uZ8CpGvOlLuIuETg6dbT5M5LJ4dytLBBpnmw_7hx5MEfIsJRcE2KSIP4O5EcapPOjBJQUbh5j6_rif9duxCnlY=@protonmail.com> (John Kehayias's message of "Sun, 27 Feb 2022 01:14:54 +0000")

Hi John,

John Kehayias <john.kehayias@protonmail.com> writes:

>>
>> Attached is an update to this patch series, reduced to just one
>> patch. This relies on the hwdata package added in
>> https://issues.guix.gnu.org/54069#2 and the update to imgui I sent
>> in https://issues.guix.gnu.org/54132
>>
>> With that, mangohud just uses imgui-1.86 (the newer version has a
>> breaking change). The modifications to the meson.build is handled in
>> a build phase substitute* rather than a patch, as it needs the imgui
>> location.
>>
>> I've checked this builds and works. Let me know if any other
>> modifications are needed, other than the hwdata and imgui fixes
>> referenced.
>>
>
> Attached is a revised patch to use the new hwdata package with inputs,
> so the correct input is now `(,hwdata "pci"). I checked that it
> applied and built on master.
>
> John

I took the freedom to make some cosmetic adjustments:

1. ordering of inputs
2. ordering of fields (match the conventions, such as the 'home-page'
field appearing before the synopsis)
3. indent some longer lines so they fit under 80 columns
4. normalize paths passed to search-input-file by stripping lead '/'.

like so:

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/graphics.scm
@@ -890,8 +890,7 @@ (define-public mangohud
               "-Dwith_xnvctrl=disabled"
               "-Dappend_libdir_mangohud=false"
               (string-append "-Dvulkan_datadir="
-                             #$(this-package-input "vulkan-headers")
-                             "/share"))
+                             #$(this-package-input "vulkan-headers") "/share"))
       #:phases
       #~(modify-phases %standard-phases
           ;; Mangohud tries to build the imgui library as a meson submodule,
@@ -902,9 +901,10 @@ (define-public mangohud
                 (("dearimgui_sp = .*")
                  "")
                 (("dearimgui_sp.get_variable\\('imgui_dep'\\)")
-                 (string-append "declare_dependency(dependencies: "
-                                "cpp.find_library('imgui'), include_directories: '"
-                                #$(this-package-input "imgui") "/include/imgui')")))))
+                 (string-append
+                  "declare_dependency(dependencies: "
+                  "cpp.find_library('imgui'), include_directories: '"
+                  #$(this-package-input "imgui") "/include/imgui')")))))
           (add-after 'unpack 'patch-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/meson.build"
@@ -912,15 +912,15 @@ (define-public mangohud
                  "lib"))
               (substitute* "src/loaders/loader_libdrm.cpp"
                 (("libdrm.so.2")
-                 (search-input-file inputs "/lib/libdrm.so.2"))
+                 (search-input-file inputs "lib/libdrm.so.2"))
                 (("libdrm_amdgpu.so.1")
-                 (search-input-file inputs "/lib/libdrm_amdgpu.so.1")))
+                 (search-input-file inputs "lib/libdrm_amdgpu.so.1")))
               (substitute* "src/overlay.cpp"
                 (("glxinfo")
-                 (search-input-file inputs "/bin/glxinfo")))
+                 (search-input-file inputs "bin/glxinfo")))
               (substitute* "src/loaders/loader_x11.cpp"
                 (("libX11.so.6")
-                 (search-input-file inputs "/lib/libX11.so.6")))
+                 (search-input-file inputs "lib/libX11.so.6")))
               (substitute* "src/pci_ids.cpp"
                 (("/usr/share/hwdata/pci.ids")
                  (search-input-file inputs "share/hwdata/pci.ids")))
@@ -932,21 +932,19 @@ (define-public mangohud
            glslang
            `(,hwdata "pci")
            imgui-1.86
-           mesa
-           mesa-utils
            libdrm
            libx11
+           mesa
+           mesa-utils
            python-mako
            spdlog
-           vulkan-loader
-           vulkan-headers))
-    (native-inputs
-     (list pkg-config python))
-    (synopsis "Vulkan and OpenGL overlay for monitoring performance and hardware")
-    (description
-     "MangoHud is a Vulkan and OpenGL overlay for monitoring frames per second (FPS),
-temperatures, CPU/GPU load and more.")
+           vulkan-headers
+           vulkan-loader))
+    (native-inputs (list pkg-config python))
     (home-page "https://github.com/flightlessmango/MangoHud/")
+    (synopsis "Vulkan and OpenGL overlay for monitoring performance and hardware")
+    (description "MangoHud is a Vulkan and OpenGL overlay for monitoring
+frames per second (FPS), temperatures, CPU/GPU load and more.")
     (license license:expat)))
--8<---------------cut here---------------end--------------->8---

And pushed 31ecd80db7.

Thank you!

Closing.

Maxim




  reply	other threads:[~2022-02-27  2:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 22:20 [bug#53015] [PATCH 0/4] Add mangohud (update dear-imgui) John Kehayias via Guix-patches via
2022-01-04 22:23 ` [bug#53015] [PATCH 1/4] gnu: Add pciutils-no-zlib John Kehayias via Guix-patches via
2022-01-04 22:24 ` [bug#53015] [PATCH 2/4] gnu: spdlog: Build with '-fpic' John Kehayias via Guix-patches via
2022-01-22  5:06   ` John Kehayias via Guix-patches via
2022-02-21  4:11     ` [bug#53015] [PATCH 0/4] Add mangohud (update dear-imgui) Maxim Cournoyer
2022-02-21 16:36       ` John Kehayias via Guix-patches via
2022-02-21 17:31         ` Maxim Cournoyer
2022-01-04 22:25 ` [bug#53015] [PATCH 3/4] gnu: dear-imgui: Update to 1.81, hide version 1.79 John Kehayias via Guix-patches via
2022-01-04 22:34 ` [bug#53015] [PATCH 4/4] gnu: Add mangohud John Kehayias via Guix-patches via
2022-02-16  1:48 ` [bug#53015] [PATCH 0/4] Add mangohud (update dear-imgui) John Kehayias via Guix-patches via
2022-02-23 22:35 ` [bug#53015] [PATCH v2] Add mangohud John Kehayias via Guix-patches via
2022-02-27  1:14   ` [bug#53015] [PATCH v3] " John Kehayias via Guix-patches via
2022-02-27  2:31     ` Maxim Cournoyer [this message]
2022-02-27  4:31       ` John Kehayias via Guix-patches via
2022-03-02  1:37 ` [bug#53015] [PATCH 0/4] Add mangohud (update dear-imgui) Brendan Tildesley
2022-03-02  4:54   ` John Kehayias via Guix-patches via

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=87v8x1ujj8.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=53015@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=mail@nicolasgoaziou.fr \
    /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).