[PATCH 0/3] Add go-1.18.1

OpenSubmitted by Pier-Hugues Pellerin.
Details
One participant
  • Pier-Hugues Pellerin
Owner
unassigned
Severity
normal
P
P
Pier-Hugues Pellerin wrote on 1 May 20:55 +0200
(address . guix-patches@gnu.org)(name . Pier-Hugues Pellerin)(address . ph@heykimo.com)
20220501185555.26169-1-ph@heykimo.com
Hello,

I've added a go 1.18 package, still learning the build and all the quirks. So far I've did
the following in multiple commits, I hope it's okay:

- I've created a new go-1.18 package inheriting from 1.17.

This mean that the build use the same logic as before, use go 1.4 for the build toolchain.
and fallback on previous version 1.17

- I've changed the Homepage of the Go 1.18 package.

Guix lint complained about a change in the URL, so I've updated it to https://go.dev.

- 1.17 is here to stay for some time

I've looked at the toolchain of the Go language, today the minimun version of go require to build is
1.4, but this will be updated to 1.17 for 1.19[0].

- Adding go-next to point to go 1.18.

Following a discussion on email I've added `go-next` that currently point to 1.18,
I've copied the strategy from the emacs' package that also define an emacs-next
package to allow users to try out the latest version. I am not sure this was the right way
to do it. I

- Made go point to 1.18 as the default version


Following Ludovic advice I've made the default go point to 1.18, so we can create a testing branch and see
what is failling.

Thanks everyone

ph



Pier-Hugues Pellerin (3):
gnu: Add go-1.18.
gnu: Add go-next.
gnu: go: Update to go-1.18

gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

--
2.35.1
P
P
Pier-Hugues Pellerin wrote on 1 May 20:57 +0200
[PATCH 1/3] gnu: Add go-1.18.
(address . 55210@debbugs.gnu.org)(name . Pier-Hugues Pellerin)(address . ph@heykimo.com)
20220501185747.26508-1-ph@heykimo.com
* gnu/packages/golang.scm (go-1.18): Update to Go 1.18.1
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 820e6b54ab..829db82ea2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -839,6 +839,31 @@ (define-public go-1.17
        (package-native-inputs go-1.16)))))
 
 (define-public go go-1.17)
+(define-public go-1.18
+  (package
+    (inherit go-1.17)
+    (name "go")
+    (version "1.18.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
+                "1ywx90w1jvmp6nif00kjn4ksn09a0wvfp2kww3gxk02s1wi23zw5"))))
+    (inputs (if (not (target-arm?))
+                (alist-delete "gcc:lib"
+                              (package-inputs go-1.17))
+                (package-inputs go-1.17)))
+    (native-inputs (if (not (member (%current-system)
+                                    (package-supported-systems go-1.4)))
+                       (alist-replace "go"
+                                      (list go-1.17)
+                                      (package-native-inputs go-1.17))
+                       (package-native-inputs go-1.17)))
+    (home-page "https://go.dev")))
 
 (define-public (make-go-std go)
   "Return a package which builds the standard library for Go compiler GO."
-- 
2.35.1
P
P
Pier-Hugues Pellerin wrote on 1 May 20:58 +0200
[PATCH 2/3] gnu: Add go-next.
(address . 55210@debbugs.gnu.org)(name . Pier-Hugues Pellerin)(address . ph@heykimo.com)
20220501185832.26618-1-ph@heykimo.com
* gnu/packages/golang.scm (go-next): Add go-next that point to the next
version of Go, allowing to use the latest version without rebuilding everything.
---
gnu/packages/golang.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 829db82ea2..a9091b67a0 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -865,6 +865,11 @@ (define-public go-1.18
                        (package-native-inputs go-1.17)))
     (home-page "https://go.dev")))
 
+(define-public go-next
+  (package
+    (inherit go-1.18)
+    (name "go-next")))
+
 (define-public (make-go-std go)
   "Return a package which builds the standard library for Go compiler GO."
   (package
-- 
2.35.1
P
P
Pier-Hugues Pellerin wrote on 1 May 20:58 +0200
[PATCH 3/3] gnu: go: Update to go-1.18
(address . 55210@debbugs.gnu.org)(name . Pier-Hugues Pellerin)(address . ph@heykimo.com)
20220501185842.26643-1-ph@heykimo.com
* gnu/packages/golang.scm go: Update to go-1.18.
---
gnu/packages/golang.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a9091b67a0..95ac6546e7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -870,6 +870,8 @@ (define-public go-next
     (inherit go-1.18)
     (name "go-next")))
 
+(define-public go go-1.18)
+
 (define-public (make-go-std go)
   "Return a package which builds the standard library for Go compiler GO."
   (package
-- 
2.35.1
?