Subject: [PATCH 2/4] gnu: Add spirv-tools-for-skia.

From: Nicolas Graves <[email-masked]>
Date: Thu, 5 Jan 2023 13:18:40 +0100

* gnu/packages/vulkan.scm (spirv-tools-for-skia): New variable.
---
 gnu/packages/vulkan.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 8895d8a5cf..231fa2e281 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -120,6 +120,31 @@ (define-public spirv-tools
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-tools-for-skia
+  (let ((commit "4b092d2ab81854e61632bdd1e658907f0071c37e")
+        (revision "0"))
+    (package
+      (inherit spirv-tools)
+      (name "spirv-tools-for-skia")
+      (version "skia")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0dqdybkxkwjiwwhxf0p3p1408wrqvwysymq7c9rzd1a2220y6lry"))))
+      (inputs (list spirv-headers-for-skia))
+      (native-inputs (list pkg-config python-wrapper))
+      (arguments
+       (list
+        #:configure-flags `(list "-DBUILD_SHARED_LIBS=ON"
+                                 (string-append
+                                  "-DSPIRV-Headers_SOURCE_DIR="
+                                  (assoc-ref %build-inputs "spirv-headers-for-skia"))))))))
+
 (define-public spirv-cross
   (package
     (name "spirv-cross")
-- 
2.38.1