* gnu/packages/gl.scm (mesa) [native-search-paths]: Export XDG_DATA_DIRS.
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(-)
Toggle diff (29 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index b53b42a9ba..583cd5a945 100644
@@ -18,6 +18,7 @@
;;; Copyright © 2021, 2022, 2023 John Kehayias <email@example.com>
;;; Copyright © 2022 Petr Hodina <firstname.lastname@example.org>
;;; Copyright © 2023 Kaelyn Takata <email@example.com>
+;;; Copyright © 2023 dan <firstname.lastname@example.org>
;;; This file is part of GNU Guix.
@@ -518,7 +519,11 @@ (define-public mesa
;; Ensure the Mesa VDPAU drivers can be found.
- (files '("lib/vdpau")))))
+ (files '("lib/vdpau")))
+ ;; Ensure the Vulkan drivers can be found by Vulkan loader.
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan