unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: dan <i@dan.games>
To: 65155@debbugs.gnu.org
Subject: [bug#65155] [PATCH] gnu: mesa: Add native-search-paths.
Date: Wed,  9 Aug 2023 02:08:49 +0800	[thread overview]
Message-ID: <20230808180851.32652-1-i@dan.games> (raw)

* gnu/packages/gl.scm (mesa) [native-search-paths]: Export XDG_DATA_DIRS.

According to
https://vulkan.lunarg.com/doc/view/1.3.231.1/linux/loader_and_layer_interface.html,
Vulkan loader search for manifest files in several directories.  Some of them
are in the $HOME directory, some of them are set during compile-time.  We
don't raelly want vulkan-loader to depend on mesa during compile-time, since
we couldn't assume that mesa is the only package providing Vulkan drivers.
Thus, it's better for us to export XDG_DATA_DIRS in mesa, so that when both
packages are installed, Vulkan loader could find the corresponding Vulkan
drivers by environment varaible.

---
 gnu/packages/gl.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index b53b42a9ba..583cd5a945 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2021, 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
+;;; Copyright © 2023 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -518,7 +519,11 @@ (define-public mesa
             ;; Ensure the Mesa VDPAU drivers can be found.
             (variable "VDPAU_DRIVER_PATH")
             (separator #f)
-            (files '("lib/vdpau")))))
+            (files '("lib/vdpau")))
+           (search-path-specification
+            ;; Ensure the Vulkan drivers can be found by Vulkan loader.
+            (variable "XDG_DATA_DIRS")
+            (files '("share")))))
     (home-page "https://mesa3d.org/")
     (synopsis "OpenGL and Vulkan implementations")
     (description "Mesa is a free implementation of the OpenGL and Vulkan

base-commit: 4547bc6fa3142dca77f7fc912368aeff31bd6e53
-- 
2.41.0





             reply	other threads:[~2023-08-08 18:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 18:08 dan [this message]
2023-11-28  5:54 ` [bug#65155] [PATCH] gnu: mesa: Add native-search-paths John Kehayias via Guix-patches via
2024-02-11 17:36   ` David Elsing
2024-03-06  5:55     ` John Kehayias via Guix-patches via
2024-03-06  6:59       ` dan
2024-03-25  1:05         ` John Kehayias via Guix-patches via
2024-04-18  4:46           ` bug#65155: " 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=20230808180851.32652-1-i@dan.games \
    --to=i@dan.games \
    --cc=65155@debbugs.gnu.org \
    /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).