summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/go-build-system.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 645d2fe680..4768ee8562 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -152,8 +152,10 @@ dependencies, so it should be self-contained."
;; Make sure we're building for the correct architecture and OS targets
;; that Guix targets.
- (setenv "GOARCH" goarch)
- (setenv "GOOS" goos)
+ (setenv "GOARCH" (or goarch
+ (getenv "GOHOSTARCH")))
+ (setenv "GOOS" (or goos
+ (getenv "GOHOSTOS")))
(match goarch
("arm"
(setenv "GOARM" "7"))