gnu: spirv-cross: Improve style.

* gnu/packages/vulkan.scm (spirv-cross)[arguments]: Use Gexp.
[native-inputs]: Remove python; add python-minimal.

Change-Id: Ia010d51736d099e4a0f983b79e2053bff6a63637
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
This commit is contained in:
Cayetano Santos 2025-08-08 09:54:27 +02:00 committed by John Kehayias
parent 7ff28b97bd
commit 2c8dfc38fc
No known key found for this signature in database
GPG key ID: 499097AE5EA815D9

View file

@ -132,30 +132,31 @@ parser,disassembler, validator, and optimizer for SPIR-V.")
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(;; Disable tests for now due to upstream issue hit when running (list
;; update-reference-shaders phase: ;; Disable tests for now due to upstream issue hit when running
;; <https://github.com/KhronosGroup/SPIRV-Tools/issues/5980>. ;; update-reference-shaders phase:
#:tests? #f ;; <https://github.com/KhronosGroup/SPIRV-Tools/issues/5980>.
#:configure-flags #:tests? #f
(list "-DSPIRV_CROSS_SHARED=YES") #:configure-flags
#:phases #~(list "-DSPIRV_CROSS_SHARED=YES")
(modify-phases %standard-phases #:phases
(add-after 'unpack 'fix-tests-to-find-deps #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'fix-tests-to-find-deps
(substitute* "CMakeLists.txt" (lambda* (#:key inputs #:allow-other-keys)
(("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin") (substitute* "CMakeLists.txt"
(string-append (assoc-ref inputs "glslang") "/bin"))) (("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin")
(substitute* "CMakeLists.txt" (string-append (assoc-ref inputs "glslang") "/bin")))
(("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin") (substitute* "CMakeLists.txt"
(string-append (assoc-ref inputs "spirv-tools") "/bin"))))) (("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin")
(add-before 'check 'update-reference-shaders (string-append (assoc-ref inputs "spirv-tools") "/bin")))))
(lambda* (#:key tests? #:allow-other-keys) (add-before 'check 'update-reference-shaders
(when tests? (lambda* (#:key tests? #:allow-other-keys)
(with-directory-excursion "../source" (when tests?
(invoke "./update_test_shaders.sh")))))))) (with-directory-excursion "../source"
(invoke "./update_test_shaders.sh"))))))))
(inputs (inputs
(list glslang spirv-headers spirv-tools)) (list glslang spirv-headers spirv-tools))
(native-inputs (list python)) (native-inputs (list python-minimal))
(home-page "https://github.com/KhronosGroup/SPIRV-Cross") (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
(synopsis "Parser for and converter of SPIR-V to other shader languages") (synopsis "Parser for and converter of SPIR-V to other shader languages")
(description (description