* [bug#72066] [PATCH] build/go: Set correct GOOS for Windows.
@ 2024-07-11 21:34 Efraim Flashner
0 siblings, 0 replies; only message in thread
From: Efraim Flashner @ 2024-07-11 21:34 UTC (permalink / raw)
To: 72066; +Cc: Efraim Flashner, Katherine Cox-Buday, Sharlatan Hellseher
* 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@gmail.com>
;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
-;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020, 2021, 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2024 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2024 Picnoir <picnoir@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@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-11 21:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 21:34 [bug#72066] [PATCH] build/go: Set correct GOOS for Windows Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).