diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-07-12 00:34:56 +0300 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-05-26 16:50:02 +0100 |
commit | 178a45bc72a9ca8a93341931f714cc7e1bfb14ff (patch) | |
tree | 5bdef7425eaa0f7cdb71e2eb7b92d4383c6d6d0e | |
parent | 7b1dccdf45b50fe7ea311110e2798fedb2414488 (diff) |
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>
-rw-r--r-- | guix/build/go-build-system.scm | 7 |
1 files 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")) |