Subject: bug#72066: closed ([PATCH] build/go: Set correct GOOS for Windows.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 04 Feb 2025 09:25:02 +0000

Your bug report

#72066: [PATCH] build/go: Set correct GOOS for Windows.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72066: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72066
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: [PATCH] build/go: Set correct GOOS for Windows.
From: Sharlatan Hellseher <[email-masked]>
To: [email-masked]
Date: Tue, 04 Feb 2025 09:24:16 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Efraim,

I've pushed it on to go-team branch, I guess it will trigger Golang
world re-build.

--
Oleg

Subject: [PATCH] build/go: Set correct GOOS for Windows.
From: Efraim Flashner <[email-masked]>
To: [email-masked]
Cc: Efraim Flashner <[email-masked]>
Date: Fri, 12 Jul 2024 00:34:56 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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
---
 guix/build/go-build-system.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index d95262bd6c..e0de2308f2 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2019 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2020 Jack Hill <[email-masked]>
 ;;; Copyright © 2020 Jakub Kądziołka <[email-masked]>
-;;; Copyright © 2020, 2021, 2023 Efraim Flashner <[email-masked]>
+;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2021 Sarah Morgensen <[email-masked]>
 ;;; Copyright © 2024 Ekaitz Zarraga <[email-masked]>
 ;;; Copyright © 2024 Picnoir <[email-masked]>
@@ -175,8 +175,11 @@ (define* (setup-go-environment #:key inputs outputs goos goarch #:allow-other-ke
   ;; 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"))

base-commit: 2eb7cc2677272fe099e5aeef7a75c381776aaf0e
-- 
Efraim Flashner   <[email-masked]>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted