Subject: [PATCH] gnu: Add go-1.22.
From: Rodion Goritskov <[email-masked]>
To: [email-masked]
Cc: Rodion Goritskov <[email-masked]>
Date: Sat, 30 Mar 2024 22:22:21 +0400
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/golang.scm (go-1.22): New variable.

Change-Id: I3a5e4ddf28471602344cd042820b3d23f6113fa9
---
 gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 385da42eda..f0940f4586 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1114,6 +1114,31 @@ (define-public go-1.21
                      ("api"          "share/go/api"        ,tests)
                      ("test"         "share/go/test"       ,tests))))))))))))
 
+(define-public go-1.22
+  (package
+    (inherit go-1.21)
+    (name "go")
+    (version "1.22.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/golang/go")
+             (commit (string-append "go" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "01zz8n5c32vympr2l9jdg5pzn63d3z28p0d4q6wmd0pr2jd3l3wn"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments go-1.21)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (delete 'unpatch-perl-shebangs)))))
+    (native-inputs
+     ;; Go 1.22 requires Go 1.20 or later as the bootstrap toolchain.
+     (alist-replace "go"
+                    (list go-1.21)
+                    (package-native-inputs go-1.21)))))
+
 (define-public go go-1.17)
 
 (define make-go-std
@@ -1157,6 +1182,7 @@ (define-public go-std-1.18 (make-go-std go-1.18))
 (define-public go-std-1.19 (make-go-std go-1.19))
 (define-public go-std-1.20 (make-go-std go-1.20))
 (define-public go-std-1.21 (make-go-std go-1.21))
+(define-public go-std-1.22 (make-go-std go-1.22))
 
 (define-public go-0xacab-org-leap-shapeshifter
   (let ((commit "0aa6226582efb8e563540ec1d3c5cfcd19200474")

base-commit: 350cdbe83819233b6db9fb1cfc797eaf80b0d168
prerequisite-patch-id: c54d19e7e00697430d955942249f8ac06a0d5e0d
-- 
2.41.0