From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 58887@debbugs.gnu.org
Subject: [bug#58887] [PATCH][staging] gnu: vulkan-loader: Add native-search-paths field.
Date: Sun, 30 Oct 2022 13:41:38 +0800 [thread overview]
Message-ID: <y765yg1hnql.wl-hako@ultrarare.space> (raw)
* gnu/packages/vulkan.scm (vulkan-loader): Add native-search-paths field.
[source]: Change ICD and implicit layers looking up behaviour via snippet.
---
gnu/packages/vulkan.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index f5c619a2b2..1371860583 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -215,6 +215,22 @@ (define-public vulkan-loader
(url "https://github.com/KhronosGroup/Vulkan-Loader")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "loader/loader.c"
+ ;; v1.3.207-
+ (("VK_ICD_FILENAMES_ENV_VAR, NULL")
+ "\"VK_ICD_PATH\", override_paths")
+ (("false, NULL, NULL")
+ "false, \"VK_ILAYER_PATH\", override_paths")
+ ;; v1.3.207+
+ (("VK_ICD_FILENAMES_ENV_VAR")
+ "\"VK_ICD_PATH\"")
+ (("relative_location = VK_ILAYERS_INFO_RELATIVE_DIR;" all)
+ (string-append "override_env = loader_secure_getenv"
+ "(\"VK_ILAYER_PATH\", inst);" all))
+ (("\\(IMPLICIT_LAYER, \\)NULL" m)
+ (string-append m "override_paths"))))
(sha256
(base32
"15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv"))))
@@ -251,6 +267,13 @@ (define-public vulkan-loader
("wayland" ,wayland)))
(inputs
(list vulkan-headers))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "VK_ICD_PATH")
+ (files '("share/vulkan/icd.d")))
+ (search-path-specification
+ (variable "VK_ILAYER_PATH")
+ (files '("share/vulkan/implicit_layer.d")))))
(home-page
"https://github.com/KhronosGroup/Vulkan-Loader")
(synopsis "Khronos official ICD loader and validation layers for Vulkan")
base-commit: 63bf06013820aa26aca7dc8f18cb79403b94e9a5
--
2.38.0
next reply other threads:[~2022-10-30 5:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 5:41 Hilton Chain via Guix-patches via [this message]
2022-12-01 15:49 ` [bug#58887] [PATCH][staging] gnu: vulkan-loader: Add native-search-paths field Ludovic Courtès
2022-12-23 7:53 ` Hilton Chain via Guix-patches via
2023-06-18 16:31 ` Kaelyn via Guix-patches via
2023-06-19 6:14 ` bug#58887: " Hilton Chain 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=y765yg1hnql.wl-hako@ultrarare.space \
--to=guix-patches@gnu.org \
--cc=58887@debbugs.gnu.org \
--cc=hako@ultrarare.space \
/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).