1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-10 16:50:43 +02:00

build/go: Set correct GOOS for Windows.

* guix/build/go-build-system.scm (setup-go-environment): When building
for windows override the inherited GOOS and set it to 'windows'.

Change-Id: I310aa490bb010370112cfa00c69df2d36387c323
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Efraim Flashner 2024-07-12 00:34:56 +03:00 committed by Sharlatan Hellseher
parent 7b1dccdf45
commit 178a45bc72
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -182,8 +182,11 @@ dependencies, so it should be self-contained."
;; that Guix targets. ;; that Guix targets.
(setenv "GOARCH" (or goarch (setenv "GOARCH" (or goarch
(getenv "GOHOSTARCH"))) (getenv "GOHOSTARCH")))
(setenv "GOOS" (or goos (setenv "GOOS" (cond ((and goos
(getenv "GOHOSTOS"))) (string=? "mingw" goos))
"windows")
(goos goos)
(else (getenv "GOHOSTOS"))))
(match goarch (match goarch
("arm" ("arm"
(setenv "GOARM" "7")) (setenv "GOARM" "7"))