GNU bug report logs - #72066
[PATCH] build/go: Set correct GOOS for Windows.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Thu, 11 Jul 2024 21:36:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 72066 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to cox.katherine.e+guix <at> gmail.com, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#72066; Package guix-patches. (Thu, 11 Jul 2024 21:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to cox.katherine.e+guix <at> gmail.com, sharlatanus <at> gmail.com, guix-patches <at> gnu.org. (Thu, 11 Jul 2024 21:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH] build/go: Set correct GOOS for Windows.
Date: Fri, 12 Jul 2024 00:34:56 +0300
* 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 <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
-;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
 ;;; Copyright © 2024 Ekaitz Zarraga <ekaitz <at> elenq.tech>
 ;;; Copyright © 2024 Picnoir <picnoir <at> alternativebit.fr>
@@ -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   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





This bug report was last modified 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.