diff mbox series

[bug#69461,mesa-updates,09/13] gnu: vulkan-tools: Update to vulkan-sdk-1.3.275.0.

Message ID 617d4147db2b9bb37b94514cb79aaebf1fb5d5d5.1709140055.git.i@dan.games
State New
Headers show
Series Update vulkan-sdk and add dirctx-shader-compiler. | expand

Commit Message

dan Feb. 28, 2024, 5:31 p.m. UTC
* gnu/packages/vulkan.scm (vulkan-tools): Update to vulkan-sdk-1.3.275.0.
  [arguments]: Turn on tests.
  [arguments]<:#configure-flags>: Remove GLSLANG_INSTALL_DIR.
  [native-inputs]: Add googletest.

Change-Id: I607c7ce414f8c0c8ee25ad0701d91771f5c4a7fc
---
 gnu/packages/vulkan.scm | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 807b0be8af..82bc87dcd6 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -316,20 +316,24 @@  (define-public vulkan-tools
              (url "https://github.com/KhronosGroup/Vulkan-Tools")
              (commit version)))
        (file-name (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "tests/icd/mock_icd_tests.cpp"
+                    ;; Disable driver info test since it relies on git branch info
+                    (("ASSERT_EQ\\(std::string\\(driver_properties\\.driverInfo\\)")
+                     "// ASSERT_EQ(std::string(driver_properties.driverInfo)")))
        (sha256
-        (base32
-         "0jzwjfx4c7y15wkwfhhc64rzljpi47bxrm5jw5blfsqjh8zsd27a"))))
+        (base32 "0g604gzzlqibnkjd18iss6iwn852nnsfrrgfnwn97khpr0xk1h6j"))))
     (build-system cmake-build-system)
-    (inputs
-     (list glslang libxrandr vulkan-loader wayland wayland-protocols))
-    (native-inputs
-     (list pkg-config python vulkan-headers))
+    (inputs (list glslang libxrandr vulkan-loader wayland wayland-protocols))
+    (native-inputs (list googletest pkg-config python volk vulkan-headers))
     (arguments
-     `(#:tests? #f                      ;no tests
-       #:configure-flags (list (string-append "-DGLSLANG_INSTALL_DIR="
-                               (assoc-ref %build-inputs "glslang")))))
-    (home-page
-     "https://github.com/KhronosGroup/Vulkan-Tools")
+     `(#:configure-flags (list "-DBUILD_TESTS=ON")
+       #:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "./tests/vulkan_tools_tests")))))))
+    (home-page "https://github.com/KhronosGroup/Vulkan-Tools")
     (synopsis "Tools and utilities for Vulkan")
     (description
      "Vulkan-Tools provides tools and utilities that can assist development by