guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: build: go-build-system: Disable Go module support.


From: guix-commits
Subject: 01/02: build: go-build-system: Disable Go module support.
Date: Tue, 11 Feb 2020 17:52:32 -0500 (EST)

ajgrf pushed a commit to branch master
in repository guix.

commit 46c5c917ba2d8c73252f40376d653af70381d13a
Author: Jack Hill <address@hidden>
AuthorDate: Tue Feb 11 16:20:43 2020 -0600

    build: go-build-system: Disable Go module support.
    
    This allows for upgrading the Go compiler without overhauling
    go-build-system first.
    
    * guix/build/go-build-system.scm (setup-go-environment): Set GO111MODULE to
    off.
    
    Signed-off-by: Alex Griffin <address@hidden>
---
 guix/build/go-build-system.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 4bc0156..0d15f97 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016 Petter <address@hidden>
 ;;; Copyright © 2017, 2019 Leo Famulari <address@hidden>
 ;;; Copyright © 2019 Maxim Cournoyer <address@hidden>
+;;; Copyright © 2020 Jack Hill <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -141,6 +142,10 @@ dependencies, so it should be self-contained."
   ;; Using the current working directory as GOPATH makes it easier for 
packagers
   ;; who need to manipulate the unpacked source code.
   (setenv "GOPATH" (getcwd))
+  ;; Go 1.13 uses go modules by default. The go build system does not
+  ;; currently support modules, so turn modules off to continue using the old
+  ;; GOPATH behavior.
+  (setenv "GO111MODULE" "off")
   (setenv "GOBIN" (string-append (assoc-ref outputs "out") "/bin"))
   (let ((tmpdir (tmpnam)))
     (match (go-inputs inputs)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]