gnu: shaderc: Improve style.

* gnu/packages/vulkan.scm (shaderc)[arguments]: Use G-Expressions.

Change-Id: Ifa7b303c173a5093fa7733fa67e09eab1b39d8bd
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
This commit is contained in:
Cayetano Santos 2025-08-24 10:37:26 +02:00 committed by Maxim Cournoyer
parent b5838bd0a9
commit d712eab046
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -507,42 +507,41 @@ API.")
"0w1mj5b3n6kp0brqindb7fppvllzlywkdk1zglkbj3bw8k0795mb")))) "0w1mj5b3n6kp0brqindb7fppvllzlywkdk1zglkbj3bw8k0795mb"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
`(#:tests? #f ; We don't build the tests, see below. (list
;; FIXME: Skip most of the tests, because enabling system gtest breaks #:tests? #f ; We don't build the tests, see below.
;; the build: <https://github.com/google/shaderc/issues/470>. ;; FIXME: Skip most of the tests, because enabling system gtest breaks
#:configure-flags ;; the build: <https://github.com/google/shaderc/issues/470>.
(list "-DSHADERC_SKIP_TESTS=ON" #:configure-flags
;; The two flags are copied from: #~(list "-DSHADERC_SKIP_TESTS=ON"
;; https://sdk.lunarg.com/sdk/download/1.3.280.0/linux/config.json ;; The two flags are copied from:
"-DSHADERC_ENABLE_SHARED_CRT=ON" ;; https://sdk.lunarg.com/sdk/download/1.3.280.0/linux/config.json
"-DSHADERC_SKIP_COPYRIGHT_CHECK=ON" "-DSHADERC_ENABLE_SHARED_CRT=ON"
"-DPYTHON_EXECUTABLE=python3" "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON"
;; Note: despite the name, this just specifies the headers. "-DPYTHON_EXECUTABLE=python3"
(string-append "-Dglslang_SOURCE_DIR=" ;; Note: despite the name, this just specifies the headers.
(assoc-ref %build-inputs "glslang") "/include/glslang")) (string-append "-Dglslang_SOURCE_DIR="
#:phases #$(this-package-input "glslang")
(modify-phases %standard-phases "/include/glslang"))
(add-after 'unpack 'do-not-look-for-bundled-sources #:phases
(lambda _ #~(modify-phases %standard-phases
(substitute* "CMakeLists.txt" (add-after 'unpack 'do-not-look-for-bundled-sources
(("add_subdirectory\\(third_party\\)") (lambda _
"")) (substitute* "CMakeLists.txt"
(("add_subdirectory\\(third_party\\)")
(substitute* "glslc/test/CMakeLists.txt" ""))
(("\\$<TARGET_FILE:spirv-dis>") (substitute* "glslc/test/CMakeLists.txt"
(which "spirv-dis"))) (("\\$<TARGET_FILE:spirv-dis>")
(which "spirv-dis")))
;; Do not attempt to use git to encode version information. ;; Do not attempt to use git to encode version information.
(substitute* "glslc/CMakeLists.txt" (substitute* "glslc/CMakeLists.txt"
(("add_dependencies\\(glslc_exe build-version\\)") (("add_dependencies\\(glslc_exe build-version\\)")
"")) ""))
(call-with-output-file "glslc/src/build-version.inc" (call-with-output-file "glslc/src/build-version.inc"
(lambda (port) (lambda (port)
(format port "\"~a\"\n\"~a\"\n\"~a\"~%" (format port "\"~a\"\n\"~a\"\n\"~a\"~%"
,version #$version
,(package-version spirv-tools) #$(package-version spirv-tools)
,(package-version glslang)))) #$(package-version glslang)))))))))
#t)))))
(inputs (inputs
(list glslang spirv-headers spirv-tools)) (list glslang spirv-headers spirv-tools))
(native-inputs (native-inputs