Subject: [bug#60571] [PATCH v2 1/4] gnu: Add spirv-headers-for-skia.

From: Nicolas Graves <[email-masked]>
Date: Sun, 27 Aug 2023 14:53:39 +0200

* gnu/packages/vulkan.scm (spirv-headers-for-skia): New variable.
(%vulkan-sdk-skia-version): New variable.
---
 gnu/packages/vulkan.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 1d2e58f1d4..da83417dba 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -46,6 +46,9 @@ (define-module (gnu packages vulkan)
 
 ;; Note: Remember to change vulkan-loader version when bumping this.
 (define %vulkan-sdk-version "sdk-1.3.231.1")
+;; Note: The current skia version is lagging behind vulkan's.
+;; Use this variable until it has catched up.
+(define %vulkan-sdk-skia-version "sdk-1.2.198.0")
 
 (define-public spirv-headers
   (package
@@ -79,6 +82,21 @@ (define-public spirv-headers
               (string-append "https://github.com/KhronosGroup/SPIRV-Headers/blob/"
                              version "/LICENSE")))))
 
+(define-public spirv-headers-for-skia
+  (package
+    (inherit spirv-headers)
+    (name "spirv-headers-for-skia")
+    (version %vulkan-sdk-skia-version)
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0v6ycgfxh9d2gzhxrnxgrn5gyg2cshg55767qdg46px8412j5lbi"))))))
+
 (define-public spirv-tools
   (package
     (name "spirv-tools")

base-commit: 5c1be661b988018e3de32a0ce529e1b58209ebb6
-- 
2.41.0