diff mbox series

[bug#68315,11/48] build-system: cmake: Redefine cmake-build and cmake-cross-build.

Message ID 20240108080350.1665-11-ngraves@ngraves.fr
State New
Headers show
Series Extend bag-build to gexps. | expand

Commit Message

Nicolas Graves Jan. 8, 2024, 8:02 a.m. UTC
* guix/build-system/cmake.scm
(cmake-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I0c3ceb08391a38c52521416093d2c4b2ae869165
---
 guix/build-system/cmake.scm | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)
diff mbox series

Patch

diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index aa187c9844..39302b3a69 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -3,6 +3,7 @@ 
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -119,7 +120,7 @@  (define* (cmake-build name inputs
                       disallowed-references)
   "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE
 provides a 'CMakeLists.txt' file as its build system."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -151,15 +152,8 @@  (define build
                              #:strip-flags #$strip-flags
                              #:strip-directories #$strip-directories)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -243,14 +237,8 @@  (define %outputs
                        #:strip-flags #$strip-flags
                        #:strip-directories #$strip-directories))))
 
-  (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 cmake-build-system
   (build-system