Subject: [bug#79224] [PATCH 07/43] build-system: cargo: Redefine cargo-build and cargo-cross-build.

From: Nicolas Graves <[email-masked]>
Date: Tue, 12 Aug 2025 11:04:15 +0200

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

Change-Id: If1151e9222170f2eb3a92d43debc61c696c2e72d
---
 guix/build-system/cargo.scm | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 452f7f78d01..4d130ab7066 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2021, 2024 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2024 Herman Rimm <[email-masked]>
 ;;; Copyright © 2024 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2024 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -139,11 +140,8 @@ (define builder
                                           (map search-path-specification->sexp
                                                search-paths))))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (cargo-cross-build name
                             #:key
@@ -205,14 +203,11 @@ (define builder
                                           (map search-path-specification->sexp
                                                search-paths))
                        #:native-search-paths '#$(sexp->gexp
-                                          (map search-path-specification->sexp
-                                               native-search-paths))))))
+                                                 (map search-path-specification->sexp
+                                                      native-search-paths))))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target target
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define (package-cargo-inputs p)
   (apply
-- 
2.50.1