Subject: [bug#32768] [PATCH] gnu: go-1.11: Add New Version

From: Katherine Cox-Buday <[email-masked]>
Date: Fri, 21 Sep 2018 09:58:28 -0500

> I tested that some basic packages build within the go-build-system
> using Go 1.11 (several need to be updated to support Go 1.11,
> however).

Great to hear. I didn't think to do that, thanks!

> Okay, we can punt on this for now.

For future code spelunkers, I tried setting environmental variables in
the scripts pointing to glibc's lib path (and verified this was
correct), and also tried using cgo directives in the files. This
technique worked for resolving linux headers, but did not work for
resolving requisite libraries. I'm guessing this is because they try and
sandbox these scripts, but I'm not sure.

>> +           (replace 'set-bootstrap-variables
>> +             (lambda* (#:key outputs inputs #:allow-other-keys)
>> + ;; Tell the build system where to find the bootstrap Go.
>> +               (let ((go  (assoc-ref inputs "go")))
>> +                 (setenv "GOROOT_BOOTSTRAP" go)
>> +                 (setenv "GOGC" "400")
>> +                 ;; Go 1.10 tries to write to $HOME in a test
>> +                 (setenv "HOME" "/tmp")
>> +                 #t)))))))))
>
> This phase is identical to the one that would be inherited from Go
> 1.10,
> right?

Yes, thanks! Removed.

As an aside, this workflow is new to me. I'd greatly appreciate any
pointers on convention if anyone has any. I hope I'm doing this
correctly :)

>From 52199d74e7e417f6257b2bdf73b9982724183347 Mon Sep 17 00:00:00 2001
In-Reply-To: <[email-masked]>
References: <[email-masked]>
From: Katherine Cox-Buday <[email-masked]>
Date: Fri, 21 Sep 2018 09:38:23 -0500
Subject: [PATCH] Remove Unecessary Stage Replacement

---
 gnu/packages/golang.scm | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index be404cc16..9c7a2e209 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -616,15 +616,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                    (("/usr/share/zoneinfo/") tzdata-path))
                  (substitute* (find-files "cmd" "\\.go")
                    (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
-                 #t)))
-           (replace 'set-bootstrap-variables
-             (lambda* (#:key outputs inputs #:allow-other-keys)
-               ;; Tell the build system where to find the bootstrap Go.
-               (let ((go  (assoc-ref inputs "go")))
-                 (setenv "GOROOT_BOOTSTRAP" go)
-                 (setenv "GOGC" "400")
-                 ;; Go 1.10 tries to write to $HOME in a test
-                 (setenv "HOME" "/tmp")
                  #t)))))))))
 
 (define-public go go-1.9)
-- 
2.17.1

-- 
Katherine