Subject: [bug#68315] [PATCH v3 21/47] build-system: go: Redefine go-build and go-cross-build.

From: Nicolas Graves <[email-masked]>
Date: Sun, 9 Feb 2025 01:51:01 +0100

* guix/build-system/go.scm
(go-build): Monadic procedure returns a gexp instead of a derivation.
(go-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I5222463ee5c37f4cd987ac60b1cf2c46eeb79008
---
 guix/build-system/go.scm | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 863177c59e..133b62d7d3 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2024 Christina O'Donnell <[email-masked]>
 ;;; Copyright © 2024 Troy Figiel <[email-masked]>
 ;;; Copyright © 2024 Sharlatan Hellseher <[email-masked]>
+;;; Copyright © 2024 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -249,11 +250,8 @@ (define builder
                     #:allow-go-reference? #$allow-go-reference?
                     #:inputs #$(input-tuples->gexp inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (go-cross-build name
                          #:key
@@ -293,7 +291,7 @@ (define %build-host-inputs
 
           (define %build-target-inputs
             (append #$(input-tuples->gexp host-inputs)
-              #+(input-tuples->gexp target-inputs)))
+                    #+(input-tuples->gexp target-inputs)))
 
           (define %build-inputs
             (append %build-host-inputs %build-target-inputs))
@@ -329,14 +327,8 @@ (define %outputs
                     #:allow-go-reference? #$allow-go-reference?
                     #:inputs %build-inputs))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target target
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define go-build-system
   (build-system
-- 
2.48.1