unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Updating from Go 1.17 to 1.18
@ 2022-04-08 19:45 Pier-Hugues Pellerin
  2022-04-10 20:45 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Pier-Hugues Pellerin @ 2022-04-08 19:45 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 473 bytes --]

Hello,

I am trying to update Go to 1.18, I do have a *working* patch that defines
a package that inherits from 1.17 and that adjusts the inputs. However, I
have a few questions:

1. Is inheriting the way to do that? The package's build system appears to
be the same from 1.17.
2. How can I rebuild dependents packages to ensure they are still building
correctly?
3. Anything I should look into or test more for these kinds of packages?

Thanks

-- 
ph,
http://heykimo.com

[-- Attachment #1.2: Type: text/html, Size: 769 bytes --]

[-- Attachment #2: go-1.18 --]
[-- Type: application/octet-stream, Size: 1687 bytes --]

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f3cc1bd6b8..225331ab97 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -33,7 +33,7 @@
 ;;; Copyright © 2021 Chadwain Holness <chadwainholness@gmail.com>
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
-;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
+;;; Copyright © 2022 Pier-Hugues Pellerin <ph@heykimo.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -838,7 +838,30 @@ (define-public go-1.17
        (alist-replace "go" (list go-1.16) (package-native-inputs go-1.16))
        (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")
+    (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
+         "1i4cn9p0viypnq3vn64zpi1rc8615cqhzay25hmy46n4r2mvhv3s"))))
+    (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)))))
+
+(define-public go go-1.18)
 
 (define-public (make-go-std go)
   "Return a package which builds the standard library for Go compiler GO."

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-01 19:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 19:45 Updating from Go 1.17 to 1.18 Pier-Hugues Pellerin
2022-04-10 20:45 ` Ludovic Courtès
2022-04-10 21:16   ` Pier-Hugues Pellerin
2022-04-20 23:36     ` Katherine Cox-Buday
2022-04-20 23:43       ` Pier-Hugues Pellerin
2022-04-21  0:24         ` Pier-Hugues Pellerin
2022-04-21 14:58           ` Katherine Cox-Buday
2022-05-01 19:07             ` Pier-Hugues Pellerin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).