Subject: [bug#77064] [PATCH] Add ZLS 0.14 & dependencies

From: Joshua Clark <[email-masked]>
Date: Sun, 16 Mar 2025 17:01:59 -0700

---
 gnu/packages/zig-xyz.scm | 72 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index a76dbb0473..456487d4fe 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -188,6 +188,30 @@ (define-public zig-known-folders
       (home-page "https://github.com/ziglibs/known-folders")
       (license license:expat))))
 
+(define-public zig-known-folders-for-zig-0.14.0
+  (let ((commit "aa24df42183ad415d10bc0a33e6238c437fc0f59")
+        (revision "0"))
+    (package
+      (name "zig-known-folders")
+      (version (git-version "0.14.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ziglibs/known-folders")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1ilq3hqprrwpbz7ckp01g4ksl41jq57rd7zf622w3immy6apc8k2"))))
+      (build-system zig-build-system)
+      (arguments (list #:zig zig-0.14))
+      (synopsis "Zig library to access well-known folders")
+      (description
+       "This package provides a Zig library for accessing well-known folders
+across several operating systems.")
+      (home-page "https://github.com/ziglibs/known-folders")
+      (license license:expat))))
+
 (define-public zig-pixman
   (package
     (name "zig-pixman")
@@ -301,6 +325,29 @@ (define-public zig-xkbcommon
     (home-page "https://codeberg.org/ifreund/zig-xkbcommon")
     (license license:expat)))
 
+(define-public zig-lsp-codegen
+  (let ((commit "063a98c13a2293d8654086140813bdd1de6501bc")
+        (revision "0"))
+    (package
+      (name "zig-known-folders")
+      (version (git-version "0.1.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/zigtools/zig-lsp-codegen")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "041lk25x050pz7yc781fn8bfpzci4kdrz8mw69sjs2f5mpyn4d1b"))))
+      (build-system zig-build-system)
+      (arguments (list #:zig zig-0.14))
+      (synopsis "LSP codegen based on the MetaModel")
+      (description
+       "Generates std.json compatible Zig code based on the official LSP MetaModel")
+      (home-page "https://github.com/zigtools/zig-lsp-codegen")
+      (license license:expat))))
+
 (define-public zig-zls-0.10
   (package
     (name "zig-zls")
@@ -386,4 +433,29 @@ (define-public zig-zls-0.13
        (modify-inputs (package-native-inputs base)
          (replace "zig" zig-0.13))))))
 
+(define-public zig-zls-0.14
+  (let ((base zig-zls-0.13))
+    (package
+      (inherit base)
+      (name "zig-zls")
+      (version "0.14.0")
+      (source (origin
+                (inherit (package-source base))
+                (uri (git-reference
+                      (url "https://github.com/zigtools/zls")
+                      (commit version)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1al4ry22y56v1jbph3vb6la2ln8dxc8hb3g7byng6yf8czx2g4q3"))))
+      (build-system zig-build-system)
+      (arguments
+      (list #:zig (this-package-native-input "zig")
+            #:install-source? #f
+            #:zig-release-type "safe"))
+      (inputs (list zig-diffz zig-known-folders-for-zig-0.14.0 zig-lsp-codegen))
+      (native-inputs
+       (modify-inputs (package-native-inputs base)
+         (replace "zig" zig-0.14))))))
+
 (define-public zig-zls zig-zls-0.13)

base-commit: ccc9fd93c402a251bf53b25bd92be0a856f7999d
-- 
2.49.0