[bug#79224,19/43] build-system: go: Redefine go-build and go-cross-build.

Message ID 20250812090457.19016-19-ngraves@ngraves.fr
State New
Headers
Series Extend bag-build to gexps. |

Commit Message

Nicolas Graves Aug. 12, 2025, 9:04 a.m. UTC
* 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 | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)
  

Patch

diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 90e63640c1a..f76d969e331 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -8,6 +8,7 @@ 
 ;;; Copyright © 2024 Christina O'Donnell <cdo@mutix.org>
 ;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
 ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -248,12 +249,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
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (go-cross-build name
                          #:key
@@ -295,7 +292,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))
@@ -333,14 +330,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