GNU bug report logs - #66413
[PATCH] gnu: mangohud: Update to 0.7.0.

Previous Next

Package: guix-patches;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Mon, 9 Oct 2023 04:25:02 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66413 in the body.
You can then email your comments to 66413 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66413; Package guix-patches. (Mon, 09 Oct 2023 04:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Kehayias <john.kehayias <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 09 Oct 2023 04:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: guix-patches <at> gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>
Subject: [PATCH] gnu: mangohud: Update to 0.7.0.
Date: Mon, 09 Oct 2023 04:23:30 +0000
* gnu/packages/graphics.scm (mangohud): Update to 0.7.0.
[arguments]<#:configure-flags>: Remove "-Duse_system_vulkan=enabled" and
"-Dvulkan_datadir" from as they are no longer supported.
<#:phases>: Add 'unbundle-vulkan-headers'.
[inputs]: Add nlohmann-json.  Replace vulkan-headers with origin for
vulkan-headers <at> 1.2.158.
[native-inputs]: Add git-minimal.
---

Here is a patch to update mangohud to the latest version. I've used
guix lint, built it locally, and also tested it works with vulkan. The
major change here is to manually unbundle vulkan-headers as that is no
longer a configurable option. To do this a bare origin is used to get
the source for the expected vulkan version (a specific older one is
required) and the build patched to use this.

Thanks!
John


 gnu/packages/graphics.scm | 46 +++++++++++++++++++++++++++++----------
 1 file changed, 35 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 9362666274..c5be44b1e4 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -28,7 +28,7 @@
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz <at> elenq.tech>
 ;;; Copyright © 2021, 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2022 Michael Rohleder <mike <at> rohleder.de>
-;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
+;;; Copyright © 2022, 2023 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp <at> gmail.com>
 ;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
@@ -121,6 +121,7 @@ (define-module (gnu packages graphics)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages toolkits)
   #:use-module (gnu packages upnp)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xiph)
@@ -1038,7 +1039,7 @@ (define-public alembic
 (define-public mangohud
   (package
     (name "mangohud")
-    (version "0.6.8")
+    (version "0.7.0")
     (source
      (origin
        (method git-fetch)
@@ -1047,21 +1048,18 @@ (define-public mangohud
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "19dp8l5njzl9xah0bhwlkl39vc8w2rnpvpdrhgaz3hnhz8b0r5df"))))
+        (base32 "1m4a2dqzqdhk9w1gvzppid7k0fxvplh5hmivvj9sda529s1g24rc"))))
     (build-system meson-build-system)
     (arguments
      (list
       #:build-type "release"
       #:configure-flags
-      #~(list "-Duse_system_vulkan=enabled"
-              "-Duse_system_spdlog=enabled"
+      #~(list "-Duse_system_spdlog=enabled"
               "-Dwith_xnvctrl=disabled"
-              "-Dappend_libdir_mangohud=false"
-              (string-append "-Dvulkan_datadir="
-                             #$(this-package-input "vulkan-headers") "/share"))
+              "-Dappend_libdir_mangohud=false")
       #:phases
       #~(modify-phases %standard-phases
-          ;; Mangohud tries to build the imgui library as a meson submodule,
+          ;; MangoHud tries to build the imgui library as a meson submodule,
           ;; so we change the dependency to the imgui input instead.
           (add-after 'unpack 'unbundle-imgui
             (lambda _
@@ -1073,6 +1071,23 @@ (define-public mangohud
                   "declare_dependency(dependencies: "
                   "cpp.find_library('imgui'), include_directories: '"
                   #$(this-package-input "imgui") "/include/imgui')")))))
+          ;; Likewise, MangoHud bundles a Vulkan headers submodule to use a
+          ;; specific version, which we provide as an input and adjust the
+          ;; build accordingly.
+          (add-after 'unbundle-imgui 'unbundle-vulkan-headers
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "meson.build"
+                (("vkh_sp = .*")
+                 "")
+                (("vkh_sp.get_variable\\('vulkan_api_xml'\\)")
+                 (string-append "files('"
+                                (search-input-file inputs "registry/vk.xml")
+                                "')"))
+                (("dep_vulkan = .*")
+                 ""))
+              (substitute* "src/meson.build"
+                (("dep_vulkan,")
+                 ""))))
           (add-after 'unpack 'patch-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/meson.build"
@@ -1098,11 +1113,20 @@ (define-public mangohud
            libx11
            mesa
            mesa-utils
+           nlohmann-json
            python-mako
            spdlog
-           vulkan-headers
+           (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/KhronosGroup/Vulkan-Headers")
+                   (commit "v1.2.158")))
+             (file-name (git-file-name "vulkan" "v1.2.158"))
+             (sha256
+              (base32
+               "0jvaqj87792yccpr290djb18pqaisspq9dw6bqim6mrhfgda9v76")))
            vulkan-loader))
-    (native-inputs (list pkg-config python))
+    (native-inputs (list git-minimal 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

base-commit: 321979a15317eaf93b15e9cca30d328d39cca4b1
--
2.41.0






Information forwarded to guix-patches <at> gnu.org:
bug#66413; Package guix-patches. (Sat, 14 Oct 2023 20:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 66413 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: 66413 <at> debbugs.gnu.org
Subject: Re: [bug#66413] [PATCH] gnu: mangohud: Update to 0.7.0.
Date: Sat, 14 Oct 2023 22:25:19 +0200
John Kehayias <john.kehayias <at> protonmail.com> skribis:

> * gnu/packages/graphics.scm (mangohud): Update to 0.7.0.
> [arguments]<#:configure-flags>: Remove "-Duse_system_vulkan=enabled" and
> "-Dvulkan_datadir" from as they are no longer supported.
> <#:phases>: Add 'unbundle-vulkan-headers'.
> [inputs]: Add nlohmann-json.  Replace vulkan-headers with origin for
> vulkan-headers <at> 1.2.158.
> [native-inputs]: Add git-minimal.

[...]

> +    (native-inputs (list git-minimal pkg-config python))
                            ^
Should be ‘git-minimal/pinned’ to avoid unnecessary rebuilds.

Otherwise LGTM and to qa.guix!

Thanks,
Ludo’.




Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Sat, 14 Oct 2023 20:56:01 GMT) Full text and rfc822 format available.

Notification sent to John Kehayias <john.kehayias <at> protonmail.com>:
bug acknowledged by developer. (Sat, 14 Oct 2023 20:56:02 GMT) Full text and rfc822 format available.

Message #13 received at 66413-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 66413-done <at> debbugs.gnu.org
Subject: Re: [bug#66413] [PATCH] gnu: mangohud: Update to 0.7.0.
Date: Sat, 14 Oct 2023 20:55:08 +0000
On Sat, Oct 14, 2023 at 10:25 PM, Ludovic Courtès wrote:

> John Kehayias <john.kehayias <at> protonmail.com> skribis:
>
>> * gnu/packages/graphics.scm (mangohud): Update to 0.7.0.
>> [arguments]<#:configure-flags>: Remove "-Duse_system_vulkan=enabled" and
>> "-Dvulkan_datadir" from as they are no longer supported.
>> <#:phases>: Add 'unbundle-vulkan-headers'.
>> [inputs]: Add nlohmann-json.  Replace vulkan-headers with origin for
>> vulkan-headers <at> 1.2.158.
>> [native-inputs]: Add git-minimal.
>
> [...]
>
>> +    (native-inputs (list git-minimal pkg-config python))
>                             ^
> Should be ‘git-minimal/pinned’ to avoid unnecessary rebuilds.
>

Ah, thanks!

> Otherwise LGTM and to qa.guix!
>
> Thanks,
> Ludo’.

Made that change, updated commit message accordingly, and pushed as 5a6b1a55869c488c0da15b4a7a8176d616ec92f8.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Nov 2023 12:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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