aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Hill <jackhill@jackhill.us>2020-02-11 16:20:43 -0600
committerAlex Griffin <a@ajgrf.com>2020-02-11 16:52:17 -0600
commit46c5c917ba2d8c73252f40376d653af70381d13a (patch)
tree2f3bb18a450b52a112739df82ff05dd2d02743da
parent77189a3864af548e3615704da5a919995170f1d6 (diff)
downloadpatches-46c5c917ba2d8c73252f40376d653af70381d13a.tar
patches-46c5c917ba2d8c73252f40376d653af70381d13a.tar.gz
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 <a@ajgrf.com>
-rw-r--r--guix/build/go-build-system.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 4bc0156a88..0d15f978cd 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2017, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;;
;;; 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)