@@ -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"))