aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan <nathan_mail@nborghese.com>2024-06-01 21:14:13 -0400
committerJohn Kehayias <john.kehayias@protonmail.com>2024-11-05 11:56:23 -0500
commitf0bf6994b036259af2bb604a8c1aef21becd1d29 (patch)
tree5218d46e7de5b222e6406a9b74077109336394fa
parent72535be25ceaf11814204e57ad832d24c88e2d3b (diff)
downloadguix-f0bf6994b036259af2bb604a8c1aef21becd1d29.tar.gz
guix-f0bf6994b036259af2bb604a8c1aef21becd1d29.zip
gnu: vulkan-headers: Hard-code libvulkan.so file name.
* gnu/packages/vulkan.scm (vulkan-headers): Rename to… (vulkan-headers/no-loader): … this. (vulkan-headers): New variable. (vulkan-loader): Depend on ‘vulkan-headers/no-loader’. Change-Id: Ic674a4d965d8049e388d75137111ed0253ca3b18 Co-authored-by: Ludovic Courtès <ludo@gnu.org> Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
-rw-r--r--gnu/packages/vulkan.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 1b69da1a4d..e76455a835 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -299,7 +299,8 @@ Enhanced Subpixel Morphological Anti-Aliasing
(license (list license:bsd-3 ; src/reshade/LICENSE.md
license:zlib)))) ; LICENSE
-(define-public vulkan-headers
+;; vulkan-headers, but without the path to vulkan-loader patched in.
+(define-public vulkan-headers/no-loader
(package
(name "vulkan-headers")
(version "1.3.280.0")
@@ -316,6 +317,7 @@ Enhanced Subpixel Morphological Anti-Aliasing
(build-system cmake-build-system)
(arguments
`(#:tests? #f)) ; No tests.
+ (properties '((hidden? . #t)))
(home-page
"https://github.com/KhronosGroup/Vulkan-Headers")
(synopsis "Vulkan Header files and API registry")
@@ -323,6 +325,25 @@ Enhanced Subpixel Morphological Anti-Aliasing
"Vulkan-Headers contains header files and API registry for Vulkan.")
(license (list license:asl2.0)))) ;LICENSE.txt
+(define-public vulkan-headers
+ (package
+ (inherit vulkan-headers/no-loader)
+ (arguments
+ (substitute-keyword-arguments (package-arguments vulkan-headers/no-loader)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch-libvulkan-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "include/vulkan/vulkan.hpp"
+ (("dlopen\\( \"libvulkan.so")
+ (string-append "dlopen(\""
+ (search-input-file
+ inputs "/lib/libvulkan.so"))))))))))
+ (inputs
+ (modify-inputs (package-inputs vulkan-headers/no-loader)
+ (prepend vulkan-loader)))
+ (properties '())))
+
(define-public vulkan-loader
(package
(name "vulkan-loader")
@@ -383,7 +404,7 @@ Enhanced Subpixel Morphological Anti-Aliasing
python
wayland))
(inputs
- (list vulkan-headers libxrandr))
+ (list vulkan-headers/no-loader libxrandr))
(native-search-paths
(list (search-path-specification
(variable "XDG_DATA_DIRS")
u/packages/qt.scm (qtwebengine-5)[inputs]: Likewise. Marius Bakke