sharlatan pushed a commit to branch go-team
in repository guix.
commit 9a87a2c4ef385e6738cd688ab6b015343b9f8ecd
Author: Efraim Flashner <[email protected]>
AuthorDate: Fri Jul 12 00:34:56 2024 +0300
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 <[email protected]>
---
guix/build/go-build-system.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 70ff880db8..3142c61623 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -182,8 +182,11 @@ dependencies, so it should be self-contained."
;; that Guix targets.
(setenv "GOARCH" (or goarch
(getenv "GOHOSTARCH")))
- (setenv "GOOS" (or goos
- (getenv "GOHOSTOS")))
+ (setenv "GOOS" (cond ((and goos
+ (string=? "mingw" goos))
+ "windows")
+ (goos goos)
+ (else (getenv "GOHOSTOS"))))
(match goarch
("arm"
(setenv "GOARM" "7"))