From patchwork Mon Oct 9 04:23:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 54628 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AA36F27BBEA; Mon, 9 Oct 2023 05:25:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 56ABC27BBE9 for ; Mon, 9 Oct 2023 05:25:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qphoy-0003p7-QR; Mon, 09 Oct 2023 00:24:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qphow-0003oF-L9 for guix-patches@gnu.org; Mon, 09 Oct 2023 00:24:43 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qphow-0007wc-8B for guix-patches@gnu.org; Mon, 09 Oct 2023 00:24:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qphpG-0004lr-9q for guix-patches@gnu.org; Mon, 09 Oct 2023 00:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66413] [PATCH] gnu: mangohud: Update to 0.7.0. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 04:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66413 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66413@debbugs.gnu.org Cc: John Kehayias X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169682546118259 (code B ref -1); Mon, 09 Oct 2023 04:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Oct 2023 04:24:21 +0000 Received: from localhost ([127.0.0.1]:59007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qphoa-0004kR-LC for submit@debbugs.gnu.org; Mon, 09 Oct 2023 00:24:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qphoV-0004k6-4P for submit@debbugs.gnu.org; Mon, 09 Oct 2023 00:24:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpho5-0003l3-64 for guix-patches@gnu.org; Mon, 09 Oct 2023 00:23:49 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qphnz-0007o5-WA for guix-patches@gnu.org; Mon, 09 Oct 2023 00:23:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1696825421; x=1697084621; bh=prbOLfLyVkMz4YL9ojSKBLgXVJ7iOcUJjvib/zTi2VM=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=p3HgZqIl8+hHQ+ml5tadFWy4eC+LpOfW5m3gKzQcAzvLICWiZeNYbMxn3Wi1ZY4yi xUQHgrNS9iRsmpP0W6rULVIXMVO7IFXJTS4I1eu04TIAp2YBiNiO3Hq2pZuzqUS7We ruRxpTQ+SIpJJi+FWYhdmDDVSFjoyUCfbUcQ2/vcr/0mbuZVU0PWDBcv9Ei7HYQ/o+ ONxUnWuaXPSI1Fbd6G1oZZePT3yCsw0PCTex+/9VwdXSEWaa0DioZdID12uCAOIwzY FsjCm8v8wTekzFPJszFH8bAsqCLJuv8/R96XNxGgm86BvdGuvfHKgT8UworclYNo0c dDlTSP6Euagjg== Date: Mon, 09 Oct 2023 04:23:30 +0000 Message-ID: <94feda96cdbfe16512a664d66dd25290320f762e.1696825155.git.john.kehayias@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.131; envelope-from=john.kehayias@protonmail.com; helo=mail-40131.protonmail.ch X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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@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(-) base-commit: 321979a15317eaf93b15e9cca30d328d39cca4b1 -- 2.41.0 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 ;;; Copyright © 2021, 2022 Vinicius Monego ;;; Copyright © 2022 Michael Rohleder -;;; Copyright © 2022 John Kehayias +;;; Copyright © 2022, 2023 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Tobias Kortkamp ;;; Copyright © 2022 Paul A. Patience @@ -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