From 178a45bc72a9ca8a93341931f714cc7e1bfb14ff Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 12 Jul 2024 00:34:56 +0300 Subject: [PATCH] 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 --- 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"))