sharlatan pushed a commit to branch go-team in repository guix. commit 501f4d77cec41a57124f2218ae3849dc737b1de6 Author: Efraim Flashner <efr...@flashner.co.il> 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 <sharlata...@gmail.com> --- 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"))