summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan <nathan_mail@nborghese.com>2024-06-01 19:55:24 -0400
committerGuix Patches Tester <>2024-06-12 00:31:21 +0200
commit9f036359cd4c1015e7365051f0454c7cf8859902 (patch)
tree26b182d79cafb7b32e64da9333f0f182df03e2b3
parent9cc7fc6e79581becb6213103038c23b02ed0d374 (diff)
downloadguix-patches-issue-71109.tar
guix-patches-issue-71109.tar.gz
gnu: volk: Hard-code path of vulkan-loader for dynamic loadingissue-71109
Until now, we’d get: $ guix shell vulkan-tools -- vulkaninfo ERROR at /tmp/guix-build-vulkan-tools-1.3.280.0.drv-0/source/vulkaninfo/./vulkaninfo.h:412: Failed to initialize: Vulkan loader is not installed, not found, or failed to load. This patch fixes it and potentially for other programs as well. * gnu/packages/vulkan.scm (volk)[arguments]: use gexp. <#:phases>: Patch dlopen with libvulkan.so. [input]: Add vulkan-loader. Change-Id: I5ef0eb13d35e517b8947faddace641882a775b80 Co-authored-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/vulkan.scm16
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 25542c1e06..360dfa0e36 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -576,9 +576,19 @@ use the Vulkan API.")
"0x4jhc8n9c4k8svmmcaxxs613xbsav7wam94gacddlm738cwp13v"))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;no test
- #:configure-flags '("-DVOLK_INSTALL=ON" "-DVOLK_PULL_IN_VULKAN=ON")))
- (inputs (list vulkan-headers))
+ (list
+ #:tests? #f ;no test
+ #:configure-flags #~(list "-DVOLK_INSTALL=ON" "-DVOLK_PULL_IN_VULKAN=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-loader-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "volk.c"
+ (("dlopen\\(\"libvulkan.so")
+ (string-append "dlopen(\""
+ (search-input-file
+ inputs "/lib/libvulkan.so")))))))))
+ (inputs (list vulkan-headers vulkan-loader))
(synopsis "Meta loader for Vulkan API")
(description
"Volk is a meta-loader for Vulkan. It allows you to dynamically load