GNU bug report logs - #68315
[PATCH 00/48] Extend bag-build to gexps.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Mon, 8 Jan 2024 08:02:01 UTC

Severity: normal

Tags: moreinfo, patch

To reply to this bug, email your comments to 68315 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 08 Jan 2024 08:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 00/48] Extend bag-build to gexps.  
Date: Mon,  8 Jan 2024 09:00:48 +0100
Rationale:
Almost all build-systems are defined with gexpressions in functions
that return derivations. Derivations are not easily extensible while
gexps are. An example usage is given below.

This is a pretty big rewrite that should recompile almost all packages,
but a lot of grafting happens such as I could rebuild my system quickly.

I was trying to get the build-phases of an existing package to apply to
a local repository, because guix as a development tool for heavy packages
(emacs, ungoogled-chromium) is tedious, and there are precious info in
build-phases that can be applied in a local repository. I'm not aware of
prior work on this particular issue.

These patches allow to do extensions such as:

    (build-system
          (name 'local-gnu)
          (description "GNU Build System applied in the current directory")
          (lower
           (lambda* args
             (let ((old-bag (apply
                             (build-system-lower
                              (package-build-system emacs-pgtk))
                             args)))
               (bag
                 (inherit old-bag)
                 (build
                  (lambda* build-args
                    (mlet %store-monad
                        ((builder (apply (bag-build old-bag) build-args)))
                      (return (with-imported-modules '((guix build utils))
                                #~(begin
                                    (use-modules (guix build utils))
                                    (with-directory-excursion #$(getcwd)
                                      #$builder))))))))))))

Of course this type of build-system isn't directly applicable because of
the chroot of the builder, but this other trick makes it happen :

  ;; We can't use package->derivation directly because we want the user rather
  ;; than the daemon to build the derivation.
  (with-store store
    (run-with-store store
      (mlet* %store-monad ((bag -> (package->bag pkg))
                           (drv    (bag->derivation bag pkg)))
        ;; ensure inputs are in the store.
        (built-derivations (derivation-inputs drv))
        (with-environment-excursion
         (apply invoke (derivation-builder (pk 'd drv))
                (derivation-builder-arguments drv))))))

This isn't polished yet, but could serve as an handy way to develop
heavy packages locally while taking advantage of the code that's
already in guix build phases.


Nicolas Graves (48):
  guix: packages: Extend bag-build to support gexp.
  build-system: gnu: Improve gnu-cross-build style.
  build-system: gnu: Redefine gnu-build and gnu-cross-build.
  build-system: agda: Redefine agda-build.
  build-system: android-ndk: Redefine gnu-build.
  build-system: ant: Redefine ant-build.
  build-system: asdf: Redefine asdf-build.
  build-system: cargo: Redefine cargo-build and cargo-cross-build.
  build-system: chicken: Redefine chicken-build.
  build-system: clojure: Redefine clojure-build.
  build-system: cmake: Redefine cmake-build and cmake-cross-build.
  build-system: composer: Redefine composer-build.
  build-system: copy: Redefine copy-build.
  build-system: dub: Redefine dub-build.
  build-system: dune: Redefine dune-build.
  build-system: elm: Redefine elm-build.
  build-system: emacs: Redefine emacs-build.
  build-system: font: Redefine font-build.
  build-system: glib-or-gtk: Improve glib-or-gtk-cross-build style.
  build-system: glib-or-gtk: Redefine glib-or-gtk-build functions.
  build-system: go: Redefine go-build and go-cross-build.
  build-system: guile: Redefine guile-build and guile-cross-build.
  build-system: haskell: Redefine haskell-build.
  build-system: julia: Redefine julia-build.
  build-system: linux-module: Redefine linux-module-build functions.
  build-system: maven: Redefine maven-build.
  build-system: meson: Redefine meson-build and meson-cross-build.
  build-system: minify: Redefine minify-build.
  build-system: mix: Redefine mix-build.
  build-system: node: Redefine node-build.
  build-system: ocaml: Redefine ocaml-build.
  build-system: perl: Redefine perl-build and perl-cross-build.
  build-system: pyproject: Redefine pyproject-build.
  build-system: python: Redefine python-build.
  build-system: qt: Redefine qt-build and qt-cross-build.
  build-system: r: Redefine r-build.
  build-system: rakudo: Redefine rakudo-build.
  build-system: rebar: Redefine rebar-build.
  build-system: renpy: Redefine renpy-build.
  build-system: ruby: Improve ruby-cross-build style.
  build-system: ruby: Redefine ruby-build.
  build-system: scons: Redefine scons-build.
  build-system: texlive: Redefine texlive-build.
  build-system: tree-sitter: Redefine tree-sitter-build functions.
  build-system: vim: Redefine vim-build.
  build-system: waf: Improve waf-build style.
  build-system: zig: Redefine zig-build.
  build-system: trivial: Redefine trivial-build functions.

 guix/build-system.scm              |   2 +-
 guix/build-system/agda.scm         |   8 +-
 guix/build-system/android-ndk.scm  |   8 +-
 guix/build-system/ant.scm          |   8 +-
 guix/build-system/asdf.scm         |   8 +-
 guix/build-system/cargo.scm        |  19 ++---
 guix/build-system/chicken.scm      |   8 +-
 guix/build-system/clojure.scm      |   8 +-
 guix/build-system/cmake.scm        |  24 ++----
 guix/build-system/composer.scm     |   9 +--
 guix/build-system/copy.scm         |  11 +--
 guix/build-system/dub.scm          |   8 +-
 guix/build-system/dune.scm         |   9 +--
 guix/build-system/elm.scm          |   8 +-
 guix/build-system/emacs.scm        |   8 +-
 guix/build-system/font.scm         |  10 +--
 guix/build-system/glib-or-gtk.scm  | 115 ++++++++++++----------------
 guix/build-system/gnu.scm          | 119 +++++++++++++----------------
 guix/build-system/go.scm           |  20 ++---
 guix/build-system/guile.scm        |  21 ++---
 guix/build-system/haskell.scm      |   8 +-
 guix/build-system/julia.scm        |   8 +-
 guix/build-system/linux-module.scm |  17 ++---
 guix/build-system/maven.scm        |   8 +-
 guix/build-system/meson.scm        |  25 ++----
 guix/build-system/minify.scm       |   8 +-
 guix/build-system/mix.scm          |  12 +--
 guix/build-system/node.scm         |   8 +-
 guix/build-system/ocaml.scm        |   9 +--
 guix/build-system/perl.scm         |  22 ++----
 guix/build-system/pyproject.scm    |  13 +---
 guix/build-system/python.scm       |  12 +--
 guix/build-system/qt.scm           |  17 ++---
 guix/build-system/r.scm            |   9 +--
 guix/build-system/rakudo.scm       |   8 +-
 guix/build-system/rebar.scm        |  12 +--
 guix/build-system/renpy.scm        |   8 +-
 guix/build-system/ruby.scm         |  48 ++++++------
 guix/build-system/scons.scm        |   9 +--
 guix/build-system/texlive.scm      |  11 +--
 guix/build-system/tree-sitter.scm  |  16 ++--
 guix/build-system/trivial.scm      |  41 ++++------
 guix/build-system/vim.scm          |  15 +---
 guix/build-system/waf.scm          |  32 ++++----
 guix/build-system/zig.scm          |   8 +-
 guix/packages.scm                  |  53 ++++++++++---
 46 files changed, 348 insertions(+), 520 deletions(-)

-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 01/48] guix: packages: Extend bag-build to support gexp.
Date: Mon,  8 Jan 2024 09:02:33 +0100
* guix/build-system.scm: Update comment.
* guix/packages.scm
(bag->derivation): Rename function to bag-builder. Create new function.
(bag->cross-derivation): Rename to bag-cross-builder.

Change-Id: I56c5a9dab9954307f95b29eab5e02ee058271684
---
 guix/build-system.scm |  2 +-
 guix/packages.scm     | 53 +++++++++++++++++++++++++++++++++++--------
 2 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/guix/build-system.scm b/guix/build-system.scm
index 76d670995c..a4dcdc52d8 100644
--- a/guix/build-system.scm
+++ b/guix/build-system.scm
@@ -79,7 +79,7 @@ (define-record-type* <bag> bag %make-bag
                  (default '("out")))
   (arguments     bag-arguments           ;list
                  (default '()))
-  (build         bag-build))             ;bag -> derivation
+  (build         bag-build))             ;bag -> gexp or derivation
 
 (define* (make-bag build-system name
                    #:key source (inputs '()) (native-inputs '())
diff --git a/guix/packages.scm b/guix/packages.scm
index 930b1a3b0e..8ff9ca60a9 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2023 Simon Tournier <zimon.toutoune <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,6 +51,7 @@ (define-module (guix packages)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
   #:use-module (ice-9 regex)
+  #:use-module (ice-9 optargs)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-26)
@@ -1889,12 +1891,12 @@ (define (input=? input1 input2)
                       (derivation=? obj1 obj2))
                  (equal? obj1 obj2))))))))
 
-(define* (bag->derivation bag #:optional context)
-  "Return the derivation to build BAG for SYSTEM.  Optionally, CONTEXT can be
-a package object describing the context in which the call occurs, for improved
-error reporting."
+(define* (bag-builder bag #:optional context)
+  "Return the gexp or derivation to build BAG for SYSTEM.  Optionally, CONTEXT
+can be a package object describing the context in which the call occurs, for
+improved error reporting."
   (if (bag-target bag)
-      (bag->cross-derivation bag)
+      (bag-cross-builder bag)
       (mlet* %store-monad ((system ->  (bag-system bag))
                            (inputs ->  (bag-transitive-inputs bag))
                            (input-drvs (mapm %store-monad
@@ -1916,10 +1918,10 @@ (define* (bag->derivation bag #:optional context)
                #:outputs (bag-outputs bag) #:system system
                (bag-arguments bag)))))
 
-(define* (bag->cross-derivation bag #:optional context)
-  "Return the derivation to build BAG, which is actually a cross build.
-Optionally, CONTEXT can be a package object denoting the context of the call.
-This is an internal procedure."
+(define* (bag-cross-builder bag #:optional context)
+  "Return the gexp or derivation to build BAG, which is actually a cross
+build. Optionally, CONTEXT can be a package object denoting the context of the
+call. This is an internal procedure."
   (mlet* %store-monad ((system ->   (bag-system bag))
                        (target ->   (bag-target bag))
                        (host ->     (bag-transitive-host-inputs bag))
@@ -1960,6 +1962,39 @@ (define* (bag->cross-derivation bag #:optional context)
            #:system system #:target target
            (bag-arguments bag))))
 
+(define* (bag->derivation bag #:optional context)
+  "Return the derivation to build BAG for SYSTEM.  Optionally, CONTEXT can be
+a package object describing the context in which the call occurs, for improved
+error reporting."
+  (mlet %store-monad ((builder (bag-builder bag context)))
+    (match builder
+      ((? derivation? drv)
+       (return drv))
+      ((? gexp gexp)
+       (let-keywords (bag-arguments bag) #t
+                     ((allowed-references    #f)
+                      (disallowed-references #f)
+                      (guile                 #f)
+                      (substitutable?        #t))
+         (mlet %store-monad
+             ((guile (package->derivation (or guile (default-guile))
+                                          (bag-system bag)
+                                          #:graft? #f)))
+           ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
+           ;; co. would be interpreted as referring to grafted packages.
+           (gexp->derivation (bag-name bag) gexp
+                             #:system (bag-system bag)
+                             #:target (and (bag-target bag))
+                             #:graft? #f
+                             #:substitutable? substitutable?
+                             #:allowed-references allowed-references
+                             #:disallowed-references disallowed-references
+                             #:guile-for-build guile))))
+      ;; build-bag has to be drv or gexp, else raise.
+      (_
+       (raise (condition (&package-error
+                          (package context))))))))
+
 (define bag->derivation*
   (store-lower bag->derivation))
 
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:03 GMT) Full text and rfc822 format available.

Message #11 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 02/48] build-system: gnu: Improve gnu-cross-build style.
Date: Mon,  8 Jan 2024 09:02:34 +0100
* guix/build-system/gnu.scm
(gnu-cross-build): Use with-imported-modules around the
gnu-cross-build builder gexp.

Change-Id: I47246571b1d84a82a67a8c289fd5ad4b5a3b5aeb
---
 guix/build-system/gnu.scm | 93 ++++++++++++++++++++-------------------
 1 file changed, 47 insertions(+), 46 deletions(-)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index cdbb547773..c3de5c2544 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012-2023 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -511,56 +512,57 @@ (define* (gnu-cross-build name
 cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
 platform."
   (define builder
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        (define %build-host-inputs
-          #+(input-tuples->gexp build-inputs))
+          (define %build-host-inputs
+            #+(input-tuples->gexp build-inputs))
 
-        (define %build-target-inputs
-          (append #$(input-tuples->gexp host-inputs)
-                  #+(input-tuples->gexp target-inputs)))
+          (define %build-target-inputs
+            (append #$(input-tuples->gexp host-inputs)
+                    #+(input-tuples->gexp target-inputs)))
 
-        (define %build-inputs
-          (append %build-host-inputs %build-target-inputs))
+          (define %build-inputs
+            (append %build-host-inputs %build-target-inputs))
 
-        (define %outputs
-          #$(outputs->gexp outputs))
+          (define %outputs
+            #$(outputs->gexp outputs))
 
-        (gnu-build #:source #+source
-                   #:system #$system
-                   #:build #$build
-                   #:target #$target
-                   #:outputs %outputs
-                   #:inputs %build-target-inputs
-                   #:native-inputs %build-host-inputs
-                   #:search-paths '#$(sexp->gexp
-                                      (map search-path-specification->sexp
-                                           search-paths))
-                   #:native-search-paths '#$(sexp->gexp
-                                             (map
-                                              search-path-specification->sexp
-                                              native-search-paths))
-                   #:phases #$(if (pair? phases)
-                                  (sexp->gexp phases)
-                                  phases)
-                   #:locale #$locale
-                   #:bootstrap-scripts #$bootstrap-scripts
-                   #:configure-flags #$configure-flags
-                   #:make-flags #$make-flags
-                   #:out-of-source? #$out-of-source?
-                   #:tests? #$tests?
-                   #:test-target #$test-target
-                   #:parallel-build? #$parallel-build?
-                   #:parallel-tests? #$parallel-tests?
-                   #:patch-shebangs? #$patch-shebangs?
-                   #:license-file-regexp #$license-file-regexp
-                   #:strip-binaries? #$strip-binaries?
-                   #:validate-runpath? #$validate-runpath?
-                   #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
-                   #:license-file-regexp #$license-file-regexp
-                   #:strip-flags #$strip-flags
-                   #:strip-directories #$strip-directories)))
+          (gnu-build #:source #+source
+                     #:system #$system
+                     #:build #$build
+                     #:target #$target
+                     #:outputs %outputs
+                     #:inputs %build-target-inputs
+                     #:native-inputs %build-host-inputs
+                     #:search-paths '#$(sexp->gexp
+                                        (map search-path-specification->sexp
+                                             search-paths))
+                     #:native-search-paths '#$(sexp->gexp
+                                               (map
+                                                search-path-specification->sexp
+                                                native-search-paths))
+                     #:phases #$(if (pair? phases)
+                                    (sexp->gexp phases)
+                                    phases)
+                     #:locale #$locale
+                     #:bootstrap-scripts #$bootstrap-scripts
+                     #:configure-flags #$configure-flags
+                     #:make-flags #$make-flags
+                     #:out-of-source? #$out-of-source?
+                     #:tests? #$tests?
+                     #:test-target #$test-target
+                     #:parallel-build? #$parallel-build?
+                     #:parallel-tests? #$parallel-tests?
+                     #:patch-shebangs? #$patch-shebangs?
+                     #:license-file-regexp #$license-file-regexp
+                     #:strip-binaries? #$strip-binaries?
+                     #:validate-runpath? #$validate-runpath?
+                     #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+                     #:license-file-regexp #$license-file-regexp
+                     #:strip-flags #$strip-flags
+                     #:strip-directories #$strip-directories))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -568,7 +570,6 @@ (define %outputs
                       #:system system
                       #:target target
                       #:graft? #f
-                      #:modules imported-modules
                       #:substitutable? substitutable?
                       #:allowed-references allowed-references
                       #:disallowed-references disallowed-references
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:03 GMT) Full text and rfc822 format available.

Message #14 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 03/48] build-system: gnu: Redefine gnu-build and
 gnu-cross-build.
Date: Mon,  8 Jan 2024 09:02:35 +0100
* guix/build-system/gnu.scm
(gnu-build): Monadic procedure returns a gexp instead of a derivation.
(gnu-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I6bf922ecd1474df104f959989db315d7ddc278b6
---
 guix/build-system/gnu.scm | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index c3de5c2544..f753aeea28 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -421,18 +421,8 @@ (define builder
                            #:strip-flags #$strip-flags
                            #:strip-directories #$strip-directories)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
-    ;; co. would be interpreted as referring to grafted packages.
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -564,16 +554,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?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+    (mbegin %store-monad
+      (return builder)))
 
 (define gnu-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:04 GMT) Full text and rfc822 format available.

Message #17 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 04/48] build-system: agda: Redefine agda-build.
Date: Mon,  8 Jan 2024 09:02:36 +0100
* guix/build-system/agda.scm
(agda-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I3c21a043a0687f4776d44297ed3dd4697a606b40
---
 guix/build-system/agda.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/agda.scm b/guix/build-system/agda.scm
index 64983dff60..b76c72ef44 100644
--- a/guix/build-system/agda.scm
+++ b/guix/build-system/agda.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Josselin Poiret <dev <at> jpoiret.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,11 +110,8 @@ (define builder
                       #:plan '#$plan
                       #:extra-files '#$extra-files))))
 
-  (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 agda-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:04 GMT) Full text and rfc822 format available.

Message #20 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 05/48] build-system: android-ndk: Redefine gnu-build.
Date: Mon,  8 Jan 2024 09:02:37 +0100
* guix/build-system/android-ndk.scm
(android-ndk-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: If1737d77ebccd418ad461c91aff170273855ed45
---
 guix/build-system/android-ndk.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm
index aa7cc06279..cee5d6674d 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Danny Milosavljevic <dannym <at> scratchpost.org>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,11 +74,8 @@ (define builder
                                                      search-paths))
                              #: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* (lower name
                 #:key source inputs native-inputs outputs system target
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:05 GMT) Full text and rfc822 format available.

Message #23 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 06/48] build-system: ant: Redefine ant-build.
Date: Mon,  8 Jan 2024 09:02:38 +0100
* guix/build-system/ant.scm
(ant-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I4f1152e29b938dbf37125bf156fb56b841011f06
---
 guix/build-system/ant.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index 84bf951fab..4e04737dda 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -144,11 +145,8 @@ (define builder
                                              search-paths))
                      #: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 ant-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:05 GMT) Full text and rfc822 format available.

Message #26 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 07/48] build-system: asdf: Redefine asdf-build.
Date: Mon,  8 Jan 2024 09:02:39 +0100
* guix/build-system/asdf.scm
(asdf-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ifdd57c4e5279d110ee7c670090b3ae4089703659
---
 guix/build-system/asdf.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 2b17cee37b..4ee951e70f 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2022 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -318,11 +319,8 @@ (define builder
                                                   search-paths))
                           #: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 asdf-build-system/sbcl
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:06 GMT) Full text and rfc822 format available.

Message #29 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 08/48] build-system: cargo: Redefine cargo-build and
 cargo-cross-build.
Date: Mon,  8 Jan 2024 09:02:40 +0100
* 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 c029cc1dda..8576aeaf59 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov <at> gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,11 +127,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
@@ -186,14 +184,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.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:07 GMT) Full text and rfc822 format available.

Message #32 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 09/48] build-system: chicken: Redefine chicken-build.
Date: Mon,  8 Jan 2024 09:02:41 +0100
* guix/build-system/chicken.scm
(chicken-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I6a837f198ac6c371b08f8690ff5bea68dbad2b54
---
 guix/build-system/chicken.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index 9f518e66e6..d305db8e7f 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 raingloom <raingloom <at> riseup.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -113,11 +114,8 @@ (define builder
                          #:tests? #$tests?
                          #: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 chicken-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:08 GMT) Full text and rfc822 format available.

Message #35 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 10/48] build-system: clojure: Redefine clojure-build.
Date: Mon,  8 Jan 2024 09:02:42 +0100
* guix/build-system/clojure.scm
(clojure-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I5b5b552052cfffc45bc4d82871600b322eb23d85
---
 guix/build-system/clojure.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index 037fcaf21d..cddcf8304e 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Alex Vong <alexvong1995 <at> gmail.com>
 ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -169,11 +170,8 @@ (define builder
                          #:system #$system
                          #: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 clojure-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:08 GMT) Full text and rfc822 format available.

Message #38 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 12/48] build-system: composer: Redefine composer-build.
Date: Mon,  8 Jan 2024 09:02:44 +0100
* guix/build-system/composer.scm
(composer-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib7787a5116744e61e3d0afeac6d85f61c6b6c9c4
---
 guix/build-system/composer.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/composer.scm b/guix/build-system/composer.scm
index 2ad7bbb36a..f8fafe778e 100644
--- a/guix/build-system/composer.scm
+++ b/guix/build-system/composer.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Julien Lepiller <julien <at> lepiller.eu>
+;;; Copyright © 2023-2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +19,7 @@
 
 (define-module (guix build-system composer)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix derivations)
   #:use-module (guix search-paths)
@@ -151,11 +153,8 @@ (define builder
                    #:strip-flags #$strip-flags
                    #:strip-directories #$strip-directories))))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define composer-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:09 GMT) Full text and rfc822 format available.

Message #41 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 11/48] build-system: cmake: Redefine cmake-build and
 cmake-cross-build.
Date: Mon,  8 Jan 2024 09:02:43 +0100
* 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 --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 <at> gmail.com>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> 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
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:09 GMT) Full text and rfc822 format available.

Message #44 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 13/48] build-system: copy: Redefine copy-build.
Date: Mon,  8 Jan 2024 09:02:45 +0100
* guix/build-system/copy.scm
(copy-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I96dfa099501796df007143db63a49e2adedbee92
---
 guix/build-system/copy.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index d58931b33c..e6a1cf36f7 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,14 +127,8 @@ (define builder
                             #: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 #f
-                      #:substitutable? substitutable?
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define copy-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:09 GMT) Full text and rfc822 format available.

Message #47 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 15/48] build-system: dune: Redefine dune-build.
Date: Mon,  8 Jan 2024 09:02:47 +0100
* guix/build-system/dune.scm
(dune-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I2a0a9a771afbe491538ed50aeb47b9fa4fd9341b
---
 guix/build-system/dune.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index c45f308349..990d94db0f 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 pukkamustard <pukkamustard <at> posteo.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,7 @@
 
 (define-module (guix build-system dune)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix search-paths)
@@ -152,11 +154,8 @@ (define builder
                       #:strip-flags #$strip-flags
                       #:strip-directories #$strip-directories))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define dune-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:10 GMT) Full text and rfc822 format available.

Message #50 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 16/48] build-system: elm: Redefine elm-build.
Date: Mon,  8 Jan 2024 09:02:48 +0100
* guix/build-system/elm.scm
(elm-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I9d45b254d5e8fdc337d075e7394e3354c9186ea6
---
 guix/build-system/elm.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm
index f5321f811b..b8bb4d6aec 100644
--- a/guix/build-system/elm.scm
+++ b/guix/build-system/elm.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Philip McGrath <philip <at> philipmcgrath.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -193,11 +194,8 @@ (define builder
                                         (map search-path-specification->sexp
                                              search-paths))
                      #: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 elm-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:10 GMT) Full text and rfc822 format available.

Message #53 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 14/48] build-system: dub: Redefine dub-build.
Date: Mon,  8 Jan 2024 09:02:46 +0100
* guix/build-system/dub.scm
(dub-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I678a7287172157688b95cab00175e61852a99c58
---
 guix/build-system/dub.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 951c084398..bf42686e18 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2016 David Craven <david <at> craven.ch>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym <at> scratchpost.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -93,11 +94,8 @@ (define builder
                                              search-paths))
                      #: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* (lower name
                 #:key source inputs native-inputs outputs system target
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:11 GMT) Full text and rfc822 format available.

Message #56 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 17/48] build-system: emacs: Redefine emacs-build.
Date: Mon,  8 Jan 2024 09:02:49 +0100
* guix/build-system/emacs.scm
(emacs-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I89cc8c1171eef7c5e02e35df5e1298ce3813c1b5
---
 guix/build-system/emacs.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index ebf97a5344..c16771ad76 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith <at> outlook.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -116,11 +117,8 @@ (define builder
                                                search-paths))
                        #: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 emacs-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:11 GMT) Full text and rfc822 format available.

Message #59 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 18/48] build-system: font: Redefine font-build.
Date: Mon,  8 Jan 2024 09:02:50 +0100
* guix/build-system/font.scm
(font-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I2a4838fc616e4ef8819b292d6842961284288867
---
 guix/build-system/font.scm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index c57c304f52..461f8cdd82 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2022 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -106,13 +107,8 @@ (define builder
                                                     search-paths))
                             #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define font-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:12 GMT) Full text and rfc822 format available.

Message #62 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 19/48] build-system: glib-or-gtk: Improve
 glib-or-gtk-cross-build style.
Date: Mon,  8 Jan 2024 09:02:51 +0100
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-cross-build): Use with-imported-modules around the
glib-or-gtk-cross-build builder gexp.

Change-Id: I8eaa032ffc0a3f8dbf02c96a4ecee85475c32111
---
 guix/build-system/glib-or-gtk.scm | 89 +++++++++++++++----------------
 1 file changed, 44 insertions(+), 45 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 726d19efad..90da8d28f0 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -224,55 +224,55 @@ (define* (glib-or-gtk-cross-build name
                                   disallowed-references)
   "Cross-build SOURCE with INPUTS.  See GNU-BUILD for more details."
   (define builder
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        (define %build-host-inputs
-          #+(input-tuples->gexp build-inputs))
+          (define %build-host-inputs
+            #+(input-tuples->gexp build-inputs))
 
-        (define %build-target-inputs
-          (append #$(input-tuples->gexp host-inputs)
-                  #+(input-tuples->gexp target-inputs)))
+          (define %build-target-inputs
+            (append #$(input-tuples->gexp host-inputs)
+                    #+(input-tuples->gexp target-inputs)))
 
-        (define %build-inputs
-          (append %build-host-inputs %build-target-inputs))
+          (define %build-inputs
+            (append %build-host-inputs %build-target-inputs))
 
-        (define %outputs
-          #$(outputs->gexp outputs))
-
-        (glib-or-gtk-build #:source #+source
-                           #:system #$system
-                           #:build #$build
-                           #:target #$target
-                           #:outputs %outputs
-                           #:inputs %build-target-inputs
-                           #:native-inputs %build-host-inputs
-                           #:search-paths '#$(sexp->gexp
-                                              (map search-path-specification->sexp
-                                                   search-paths))
-                           #:native-search-paths '#$(sexp->gexp
-                                                     (map search-path-specification->sexp
-                                                          native-search-paths))
-                           #:phases #$(if (pair? phases)
-                                          (sexp->gexp phases)
-                                          phases)
-                           #:glib-or-gtk-wrap-excluded-outputs
-                           #$glib-or-gtk-wrap-excluded-outputs
-                           #:configure-flags #$configure-flags
-                           #:make-flags #$make-flags
-                           #:out-of-source? #$out-of-source?
-                           #:tests? #$tests?
-                           #:test-target #$test-target
-                           #:parallel-build? #$parallel-build?
-                           #:parallel-tests? #$parallel-tests?
-                           #:validate-runpath? #$validate-runpath?
-                           #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
-                           #:patch-shebangs? #$patch-shebangs?
-                           #:strip-binaries? #$strip-binaries?
-                           #:strip-flags #$strip-flags
-                           #:strip-directories
-                           #$strip-directories)))
+          (define %outputs
+            #$(outputs->gexp outputs))
 
+          (glib-or-gtk-build #:source #+source
+                             #:system #$system
+                             #:build #$build
+                             #:target #$target
+                             #:outputs %outputs
+                             #:inputs %build-target-inputs
+                             #:native-inputs %build-host-inputs
+                             #:search-paths '#$(sexp->gexp
+                                                (map search-path-specification->sexp
+                                                     search-paths))
+                             #:native-search-paths '#$(sexp->gexp
+                                                       (map search-path-specification->sexp
+                                                            native-search-paths))
+                             #:phases #$(if (pair? phases)
+                                            (sexp->gexp phases)
+                                            phases)
+                             #:glib-or-gtk-wrap-excluded-outputs
+                             #$glib-or-gtk-wrap-excluded-outputs
+                             #:configure-flags #$configure-flags
+                             #:make-flags #$make-flags
+                             #:out-of-source? #$out-of-source?
+                             #:tests? #$tests?
+                             #:test-target #$test-target
+                             #:parallel-build? #$parallel-build?
+                             #:parallel-tests? #$parallel-tests?
+                             #:validate-runpath? #$validate-runpath?
+                             #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+                             #:patch-shebangs? #$patch-shebangs?
+                             #:strip-binaries? #$strip-binaries?
+                             #:strip-flags #$strip-flags
+                             #:strip-directories
+                             #$strip-directories))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -280,7 +280,6 @@ (define %outputs
                       #:system system
                       #:target target
                       #:graft? #f
-                      #:modules imported-modules
                       #:allowed-references allowed-references
                       #:disallowed-references disallowed-references
                       #:guile-for-build guile)))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:12 GMT) Full text and rfc822 format available.

Message #65 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 20/48] build-system: glib-or-gtk: Redefine glib-or-gtk-build
 functions.
Date: Mon,  8 Jan 2024 09:02:52 +0100
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-build): Monadic procedure returns a gexp instead of a derivation.
(glib-or-gtk-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I24f722e47f3ecce7132a7647b5689f6c10abbfd6
---
 guix/build-system/glib-or-gtk.scm | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 90da8d28f0..696b9b1ea8 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml <at> gmail.com>
 ;;; Copyright © 2014 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -148,7 +149,7 @@ (define* (glib-or-gtk-build name inputs
                             allowed-references
                             disallowed-references)
   "Build SOURCE with INPUTS.  See GNU-BUILD for more details."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -180,16 +181,8 @@ (define build
                                    #: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
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (glib-or-gtk-cross-build name
                                   #:key
@@ -274,15 +267,8 @@ (define %outputs
                              #: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
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define glib-or-gtk-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:13 GMT) Full text and rfc822 format available.

Message #68 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 21/48] build-system: go: Redefine go-build and go-cross-build.
Date: Mon,  8 Jan 2024 09:02:53 +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 0934fded07..6e8f3c8153 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021, 2023 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -217,11 +218,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
@@ -257,7 +255,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))
@@ -289,14 +287,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.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:13 GMT) Full text and rfc822 format available.

Message #71 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 22/48] build-system: guile: Redefine guile-build and
 guile-cross-build.
Date: Mon,  8 Jan 2024 09:02:54 +0100
* guix/build-system/guile.scm
(guile-build): Monadic procedure returns a gexp instead of a derivation.
(guile-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I60f2d7707f064ef6a678e8e47e21309d0eb545ef
---
 guix/build-system/guile.scm | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm
index bd3bb1c870..1ba99308aa 100644
--- a/guix/build-system/guile.scm
+++ b/guix/build-system/guile.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018-2019, 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,14 +110,8 @@ (define builder
                        #:search-paths '#$(map search-path-specification->sexp
                                               search-paths)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (guile-cross-build name
                             #:key
@@ -170,14 +165,8 @@ (define %outputs
                        #:make-dynamic-linker-cache? #f ;cross-compiling
                        #:phases #$phases))))
 
-  (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 guile-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:14 GMT) Full text and rfc822 format available.

Message #74 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 23/48] build-system: haskell: Redefine haskell-build.
Date: Mon,  8 Jan 2024 09:02:55 +0100
* guix/build-system/haskell.scm
(haskell-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Iaa4e6af7a69a9bd2710572054b1f304a7701f113
---
 guix/build-system/haskell.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index f8568e33db..31561654d8 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -178,11 +179,8 @@ (define builder
                                                        search-paths))
                                #: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 haskell-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:14 GMT) Full text and rfc822 format available.

Message #77 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 24/48] build-system: julia: Redefine julia-build.
Date: Mon,  8 Jan 2024 09:02:56 +0100
* guix/build-system/julia.scm
(julia-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I34303f6cc1423e60f3aa8f66409ca0563e9876cb
---
 guix/build-system/julia.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index b5521e38e4..6cbd2c8028 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv <at> pm.me>
 ;;; Copyright © 2021, 2022 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2022 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -111,11 +112,8 @@ (define builder
                        #:julia-package-uuid #$julia-package-uuid
                        #:julia-package-dependencies #$julia-package-dependencies))))
 
-  (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 julia-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:15 GMT) Full text and rfc822 format available.

Message #80 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 25/48] build-system: linux-module: Redefine linux-module-build
 functions.
Date: Mon,  8 Jan 2024 09:02:57 +0100
* guix/build-system/linux-module.scm
(linux-module-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I289c0c77a219445ae0c21f1a9709a67063b38f55
---
 guix/build-system/linux-module.scm | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index e46195b53c..87aa485bc1 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -189,12 +190,8 @@ (define builder
                                     #:parallel-build? #$parallel-build?
                                     #: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
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (linux-module-build-cross
           name
@@ -249,12 +246,8 @@ (define %build-target-inputs
                               #:phases #$phases
                               #:tests? #$tests?))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:guile-for-build guile
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define linux-module-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:15 GMT) Full text and rfc822 format available.

Message #83 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 26/48] build-system: maven: Redefine maven-build.
Date: Mon,  8 Jan 2024 09:02:58 +0100
* guix/build-system/maven.scm
(maven-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ieb96bcdb1c654371279bd7295ea69e2dfad71175
---
 guix/build-system/maven.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 4bbeaed6a4..22e86eb78b 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -185,11 +186,8 @@ (define builder
                        #: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
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define maven-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:15 GMT) Full text and rfc822 format available.

Message #86 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 27/48] build-system: meson: Redefine meson-build and
 meson-cross-build.
Date: Mon,  8 Jan 2024 09:02:59 +0100
* guix/build-system/meson.scm
(meson-build): Monadic procedure returns a gexp instead of a derivation.
(meson-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Id801e757463080dbeedc05a43bd0b2ae23fae4c7
---
 guix/build-system/meson.scm | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index bf9ca15ecc..410d981bf0 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -237,16 +238,8 @@ (define build-phases
                              #:strip-directories #$strip-directories
                              #:elf-directories #$(sexp->gexp elf-directories))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (meson-cross-build name
                             #:key
@@ -350,16 +343,8 @@ (define build-phases
                        #:strip-directories #$strip-directories
                        #:elf-directories #$(sexp->gexp elf-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?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define meson-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:16 GMT) Full text and rfc822 format available.

Message #89 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 28/48] build-system: minify: Redefine minify-build.
Date: Mon,  8 Jan 2024 09:03:00 +0100
* guix/build-system/minify.scm
(minify-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib009adcec6791d7145ce0d822745495dad9cf6e5
---
 guix/build-system/minify.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index b377b506b5..a7536520e7 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2018, 2023 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -97,11 +98,8 @@ (define builder
                                                 search-paths))
                         #: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 minify-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:16 GMT) Full text and rfc822 format available.

Message #92 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 29/48] build-system: mix: Redefine mix-build.
Date: Mon,  8 Jan 2024 09:03:01 +0100
* guix/build-system/mix.scm
(mix-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8a31c048d1458ece0f906023763b4585502f7710
---
 guix/build-system/mix.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/guix/build-system/mix.scm b/guix/build-system/mix.scm
index 1b04053d70..5e1ac43578 100644
--- a/guix/build-system/mix.scm
+++ b/guix/build-system/mix.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Pierre-Henry Fröhring <contact <at> phfrohring.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -130,15 +131,8 @@ (define builder
                            #:inputs
                            %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system
-                                                  #:graft? #f)))
-    (gexp->derivation name
-                      builder
-                      #:system system
-                      #:graft? #f       ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (lower name
                 #:key
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:17 GMT) Full text and rfc822 format available.

Message #95 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 30/48] build-system: node: Redefine node-build.
Date: Mon,  8 Jan 2024 09:03:02 +0100
* guix/build-system/node.scm
(node-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I507547e474c379c0f66dde15abad73787953e5e6
---
 guix/build-system/node.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 3f73390809..d17a82b7b9 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Philip McGrath <philip <at> philipmcgrath.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,11 +109,8 @@ (define builder
                                               search-paths))
                       #: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 node-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:17 GMT) Full text and rfc822 format available.

Message #98 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 31/48] build-system: ocaml: Redefine ocaml-build.
Date: Mon,  8 Jan 2024 09:03:03 +0100
* guix/build-system/ocaml.scm
(ocaml-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib525ddc1df03b33b95a433dd2add79405f611f94
---
 guix/build-system/ocaml.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 582d00b4cd..1872033e91 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 (define-module (guix build-system ocaml)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix search-paths)
@@ -305,11 +307,8 @@ (define builder
                        #:strip-flags #$strip-flags
                        #:strip-directories #$strip-directories))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define ocaml-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:17 GMT) Full text and rfc822 format available.

Message #101 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 32/48] build-system: perl: Redefine perl-build and
 perl-cross-build.
Date: Mon,  8 Jan 2024 09:03:04 +0100
* guix/build-system/perl.scm
(perl-build): Monadic procedure returns a gexp instead of a derivation.
(perl-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Id54ae050c2b64269ea42ec9f89d9c3a84ad4429a
---
 guix/build-system/perl.scm | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 7c6deb34bf..4de0da15a5 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,7 @@ (define* (perl-build name inputs
                                 (guix build utils))))
   "Build SOURCE using PERL, and with INPUTS.  This assumes that SOURCE
 provides a `Makefile.PL' file as its build system."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -144,14 +145,8 @@ (define build
                             #:parallel-tests? #$parallel-tests?
                             #:outputs %outputs
                             #:inputs %build-inputs)))))
-
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (perl-cross-build name #:key
                            source
@@ -207,13 +202,8 @@ (define builder
                       #:outputs #$(outputs->gexp outputs)
                       #:inputs #$inputs
                       #:native-inputs #+(input-tuples->gexp build-inputs)))))
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target target
-                      #:graft? #false
-                      #:guile-for-build guile)))
+ (mbegin %store-monad
+    (return builder)))
 
 (define perl-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:18 GMT) Full text and rfc822 format available.

Message #104 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 33/48] build-system: pyproject: Redefine pyproject-build.
Date: Mon,  8 Jan 2024 09:03:05 +0100
* guix/build-system/pyproject.scm
(pyproject-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ia26001291b472c69c65647d8bddd1199f0ddc483
---
 guix/build-system/pyproject.scm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm
index 2a2c3af3f3..c0404d0842 100644
--- a/guix/build-system/pyproject.scm
+++ b/guix/build-system/pyproject.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun <lars <at> 6xq.net>
 ;;; Copyright © 2022 Marius Bakke <marius <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -100,7 +101,7 @@ (define* (pyproject-build name inputs
                           (modules '((guix build pyproject-build-system)
                                      (guix build utils))))
   "Build SOURCE using PYTHON, and with INPUTS."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -124,14 +125,8 @@ (define build
                                          search-paths))
                  #:inputs %build-inputs)))))
 
-
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define pyproject-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:18 GMT) Full text and rfc822 format available.

Message #107 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 34/48] build-system: python: Redefine python-build.
Date: Mon,  8 Jan 2024 09:03:06 +0100
* guix/build-system/python.scm
(python-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I1d270fa64192394072279f73ae0d77877d41f01c
---
 guix/build-system/python.scm | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index cca009fb28..365d216592 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2021 Lars-Dominik Braun <lars <at> 6xq.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -182,7 +183,7 @@ (define* (python-build name inputs
                                   (guix build utils))))
   "Build SOURCE using PYTHON, and with INPUTS.  This assumes that SOURCE
 provides a 'setup.py' file as its build system."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -205,13 +206,8 @@ (define build
                               #:inputs %build-inputs)))))
 
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define python-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:19 GMT) Full text and rfc822 format available.

Message #110 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 35/48] build-system: qt: Redefine qt-build and qt-cross-build.
Date: Mon,  8 Jan 2024 09:03:07 +0100
* guix/build-system/qt.scm
(qt-build): Monadic procedure returns a gexp instead of a derivation.
(qt-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I194a9d1a7c7600af2e991e1efad627a9ced235d1
---
 guix/build-system/qt.scm | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index 978aed0fc1..27296a0f60 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -176,12 +177,8 @@ (define builder
                     #: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
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:system system
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -263,12 +260,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
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:system system
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define qt-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:19 GMT) Full text and rfc822 format available.

Message #113 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 36/48] build-system: r: Redefine r-build.
Date: Mon,  8 Jan 2024 09:03:08 +0100
* guix/build-system/r.scm
(r-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8f5a76eac6b65beba95852b7bf1645cd8a7b255a
---
 guix/build-system/r.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 7ab4db82b6..e6e3a99a8d 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015-2023 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -135,12 +136,8 @@ (define builder
                                            search-paths))
                    #: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
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define r-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:20 GMT) Full text and rfc822 format available.

Message #116 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 37/48] build-system: rakudo: Redefine rakudo-build.
Date: Mon,  8 Jan 2024 09:03:09 +0100
* guix/build-system/rakudo.scm
(rakudo-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I5f484023b8eb9806ed366e5fc596b844a61f524e
---
 guix/build-system/rakudo.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm
index 3b30fdfd0e..9bcf178c29 100644
--- a/guix/build-system/rakudo.scm
+++ b/guix/build-system/rakudo.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -127,11 +128,8 @@ (define builder
                         #:outputs #$(outputs->gexp outputs)
                         #: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 rakudo-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:20 GMT) Full text and rfc822 format available.

Message #119 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 38/48] build-system: rebar: Redefine rebar-build.
Date: Mon,  8 Jan 2024 09:03:10 +0100
* guix/build-system/rebar.scm
(rebar-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I7d4a29cfc1bedaa762e25deed41cc0eb802abb9f
---
 guix/build-system/rebar.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm
index de1294ec3f..8acaf49fc2 100644
--- a/guix/build-system/rebar.scm
+++ b/guix/build-system/rebar.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -139,15 +140,8 @@ (define builder
                                               search-paths))
                       #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
-    ;; co. would be interpreted as referring to grafted packages.
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define rebar-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:21 GMT) Full text and rfc822 format available.

Message #122 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 39/48] build-system: renpy: Redefine renpy-build.
Date: Mon,  8 Jan 2024 09:03:11 +0100
* guix/build-system/renpy.scm
(renpy-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I20bf5af43fc9fc41fb2f36637e67d35136bf1606
---
 guix/build-system/renpy.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm
index 3039e3c63b..4a20835ce8 100644
--- a/guix/build-system/renpy.scm
+++ b/guix/build-system/renpy.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2021 Leo Prikler <leo.prikler <at> student.tugraz.at>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,11 +105,8 @@ (define builder
                                                search-paths))
                        #: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 renpy-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:21 GMT) Full text and rfc822 format available.

Message #125 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 40/48] build-system: ruby: Improve ruby-cross-build style.
Date: Mon,  8 Jan 2024 09:03:12 +0100
* guix/build-system/ruby.scm
(ruby-cross-build): Use with-imported-modules around the
ruby-cross-build builder gexp.

Change-Id: I1051124f034f2082ccef531e9bcf37913d5a9449
---
 guix/build-system/ruby.scm | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index a3793a9381..77f1312c13 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,24 +89,25 @@ (define* (ruby-build name inputs
                                 (guix build utils))))
   "Build SOURCE using RUBY and INPUTS."
   (define build
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        #$(with-build-variables inputs outputs
-            #~(ruby-build #:name #$name
-                          #:source #+source
-                          #:system #$system
-                          #:gem-flags #$gem-flags
-                          #:test-target #$test-target
-                          #:tests? #$tests?
-                          #:phases #$(if (pair? phases)
-                                         (sexp->gexp phases)
-                                         phases)
-                          #:outputs %outputs
-                          #:search-paths '#$(sexp->gexp
-                                             (map search-path-specification->sexp
-                                                  search-paths))
-                          #:inputs %build-inputs))))
+          #$(with-build-variables inputs outputs
+              #~(ruby-build #:name #$name
+                            #:source #+source
+                            #:system #$system
+                            #:gem-flags #$gem-flags
+                            #:test-target #$test-target
+                            #:tests? #$tests?
+                            #:phases #$(if (pair? phases)
+                                           (sexp->gexp phases)
+                                           phases)
+                            #:outputs %outputs
+                            #:search-paths '#$(sexp->gexp
+                                               (map search-path-specification->sexp
+                                                    search-paths))
+                            #:inputs %build-inputs)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -113,7 +115,6 @@ (define build
                       #:system system
                       #:target #f
                       #:graft? #f
-                      #:modules imported-modules
                       #:guile-for-build guile)))
 
 (define ruby-build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:21 GMT) Full text and rfc822 format available.

Message #128 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 41/48] build-system: ruby: Redefine ruby-build.
Date: Mon,  8 Jan 2024 09:03:13 +0100
* guix/build-system/ruby.scm
(ruby-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8de0e2b382271e9ea09d2be9b6169ccfc792230b
---
 guix/build-system/ruby.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 77f1312c13..99c2f62101 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -88,7 +88,7 @@ (define* (ruby-build name inputs
                      (modules '((guix build ruby-build-system)
                                 (guix build utils))))
   "Build SOURCE using RUBY and INPUTS."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -109,13 +109,8 @@ (define build
                                                     search-paths))
                             #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define ruby-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:22 GMT) Full text and rfc822 format available.

Message #131 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 42/48] build-system: scons: Redefine scons-build.
Date: Mon,  8 Jan 2024 09:03:14 +0100
* guix/build-system/scons.scm
(scons-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ic8c99d06ac53b2ba80a02a191d18de92e9c74e6b
---
 guix/build-system/scons.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm
index 046ddef740..8bf2e5ee2f 100644
--- a/guix/build-system/scons.scm
+++ b/guix/build-system/scons.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +19,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix build-system scons)
+  #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix monads)
@@ -117,11 +119,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 scons-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:22 GMT) Full text and rfc822 format available.

Message #134 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 43/48] build-system: texlive: Redefine texlive-build.
Date: Mon,  8 Jan 2024 09:03:15 +0100
* guix/build-system/texlive.scm
(texlive-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I00cc4e5647eec7e5cd7103ccd9ca0beb21361b3a
---
 guix/build-system/texlive.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 88372faa58..8f5966c5ae 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -178,14 +179,8 @@ (define builder
                                                   (map search-path-specification->sexp
                                                        search-paths)))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define texlive-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:23 GMT) Full text and rfc822 format available.

Message #137 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 44/48] build-system: tree-sitter: Redefine tree-sitter-build
 functions.
Date: Mon,  8 Jan 2024 09:03:16 +0100
* guix/build-system/tree-sitter.scm
(tree-sitter-build): Monadic procedure returns a gexp instead of a derivation.
(tree-sitter-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I761d0663a511deefd0626ad427be22df09b72894
---
 guix/build-system/tree-sitter.scm | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/guix/build-system/tree-sitter.scm b/guix/build-system/tree-sitter.scm
index 21c4eb35b2..c9e45b1fb9 100644
--- a/guix/build-system/tree-sitter.scm
+++ b/guix/build-system/tree-sitter.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -119,11 +120,8 @@ (define builder
                                       search-paths))
                              #: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* (tree-sitter-cross-build name
                                   #:key
@@ -179,12 +177,8 @@ (define %build-inputs
                                   search-path-specification->sexp
                                   native-search-paths))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target target
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define tree-sitter-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:23 GMT) Full text and rfc822 format available.

Message #140 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 45/48] build-system: vim: Redefine vim-build.
Date: Mon,  8 Jan 2024 09:03:17 +0100
* guix/build-system/vim.scm
(vim-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Iedbb15faac445f169cffa16397b357bc4f15c0f6
---
 guix/build-system/vim.scm | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/guix/build-system/vim.scm b/guix/build-system/vim.scm
index dddf7ea14b..22c38aefca 100644
--- a/guix/build-system/vim.scm
+++ b/guix/build-system/vim.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Jonathan Scoresby <me <at> jonscoresby.com>
 ;;; Copyright © 2023 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,7 @@ (define* (vim-build name inputs
                     (modules '((guix build vim-build-system)
                                (guix build utils))))
 
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@modules)
@@ -151,16 +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?
-                          #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define vim-build-system
   (build-system (name 'vim)
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:23 GMT) Full text and rfc822 format available.

Message #143 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 46/48] build-system: waf: Improve waf-build style.
Date: Mon,  8 Jan 2024 09:03:18 +0100
* guix/build-system/waf.scm
(waf-build): Use with-imported-modules around the waf-build builder gexp.

Change-Id: Id242046eb4bfef90dba60d7c3b1b68597ddf502e
---
 guix/build-system/waf.scm | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index 91b3d0d100..696b6de39d 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,22 +87,23 @@ (define* (waf-build name inputs
   "Build SOURCE with INPUTS.  This assumes that SOURCE provides a 'waf' file
 as its build system."
   (define build
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        #$(with-build-variables inputs outputs
-            #~(waf-build #:name #$name
-                         #:source #+source
-                         #:configure-flags #$configure-flags
-                         #:system #$system
-                         #:test-target #$test-target
-                         #:tests? #$tests?
-                         #:phases #$phases
-                         #:outputs %outputs
-                         #:search-paths '#$(sexp->gexp
-                                            (map search-path-specification->sexp
-                                                 search-paths))
-                         #:inputs %build-inputs))))
+          #$(with-build-variables inputs outputs
+              #~(waf-build #:name #$name
+                           #:source #+source
+                           #:configure-flags #$configure-flags
+                           #:system #$system
+                           #:test-target #$test-target
+                           #:tests? #$tests?
+                           #:phases #$phases
+                           #:outputs %outputs
+                           #:search-paths '#$(sexp->gexp
+                                              (map search-path-specification->sexp
+                                                   search-paths))
+                           #:inputs %build-inputs)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:24 GMT) Full text and rfc822 format available.

Message #146 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 47/48] build-system: zig: Redefine zig-build.
Date: Mon,  8 Jan 2024 09:03:19 +0100
* guix/build-system/zig.scm
(zig-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ide64e7047d6e7127024471b311366f3cf8533e00
---
 guix/build-system/zig.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/zig.scm b/guix/build-system/zig.scm
index 1fa4782a2e..57df84f029 100644
--- a/guix/build-system/zig.scm
+++ b/guix/build-system/zig.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Ekaitz Zarraga <ekaitz <at> elenq.tech>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -77,11 +78,8 @@ (define builder
                                              search-paths))
                      #: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* (zig-cross-build name
                           #:key
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 08:05:24 GMT) Full text and rfc822 format available.

Message #149 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 48/48] build-system: trivial: Redefine trivial-build functions.
Date: Mon,  8 Jan 2024 09:03:20 +0100
* guix/build-system/trivial.scm
(trivial-build): Monadic procedure returns a gexp instead of a derivation.
(trivial-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I261d5d5ae027a174eafa972e4f598afdc394caa3
---
 guix/build-system/trivial.scm | 41 ++++++++++++++---------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index e08884baf1..bc71c94132 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2018, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,18 +52,13 @@ (define* (trivial-build name inputs
                         search-paths allowed-references)
   "Run build expression BUILDER, an expression, for SYSTEM.  SOURCE is
 ignored."
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f))
-                      (builder -> (if (pair? builder)
-                                      (sexp->gexp builder)
-                                      builder)))
-    (gexp->derivation name (with-build-variables inputs outputs builder)
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:modules modules
-                      #:allowed-references allowed-references
-                      #:guile-for-build guile)))
+  (mlet* %store-monad ((builder -> (if (pair? builder)
+                                       (sexp->gexp builder)
+                                       builder)))
+    (return (with-imported-modules modules
+              #~(begin
+                  (use-modules #$@(sexp->gexp modules))
+                  #$(with-build-variables inputs outputs builder))))))
 
 (define* (trivial-cross-build name
                               #:key
@@ -73,21 +69,16 @@ (define* (trivial-cross-build name
                               allowed-references)
   "Run build expression BUILDER, an expression, for SYSTEM.  SOURCE is
 ignored."
-  (mlet %store-monad  ((guile (package->derivation (or guile (default-guile))
-                                                   system #:graft? #f))
-                       (builder -> (if (pair? builder)
+  (mlet* %store-monad ((builder -> (if (pair? builder)
                                        (sexp->gexp builder)
                                        builder)))
-    (gexp->derivation name (with-build-variables
-                               (append build-inputs target-inputs host-inputs)
-                               outputs
-                             builder)
-                      #:system system
-                      #:target target
-                      #:graft? #f
-                      #:modules modules
-                      #:allowed-references allowed-references
-                      #:guile-for-build guile)))
+    (return (with-imported-modules modules
+              #~(begin
+                  (use-modules #$@(sexp->gexp modules))
+                  #$(with-build-variables
+                        (append build-inputs target-inputs host-inputs)
+                        outputs
+                      builder))))))
 
 (define trivial-build-system
   (build-system
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Mon, 08 Jan 2024 22:51:01 GMT) Full text and rfc822 format available.

Message #152 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Subject: Re: [PATCH 48/48] build-system: trivial: Redefine trivial-build
 functions.
Date: Mon, 08 Jan 2024 23:49:58 +0100
This last patch can be skipped if we want to avoid a lot of rebuilds,
and it doesn't matter for easier extensibility since the trivial
build-system is extensible. 


On 2024-01-08 09:03, Nicolas Graves wrote:

> * guix/build-system/trivial.scm
> (trivial-build): Monadic procedure returns a gexp instead of a derivation.
> (trivial-cross-build): Monadic procedure returns a gexp instead of a derivation.
>
> Change-Id: I261d5d5ae027a174eafa972e4f598afdc394caa3
> ---
>  guix/build-system/trivial.scm | 41 ++++++++++++++---------------------
>  1 file changed, 16 insertions(+), 25 deletions(-)
>
> diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
> index e08884baf1..bc71c94132 100644
> --- a/guix/build-system/trivial.scm
> +++ b/guix/build-system/trivial.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2012, 2013, 2014, 2015, 2018, 2021 Ludovic Courtès <ludo <at> gnu.org>
> +;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -51,18 +52,13 @@ (define* (trivial-build name inputs
>                          search-paths allowed-references)
>    "Run build expression BUILDER, an expression, for SYSTEM.  SOURCE is
>  ignored."
> -  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
> -                                                  system #:graft? #f))
> -                      (builder -> (if (pair? builder)
> -                                      (sexp->gexp builder)
> -                                      builder)))
> -    (gexp->derivation name (with-build-variables inputs outputs builder)
> -                      #:system system
> -                      #:target #f
> -                      #:graft? #f
> -                      #:modules modules
> -                      #:allowed-references allowed-references
> -                      #:guile-for-build guile)))
> +  (mlet* %store-monad ((builder -> (if (pair? builder)
> +                                       (sexp->gexp builder)
> +                                       builder)))
> +    (return (with-imported-modules modules
> +              #~(begin
> +                  (use-modules #$@(sexp->gexp modules))
> +                  #$(with-build-variables inputs outputs builder))))))
>  
>  (define* (trivial-cross-build name
>                                #:key
> @@ -73,21 +69,16 @@ (define* (trivial-cross-build name
>                                allowed-references)
>    "Run build expression BUILDER, an expression, for SYSTEM.  SOURCE is
>  ignored."
> -  (mlet %store-monad  ((guile (package->derivation (or guile (default-guile))
> -                                                   system #:graft? #f))
> -                       (builder -> (if (pair? builder)
> +  (mlet* %store-monad ((builder -> (if (pair? builder)
>                                         (sexp->gexp builder)
>                                         builder)))
> -    (gexp->derivation name (with-build-variables
> -                               (append build-inputs target-inputs host-inputs)
> -                               outputs
> -                             builder)
> -                      #:system system
> -                      #:target target
> -                      #:graft? #f
> -                      #:modules modules
> -                      #:allowed-references allowed-references
> -                      #:guile-for-build guile)))
> +    (return (with-imported-modules modules
> +              #~(begin
> +                  (use-modules #$@(sexp->gexp modules))
> +                  #$(with-build-variables
> +                        (append build-inputs target-inputs host-inputs)
> +                        outputs
> +                      builder))))))
>  
>  (define trivial-build-system
>    (build-system

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sat, 13 Apr 2024 20:54:01 GMT) Full text and rfc822 format available.

Message #155 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Subject: [Nicolas Graves] Re: [PATCH 00/48] Extend bag-build to gexps.
Date: Sat, 13 Apr 2024 22:53:16 +0200
[Message part 1 (text/plain, inline)]
-------------------- Start of forwarded message --------------------
From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-devel <at> gnu.org
Cc: Andrew Tropin <andrew <at> trop.in>
Subject: Re: [PATCH 00/48] Extend bag-build to gexps.
Date: Wed, 10 Jan 2024 22:50:05 +0100

[Message part 2 (text/plain, inline)]
Here's a more complete proof of concept:

The attached file guix.scm, when run a checkout of emacs branch emacs-29
with guix build -f guix.scm will :
- compile everything as if run locally but with the patches provided by
guix sources.
- a local edit and the rerun of guix build -f guix.scm will only compile
  new / changed code. 

Now I can try developping emacs without worring about huge compilation
times and without the developping issues that would happen if I ran the
build-system by hand without the patches. 

We could even imagine adding an option to guix shell -D that could drop
such a file for any package, since most of the code is reproducible
(although applying a derivation this way is still quite hacky).

[guix.scm (application/octet-stream, attachment)]
[Message part 4 (text/plain, inline)]
Cheers!

Nicolas


On 2024-01-08 08:51, Nicolas Graves wrote:

> Rationale:
> Almost all build-systems are defined with gexpressions in functions
> that return derivations. Derivations are not easily extensible while
> gexps are. An example usage is given below.
>
> This is a pretty big rewrite that should recompile almost all packages,
> but a lot of grafting happens such as I could rebuild my system quickly.
>
> I was trying to get the build-phases of an existing package to apply to
> a local repository, because guix as a development tool for heavy packages
> (emacs, ungoogled-chromium) is tedious, and there are precious info in
> build-phases that can be applied in a local repository. I'm not aware of
> prior work on this particular issue.
>
> These patches allow to do extensions such as:
>
>     (build-system
>           (name 'local-gnu)
>           (description "GNU Build System applied in the current directory")
>           (lower
>            (lambda* args
>              (let ((old-bag (apply
>                              (build-system-lower
>                               (package-build-system emacs-pgtk))
>                              args)))
>                (bag
>                  (inherit old-bag)
>                  (build
>                   (lambda* build-args
>                     (mlet %store-monad
>                         ((builder (apply (bag-build old-bag) build-args)))
>                       (return (with-imported-modules '((guix build utils))
>                                 #~(begin
>                                     (use-modules (guix build utils))
>                                     (with-directory-excursion #$(getcwd)
>                                       #$builder))))))))))))
>
> Of course this type of build-system isn't directly applicable because of
> the chroot of the builder, but this other trick makes it happen :
>
>   ;; We can't use package->derivation directly because we want the user rather
>   ;; than the daemon to build the derivation.
>   (with-store store
>     (run-with-store store
>       (mlet* %store-monad ((bag -> (package->bag pkg))
>                            (drv    (bag->derivation bag pkg)))
>         ;; ensure inputs are in the store.
>         (built-derivations (derivation-inputs drv))
>         (with-environment-excursion
>          (apply invoke (derivation-builder (pk 'd drv))
>                 (derivation-builder-arguments drv))))))
>
> This isn't polished yet, but could serve as an handy way to develop
> heavy packages locally while taking advantage of the code that's
> already in guix build phases.
>
>
> Nicolas Graves (48):
>   guix: packages: Extend bag-build to support gexp.
>   build-system: gnu: Improve gnu-cross-build style.
>   build-system: gnu: Redefine gnu-build and gnu-cross-build.
>   build-system: agda: Redefine agda-build.
>   build-system: android-ndk: Redefine gnu-build.
>   build-system: ant: Redefine ant-build.
>   build-system: asdf: Redefine asdf-build.
>   build-system: cargo: Redefine cargo-build and cargo-cross-build.
>   build-system: chicken: Redefine chicken-build.
>   build-system: clojure: Redefine clojure-build.
>   build-system: cmake: Redefine cmake-build and cmake-cross-build.
>   build-system: composer: Redefine composer-build.
>   build-system: copy: Redefine copy-build.
>   build-system: dub: Redefine dub-build.
>   build-system: dune: Redefine dune-build.
>   build-system: elm: Redefine elm-build.
>   build-system: emacs: Redefine emacs-build.
>   build-system: font: Redefine font-build.
>   build-system: glib-or-gtk: Improve glib-or-gtk-cross-build style.
>   build-system: glib-or-gtk: Redefine glib-or-gtk-build functions.
>   build-system: go: Redefine go-build and go-cross-build.
>   build-system: guile: Redefine guile-build and guile-cross-build.
>   build-system: haskell: Redefine haskell-build.
>   build-system: julia: Redefine julia-build.
>   build-system: linux-module: Redefine linux-module-build functions.
>   build-system: maven: Redefine maven-build.
>   build-system: meson: Redefine meson-build and meson-cross-build.
>   build-system: minify: Redefine minify-build.
>   build-system: mix: Redefine mix-build.
>   build-system: node: Redefine node-build.
>   build-system: ocaml: Redefine ocaml-build.
>   build-system: perl: Redefine perl-build and perl-cross-build.
>   build-system: pyproject: Redefine pyproject-build.
>   build-system: python: Redefine python-build.
>   build-system: qt: Redefine qt-build and qt-cross-build.
>   build-system: r: Redefine r-build.
>   build-system: rakudo: Redefine rakudo-build.
>   build-system: rebar: Redefine rebar-build.
>   build-system: renpy: Redefine renpy-build.
>   build-system: ruby: Improve ruby-cross-build style.
>   build-system: ruby: Redefine ruby-build.
>   build-system: scons: Redefine scons-build.
>   build-system: texlive: Redefine texlive-build.
>   build-system: tree-sitter: Redefine tree-sitter-build functions.
>   build-system: vim: Redefine vim-build.
>   build-system: waf: Improve waf-build style.
>   build-system: zig: Redefine zig-build.
>   build-system: trivial: Redefine trivial-build functions.
>
>  guix/build-system.scm              |   2 +-
>  guix/build-system/agda.scm         |   8 +-
>  guix/build-system/android-ndk.scm  |   8 +-
>  guix/build-system/ant.scm          |   8 +-
>  guix/build-system/asdf.scm         |   8 +-
>  guix/build-system/cargo.scm        |  19 ++---
>  guix/build-system/chicken.scm      |   8 +-
>  guix/build-system/clojure.scm      |   8 +-
>  guix/build-system/cmake.scm        |  24 ++----
>  guix/build-system/composer.scm     |   9 +--
>  guix/build-system/copy.scm         |  11 +--
>  guix/build-system/dub.scm          |   8 +-
>  guix/build-system/dune.scm         |   9 +--
>  guix/build-system/elm.scm          |   8 +-
>  guix/build-system/emacs.scm        |   8 +-
>  guix/build-system/font.scm         |  10 +--
>  guix/build-system/glib-or-gtk.scm  | 115 ++++++++++++----------------
>  guix/build-system/gnu.scm          | 119 +++++++++++++----------------
>  guix/build-system/go.scm           |  20 ++---
>  guix/build-system/guile.scm        |  21 ++---
>  guix/build-system/haskell.scm      |   8 +-
>  guix/build-system/julia.scm        |   8 +-
>  guix/build-system/linux-module.scm |  17 ++---
>  guix/build-system/maven.scm        |   8 +-
>  guix/build-system/meson.scm        |  25 ++----
>  guix/build-system/minify.scm       |   8 +-
>  guix/build-system/mix.scm          |  12 +--
>  guix/build-system/node.scm         |   8 +-
>  guix/build-system/ocaml.scm        |   9 +--
>  guix/build-system/perl.scm         |  22 ++----
>  guix/build-system/pyproject.scm    |  13 +---
>  guix/build-system/python.scm       |  12 +--
>  guix/build-system/qt.scm           |  17 ++---
>  guix/build-system/r.scm            |   9 +--
>  guix/build-system/rakudo.scm       |   8 +-
>  guix/build-system/rebar.scm        |  12 +--
>  guix/build-system/renpy.scm        |   8 +-
>  guix/build-system/ruby.scm         |  48 ++++++------
>  guix/build-system/scons.scm        |   9 +--
>  guix/build-system/texlive.scm      |  11 +--
>  guix/build-system/tree-sitter.scm  |  16 ++--
>  guix/build-system/trivial.scm      |  41 ++++------
>  guix/build-system/vim.scm          |  15 +---
>  guix/build-system/waf.scm          |  32 ++++----
>  guix/build-system/zig.scm          |   8 +-
>  guix/packages.scm                  |  53 ++++++++++---
>  46 files changed, 348 insertions(+), 520 deletions(-)

-- 
Best regards,
Nicolas Graves
[Message part 5 (text/plain, inline)]
-------------------- End of forwarded message --------------------

-- 
Best regards,
Nicolas Graves

Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Wed, 16 Oct 2024 17:07:02 GMT) Full text and rfc822 format available.

Message #158 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v4 3/5] gnu: libreoffice: Update to 24.2.6.2.
Date: Wed, 16 Oct 2024 19:06:03 +0200
* gnu/packages/libreoffice.scm (libreoffice): Update to 24.2.6.2.

Change-Id: I95ba7d5a5d1475b9c502051ecb076734a320c059
---
 gnu/packages/libreoffice.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 29e915c86d..c262ccf1c1 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -893,7 +893,7 @@ (define dtoa
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "24.2.0.3")               ;keep in sync with hunspell dictionaries
+    (version "24.2.6.2")               ;keep in sync with hunspell dictionaries
     (source
      (origin
        (method url-fetch)
@@ -906,7 +906,7 @@ (define-public libreoffice
           "https://downloadarchive.documentfoundation.org/libreoffice/old/"
           version "/src/libreoffice-" version ".tar.xz")))
        (sha256
-        (base32 "0s1m92rmizicd8jgxcjz0xsd79v148wkq0ac9yzz61x2ga8mdx0q"))))
+        (base32 "1cqxw745kzm81b2nvfpl5n2sq1k9y25y596wvjsnaq394bq4vspn"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      (list
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Wed, 16 Oct 2024 17:07:02 GMT) Full text and rfc822 format available.

Message #161 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v4 2/5] gnu: libreoffice: Update to 24.2.0.3.
Date: Wed, 16 Oct 2024 19:06:02 +0200
* gnu/packages/libreoffice.scm (libreoffice): Update to 24.2.0.3.

Change-Id: I72e0ebb4d075c47ea168b181f969a97f9249150a
---
 gnu/packages/libreoffice.scm | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index f7fd2faa62..29e915c86d 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -63,6 +63,7 @@ (define-module (gnu packages libreoffice)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages game-development)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -80,6 +81,7 @@ (define-module (gnu packages libreoffice)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages openldap)
+  #:use-module (gnu packages password-utils)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-compression)
@@ -891,16 +893,20 @@ (define dtoa
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "7.6.7.2")               ;keep in sync with hunspell dictionaries
+    (version "24.2.0.3")               ;keep in sync with hunspell dictionaries
     (source
      (origin
        (method url-fetch)
        (uri
-        (string-append
-         "https://download.documentfoundation.org/libreoffice/src/"
-         (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
+        (list
+         (string-append
+          "https://download.documentfoundation.org/libreoffice/src/"
+          (version-prefix version 3) "/libreoffice-" version ".tar.xz")
+         (string-append
+          "https://downloadarchive.documentfoundation.org/libreoffice/old/"
+          version "/src/libreoffice-" version ".tar.xz")))
        (sha256
-        (base32 "159vbv4zhibfd4xjdamcqs4h0p3h5y79kcjwrmshvjhs23p55l3m"))))
+        (base32 "0s1m92rmizicd8jgxcjz0xsd79v148wkq0ac9yzz61x2ga8mdx0q"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      (list
@@ -961,6 +967,13 @@ (define-public libreoffice
                              "shell/source/unix/misc/senddoc.sh")
                 (("/usr/bin/xdg-open")
                  (search-input-file inputs "/bin/xdg-open")))
+
+              ;; https://issues.guix.gnu.org/43579
+              (substitute* '("sal/rtl/math.cxx"
+                             "sc/source/core/tool/math.cxx")
+                (("std::(fe[gs]etround|feclearexcept|fetestexcept)" all suffix)
+                 suffix))
+
               (setenv "CPPFLAGS" "-std=c++17")))
           (add-after 'install 'reset-zip-timestamps
             (lambda _
@@ -1083,12 +1096,14 @@ (define (install-python-script name)
            cppunit
            flex
            frozen                       ;header-only library
+           gcc-12
            pkg-config
            python-wrapper
            which
            ziptime))
     (inputs
-     (list bluez
+     (list argon2
+           bluez
            boost
            box2d
            clucene
@@ -1168,6 +1183,7 @@ (define (install-python-script name)
            xdg-utils
            xmlsec-nss
            zip
+           zxcvbn-c
            zxing-cpp))
     (home-page "https://www.libreoffice.org/")
     (synopsis "Office suite")
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Wed, 16 Oct 2024 17:07:03 GMT) Full text and rfc822 format available.

Message #164 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v4 1/5] import: Add %libreoffice-updater.
Date: Wed, 16 Oct 2024 19:06:01 +0200
Change-Id: I481b1175db531c4fea4a57838fe190f679cd1a85
---
 Makefile.am                 |  1 +
 guix/import/libreoffice.scm | 98 +++++++++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)
 create mode 100644 guix/import/libreoffice.scm

diff --git a/Makefile.am b/Makefile.am
index e9801283f8..e4e4fb5a19 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -306,6 +306,7 @@ MODULES =					\
   guix/import/json.scm				\
   guix/import/kde.scm				\
   guix/import/launchpad.scm   			\
+  guix/import/libreoffice.scm 			\
   guix/import/minetest.scm   			\
   guix/import/npm-binary.scm			\
   guix/import/opam.scm				\
diff --git a/guix/import/libreoffice.scm b/guix/import/libreoffice.scm
new file mode 100644
index 0000000000..65d20f0432
--- /dev/null
+++ b/guix/import/libreoffice.scm
@@ -0,0 +1,98 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix import libreoffice)
+  #:use-module (web client)
+  #:use-module (sxml match)
+  #:use-module (sxml simple)
+  #:use-module (guix i18n)
+  #:use-module (guix diagnostics)
+  #:use-module (guix packages)
+  #:use-module (guix upstream)
+  #:use-module (guix utils)
+  #:use-module (ice-9 textual-ports)
+  #:use-module (srfi srfi-26)
+  #:use-module (srfi srfi-71)
+  #:export (%libreoffice-updater))
+
+(define archive-prefix
+  "https://downloadarchive.documentfoundation.org/libreoffice/old/")
+(define libreoffice-latest-url (string-append archive-prefix "latest/src/"))
+
+(define (libreoffice-latest-version)
+  (let* ((response port (http-get libreoffice-latest-url
+                                  #:streaming? #t))
+         (content (get-string-all port))
+         ;; xml->sxml is not flexible enough for html.
+         ;; For instance, <img> tags don't have closing </img>.
+         ;; This trick preprocesses html to extract all <a> tags in
+         ;; a <body> wrapper, which sxml-match can handle well.
+         (xml (xml->sxml
+               (string-append
+                "<body><"
+                (string-join
+                 (filter (cute string-prefix? "a " <>)
+                         (string-split content #\<))
+                 "</a><")
+                "></a></body>")
+               #:trim-whitespace? #t)))
+    (sxml-match
+     xml
+     ((*TOP*
+       (body
+        (a (@ (href "?C=N;O=D")) "Name")
+        (a (@ (href "?C=M;O=A")) "Last modified")
+        (a (@ (href "?C=S;O=A")) "Size")
+        (a (@ (href "/libreoffice/old/latest/")) "Parent Directory")
+        (a (@ (href ,link)) ,name)
+        . ,rest))
+      (if (and (string-prefix? "libreoffice-" name)
+               (string-suffix? ".tar.xz" name))
+          (string-drop
+           (string-drop-right name (string-length ".tar.xz"))
+           (string-length "libreoffice-"))
+          (raise
+           (formatted-message (G_ "Could not extract version from '~a'")
+                              name)))))))
+
+(define* (latest-release package #:key (version #f))
+  "Return an <upstream-source> for the latest-release of PACKAGE."
+  (let* ((name (package-name package))
+         (version (or version (libreoffice-latest-version))))
+    (upstream-source
+     (package name)
+     (version version)
+     (urls (list
+            (string-append
+             archive-prefix version "/src/libreoffice-" version ".tar.xz")
+            (string-append
+             "https://download.documentfoundation.org/libreoffice/src/"
+             (version-prefix version 3) "/libreoffice-" version ".tar.xz"))))))
+
+(define (libreoffice-package? package)
+  "Return true if PACKAGE is LibreOffice."
+  (string=? (package-name package) "libreoffice"))
+
+(define %libreoffice-updater
+  (upstream-updater
+   (name 'libreoffice)
+   (description "Updater for Libreoffice package")
+   (pred libreoffice-package?)
+   (import latest-release)))
+
+;; libreoffice.scm ends here.
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Wed, 16 Oct 2024 17:07:03 GMT) Full text and rfc822 format available.

Message #167 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v4 4/5] gnu: libreoffice: Update to 24.8.2.1.
Date: Wed, 16 Oct 2024 19:06:04 +0200
* gnu/packages/libreoffice.scm (libreoffice): Update to 24.8.2.1.

Change-Id: Ic37556e1c6ab4cad59507cddf00d6bc5ed650a5e
---
 gnu/packages/libreoffice.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index c262ccf1c1..1e4966e3d2 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -893,7 +893,7 @@ (define dtoa
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "24.2.6.2")               ;keep in sync with hunspell dictionaries
+    (version "24.8.2.1")               ;keep in sync with hunspell dictionaries
     (source
      (origin
        (method url-fetch)
@@ -906,7 +906,7 @@ (define-public libreoffice
           "https://downloadarchive.documentfoundation.org/libreoffice/old/"
           version "/src/libreoffice-" version ".tar.xz")))
        (sha256
-        (base32 "1cqxw745kzm81b2nvfpl5n2sq1k9y25y596wvjsnaq394bq4vspn"))))
+        (base32 "1ky4ph9g7x9k68px6x4dgfnf5wqbxqabkp75pjhsj521nsp1nc5b"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      (list
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Wed, 16 Oct 2024 17:07:04 GMT) Full text and rfc822 format available.

Message #170 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v4 5/5] gnu: hunspell-dictionary: Update to 24.8.2.1.
Date: Wed, 16 Oct 2024 19:06:05 +0200
* gnu/packages/hunspell.scm (hunspell-dictionary): Update to 24.8.2.1.
[source]<origin>: Change url, anongit returns gateway http errors 504.

Change-Id: Ida030cc94a406ace042eccbe75f60d4505e18a11
---
 gnu/packages/hunspell.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm
index 8c076de3c4..eed10b16bb 100644
--- a/gnu/packages/hunspell.scm
+++ b/gnu/packages/hunspell.scm
@@ -309,18 +309,17 @@ (define* (hunspell-dictionary dict-name full-name #:key synopsis home-page licen
                          (#\_ #\-)
                          (chr chr))
                        (string-downcase dict-name))))
-    (version "7.6.7.2")
+    (version "24.8.2.1")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url (string-append "https://anongit.freedesktop.org/git/"
-                                 "libreoffice/dictionaries.git/"))
+             (url "https://github.com/LibreOffice/dictionaries")
              (commit
               (string-append "libreoffice-" version))))
        (file-name (git-file-name "libreoffice-dictionaries" version))
        (sha256
-        (base32 "1f54z1kmpwv9s5a9jdgf97m43nhwbmsar0i6rri3qkgf3kkgz1f7"))))
+        (base32 "02dhpfrhp82p08hx89lfx2gjbyp0kk2vbapmb3g7fphc9pabpg9c"))))
     (build-system trivial-build-system)
     (native-inputs
      `(("source" ,source)))
-- 
2.46.0





Added tag(s) moreinfo. Request was from Nicolas Graves <ngraves <at> ngraves.fr> to control <at> debbugs.gnu.org. (Mon, 21 Oct 2024 08:57:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:03 GMT) Full text and rfc822 format available.

Message #175 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 00/47] Extend bag-build to gexp.
Date: Sun,  9 Feb 2025 01:50:40 +0100
This is simply a rebased version of v1.

Nicolas Graves (47):
  guix: packages: Extend bag-build to support gexp.
  build-system: gnu: Improve gnu-cross-build style.
  build-system: gnu: Redefine gnu-build and gnu-cross-build.
  build-system: agda: Redefine agda-build.
  build-system: android-ndk: Redefine gnu-build.
  build-system: ant: Redefine ant-build.
  build-system: asdf: Redefine asdf-build.
  build-system: cargo: Redefine cargo-build and cargo-cross-build.
  build-system: chicken: Redefine chicken-build.
  build-system: clojure: Redefine clojure-build.
  build-system: cmake: Redefine cmake-build and cmake-cross-build.
  build-system: composer: Redefine composer-build.
  build-system: copy: Redefine copy-build.
  build-system: dub: Redefine dub-build.
  build-system: dune: Redefine dune-build.
  build-system: elm: Redefine elm-build.
  build-system: emacs: Redefine emacs-build.
  build-system: font: Redefine font-build.
  build-system: glib-or-gtk: Improve glib-or-gtk-cross-build style.
  build-system: glib-or-gtk: Redefine glib-or-gtk-build functions.
  build-system: go: Redefine go-build and go-cross-build.
  build-system: guile: Redefine guile-build and guile-cross-build.
  build-system: haskell: Redefine haskell-build.
  build-system: julia: Redefine julia-build.
  build-system: linux-module: Redefine linux-module-build functions.
  build-system: maven: Redefine maven-build.
  build-system: meson: Redefine meson-build and meson-cross-build.
  build-system: minify: Redefine minify-build.
  build-system: mix: Redefine mix-build.
  build-system: node: Redefine node-build.
  build-system: ocaml: Redefine ocaml-build.
  build-system: perl: Redefine perl-build and perl-cross-build.
  build-system: pyproject: Redefine pyproject-build.
  build-system: python: Redefine python-build.
  build-system: qt: Redefine qt-build and qt-cross-build.
  build-system: r: Redefine r-build.
  build-system: rakudo: Redefine rakudo-build.
  build-system: rebar: Redefine rebar-build.
  build-system: renpy: Redefine renpy-build.
  build-system: ruby: Improve ruby-cross-build style.
  build-system: ruby: Redefine ruby-build.
  build-system: scons: Redefine scons-build.
  build-system: texlive: Redefine texlive-build.
  build-system: tree-sitter: Redefine tree-sitter-build functions.
  build-system: vim: Redefine vim-build.
  build-system: waf: Improve waf-build style.
  build-system: zig: Redefine zig-build.

 guix/build-system.scm              |   2 +-
 guix/build-system/agda.scm         |   8 +-
 guix/build-system/android-ndk.scm  |   8 +-
 guix/build-system/ant.scm          |   8 +-
 guix/build-system/asdf.scm         |   8 +-
 guix/build-system/cargo.scm        |  19 ++---
 guix/build-system/chicken.scm      |   8 +-
 guix/build-system/clojure.scm      |   8 +-
 guix/build-system/cmake.scm        |  27 ++-----
 guix/build-system/composer.scm     |   9 +--
 guix/build-system/copy.scm         |  11 +--
 guix/build-system/dub.scm          |   8 +-
 guix/build-system/dune.scm         |   9 +--
 guix/build-system/elm.scm          |   8 +-
 guix/build-system/emacs.scm        |   8 +-
 guix/build-system/font.scm         |  10 +--
 guix/build-system/glib-or-gtk.scm  | 115 ++++++++++++---------------
 guix/build-system/gnu.scm          | 121 +++++++++++++----------------
 guix/build-system/go.scm           |  20 ++---
 guix/build-system/guile.scm        |  21 ++---
 guix/build-system/haskell.scm      |   8 +-
 guix/build-system/julia.scm        |   8 +-
 guix/build-system/linux-module.scm |  17 ++--
 guix/build-system/maven.scm        |   8 +-
 guix/build-system/meson.scm        |  25 ++----
 guix/build-system/minify.scm       |   8 +-
 guix/build-system/mix.scm          |  12 +--
 guix/build-system/node.scm         |   8 +-
 guix/build-system/ocaml.scm        |   9 +--
 guix/build-system/perl.scm         |  22 ++----
 guix/build-system/pyproject.scm    |  15 +---
 guix/build-system/python.scm       |  15 ++--
 guix/build-system/qt.scm           |  21 ++---
 guix/build-system/r.scm            |   9 +--
 guix/build-system/rakudo.scm       |   8 +-
 guix/build-system/rebar.scm        |  12 +--
 guix/build-system/renpy.scm        |   8 +-
 guix/build-system/ruby.scm         |  48 ++++++------
 guix/build-system/scons.scm        |   9 +--
 guix/build-system/texlive.scm      |  11 +--
 guix/build-system/tree-sitter.scm  |  16 ++--
 guix/build-system/vim.scm          |  15 +---
 guix/build-system/waf.scm          |  32 ++++----
 guix/build-system/zig.scm          |   8 +-
 guix/packages.scm                  |  53 ++++++++++---
 45 files changed, 334 insertions(+), 507 deletions(-)

-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:04 GMT) Full text and rfc822 format available.

Message #178 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 01/47] guix: packages: Extend bag-build to support gexp.
Date: Sun,  9 Feb 2025 01:50:41 +0100
* guix/build-system.scm: Update comment.
* guix/packages.scm
(bag->derivation): Rename function to bag-builder. Create new function.
(bag->cross-derivation): Rename to bag-cross-builder.

Change-Id: I56c5a9dab9954307f95b29eab5e02ee058271684
---
 guix/build-system.scm |  2 +-
 guix/packages.scm     | 53 +++++++++++++++++++++++++++++++++++--------
 2 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/guix/build-system.scm b/guix/build-system.scm
index 76d670995c..a4dcdc52d8 100644
--- a/guix/build-system.scm
+++ b/guix/build-system.scm
@@ -79,7 +79,7 @@ (define-record-type* <bag> bag %make-bag
                  (default '("out")))
   (arguments     bag-arguments           ;list
                  (default '()))
-  (build         bag-build))             ;bag -> derivation
+  (build         bag-build))             ;bag -> gexp or derivation
 
 (define* (make-bag build-system name
                    #:key source (inputs '()) (native-inputs '())
diff --git a/guix/packages.scm b/guix/packages.scm
index 78726b089a..5b9ccfe3be 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2023 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2024 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,6 +52,7 @@ (define-module (guix packages)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
   #:use-module (ice-9 regex)
+  #:use-module (ice-9 optargs)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9 gnu)
   #:use-module (srfi srfi-26)
@@ -1962,12 +1964,12 @@ (define (input=? input1 input2)
                       (derivation=? obj1 obj2))
                  (equal? obj1 obj2))))))))
 
-(define* (bag->derivation bag #:optional context)
-  "Return the derivation to build BAG for SYSTEM.  Optionally, CONTEXT can be
-a package object describing the context in which the call occurs, for improved
-error reporting."
+(define* (bag-builder bag #:optional context)
+  "Return the gexp or derivation to build BAG for SYSTEM.  Optionally, CONTEXT
+can be a package object describing the context in which the call occurs, for
+improved error reporting."
   (if (bag-target bag)
-      (bag->cross-derivation bag)
+      (bag-cross-builder bag)
       (mlet* %store-monad ((system ->  (bag-system bag))
                            (inputs ->  (bag-transitive-inputs bag))
                            (input-drvs (mapm %store-monad
@@ -1989,10 +1991,10 @@ (define* (bag->derivation bag #:optional context)
                #:outputs (bag-outputs bag) #:system system
                (bag-arguments bag)))))
 
-(define* (bag->cross-derivation bag #:optional context)
-  "Return the derivation to build BAG, which is actually a cross build.
-Optionally, CONTEXT can be a package object denoting the context of the call.
-This is an internal procedure."
+(define* (bag-cross-builder bag #:optional context)
+  "Return the gexp or derivation to build BAG, which is actually a cross
+build. Optionally, CONTEXT can be a package object denoting the context of the
+call. This is an internal procedure."
   (mlet* %store-monad ((system ->   (bag-system bag))
                        (target ->   (bag-target bag))
                        (host ->     (bag-transitive-host-inputs bag))
@@ -2033,6 +2035,39 @@ (define* (bag->cross-derivation bag #:optional context)
            #:system system #:target target
            (bag-arguments bag))))
 
+(define* (bag->derivation bag #:optional context)
+  "Return the derivation to build BAG for SYSTEM.  Optionally, CONTEXT can be
+a package object describing the context in which the call occurs, for improved
+error reporting."
+  (mlet %store-monad ((builder (bag-builder bag context)))
+    (match builder
+      ((? derivation? drv)
+       (return drv))
+      ((? gexp gexp)
+       (let-keywords (bag-arguments bag) #t
+                     ((allowed-references    #f)
+                      (disallowed-references #f)
+                      (guile                 #f)
+                      (substitutable?        #t))
+         (mlet %store-monad
+             ((guile (package->derivation (or guile (default-guile))
+                                          (bag-system bag)
+                                          #:graft? #f)))
+           ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
+           ;; co. would be interpreted as referring to grafted packages.
+           (gexp->derivation (bag-name bag) gexp
+                             #:system (bag-system bag)
+                             #:target (and (bag-target bag))
+                             #:graft? #f
+                             #:substitutable? substitutable?
+                             #:allowed-references allowed-references
+                             #:disallowed-references disallowed-references
+                             #:guile-for-build guile))))
+      ;; build-bag has to be drv or gexp, else raise.
+      (_
+       (raise (condition (&package-error
+                          (package context))))))))
+
 (define bag->derivation*
   (store-lower bag->derivation))
 
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:06 GMT) Full text and rfc822 format available.

Message #181 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 02/47] build-system: gnu: Improve gnu-cross-build style.
Date: Sun,  9 Feb 2025 01:50:42 +0100
* guix/build-system/gnu.scm
(gnu-cross-build): Use with-imported-modules around the
gnu-cross-build builder gexp.

Change-Id: I47246571b1d84a82a67a8c289fd5ad4b5a3b5aeb
---
 guix/build-system/gnu.scm | 96 ++++++++++++++++++++-------------------
 1 file changed, 49 insertions(+), 47 deletions(-)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 3a314d34b7..a71162c300 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012-2024 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -520,59 +521,60 @@ (define* (gnu-cross-build name
 cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
 platform."
   (define builder
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        (define %build-host-inputs
-          #+(input-tuples->gexp build-inputs))
+          (define %build-host-inputs
+            #+(input-tuples->gexp build-inputs))
 
-        (define %build-target-inputs
-          (append #$(input-tuples->gexp host-inputs)
-                  #+(input-tuples->gexp target-inputs)))
+          (define %build-target-inputs
+            (append #$(input-tuples->gexp host-inputs)
+                    #+(input-tuples->gexp target-inputs)))
 
-        (define %build-inputs
-          (append %build-host-inputs %build-target-inputs))
+          (define %build-inputs
+            (append %build-host-inputs %build-target-inputs))
 
-        (define %outputs
-          #$(outputs->gexp outputs))
+          (define %outputs
+            #$(outputs->gexp outputs))
 
-        (gnu-build #:source #+source
-                   #:system #$system
-                   #:build #$build
-                   #:target #$target
-                   #:outputs %outputs
-                   #:inputs %build-target-inputs
-                   #:native-inputs %build-host-inputs
-                   #:search-paths '#$(sexp->gexp
-                                      (map search-path-specification->sexp
-                                           search-paths))
-                   #:native-search-paths '#$(sexp->gexp
-                                             (map
-                                              search-path-specification->sexp
-                                              native-search-paths))
-                   #:phases #$(if (pair? phases)
-                                  (sexp->gexp phases)
-                                  phases)
-                   #:locale #$locale
-                   #:separate-from-pid1? #$separate-from-pid1?
-                   #:bootstrap-scripts #$bootstrap-scripts
-                   #:configure-flags #$configure-flags
-                   #:make-flags #$make-flags
-                   #:out-of-source? #$out-of-source?
-                   #:tests? #$tests?
-                   #:test-target #$test-target
-                   #:parallel-build? #$parallel-build?
-                   #:parallel-tests? #$parallel-tests?
-                   #:patch-shebangs? #$patch-shebangs?
-                   #:license-file-regexp #$license-file-regexp
-                   #:strip-binaries? #$strip-binaries?
-                   #:validate-runpath? #$validate-runpath?
-                   #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
-                   #:license-file-regexp #$license-file-regexp
-                   #:strip-flags #$strip-flags
-                   #:strip-directories #$strip-directories)))
+          (gnu-build #:source #+source
+                     #:system #$system
+                     #:build #$build
+                     #:target #$target
+                     #:outputs %outputs
+                     #:inputs %build-target-inputs
+                     #:native-inputs %build-host-inputs
+                     #:search-paths '#$(sexp->gexp
+                                        (map search-path-specification->sexp
+                                             search-paths))
+                     #:native-search-paths '#$(sexp->gexp
+                                               (map
+                                                search-path-specification->sexp
+                                                native-search-paths))
+                     #:phases #$(if (pair? phases)
+                                    (sexp->gexp phases)
+                                    phases)
+                     #:locale #$locale
+                     #:separate-from-pid1? #$separate-from-pid1?
+                     #:bootstrap-scripts #$bootstrap-scripts
+                     #:configure-flags #$configure-flags
+                     #:make-flags #$make-flags
+                     #:out-of-source? #$out-of-source?
+                     #:tests? #$tests?
+                     #:test-target #$test-target
+                     #:parallel-build? #$parallel-build?
+                     #:parallel-tests? #$parallel-tests?
+                     #:patch-shebangs? #$patch-shebangs?
+                     #:license-file-regexp #$license-file-regexp
+                     #:strip-binaries? #$strip-binaries?
+                     #:validate-runpath? #$validate-runpath?
+                     #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+                     #:license-file-regexp #$license-file-regexp
+                     #:strip-flags #$strip-flags
+                     #:strip-directories #$strip-directories))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+    (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
     (gexp->derivation name builder
                       #:system system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:07 GMT) Full text and rfc822 format available.

Message #184 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 04/47] build-system: agda: Redefine agda-build.
Date: Sun,  9 Feb 2025 01:50:44 +0100
* guix/build-system/agda.scm
(agda-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I3c21a043a0687f4776d44297ed3dd4697a606b40
---
 guix/build-system/agda.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/agda.scm b/guix/build-system/agda.scm
index ec6ad860e0..b33737ffa2 100644
--- a/guix/build-system/agda.scm
+++ b/guix/build-system/agda.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Josselin Poiret <dev <at> jpoiret.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,11 +109,8 @@ (define builder
                       #:plan '#$plan
                       #:extra-files '#$extra-files))))
 
-  (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 agda-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:08 GMT) Full text and rfc822 format available.

Message #187 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 03/47] build-system: gnu: Redefine gnu-build and
 gnu-cross-build.
Date: Sun,  9 Feb 2025 01:50:43 +0100
* guix/build-system/gnu.scm
(gnu-build): Monadic procedure returns a gexp instead of a derivation.
(gnu-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I6bf922ecd1474df104f959989db315d7ddc278b6
---
 guix/build-system/gnu.scm | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index a71162c300..865301a92c 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -429,18 +429,8 @@ (define builder
                            #:strip-flags #$strip-flags
                            #:strip-directories #$strip-directories)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
-    ;; co. would be interpreted as referring to grafted packages.
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -574,17 +564,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
-                      #:modules imported-modules
-                      #:substitutable? substitutable?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+    (mbegin %store-monad
+      (return builder)))
 
 (define gnu-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:09 GMT) Full text and rfc822 format available.

Message #190 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 05/47] build-system: android-ndk: Redefine gnu-build.
Date: Sun,  9 Feb 2025 01:50:45 +0100
* guix/build-system/android-ndk.scm
(android-ndk-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: If1737d77ebccd418ad461c91aff170273855ed45
---
 guix/build-system/android-ndk.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm
index b8cd56b871..66cd96c725 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Danny Milosavljevic <dannym <at> scratchpost.org>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,11 +74,8 @@ (define builder
                                                      search-paths))
                              #: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* (lower name
                 #:key source inputs native-inputs outputs system target
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:09 GMT) Full text and rfc822 format available.

Message #193 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 06/47] build-system: ant: Redefine ant-build.
Date: Sun,  9 Feb 2025 01:50:46 +0100
* guix/build-system/ant.scm
(ant-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I4f1152e29b938dbf37125bf156fb56b841011f06
---
 guix/build-system/ant.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index 9816cc061c..3ce919032f 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -144,11 +145,8 @@ (define builder
                                              search-paths))
                      #: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 ant-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:10 GMT) Full text and rfc822 format available.

Message #196 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 07/47] build-system: asdf: Redefine asdf-build.
Date: Sun,  9 Feb 2025 01:50:47 +0100
* guix/build-system/asdf.scm
(asdf-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ifdd57c4e5279d110ee7c670090b3ae4089703659
---
 guix/build-system/asdf.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 26b5a5008a..c778bd36e2 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2022 Pierre Neidhardt <mail <at> ambrevar.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -318,11 +319,8 @@ (define builder
                                                   search-paths))
                           #: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 asdf-build-system/sbcl
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:11 GMT) Full text and rfc822 format available.

Message #199 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 08/47] build-system: cargo: Redefine cargo-build and
 cargo-cross-build.
Date: Sun,  9 Feb 2025 01:50:48 +0100
* 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 452f7f78d0..4d130ab706 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2021, 2024 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee>
 ;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; 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.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:11 GMT) Full text and rfc822 format available.

Message #202 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 09/47] build-system: chicken: Redefine chicken-build.
Date: Sun,  9 Feb 2025 01:50:49 +0100
* guix/build-system/chicken.scm
(chicken-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I6a837f198ac6c371b08f8690ff5bea68dbad2b54
---
 guix/build-system/chicken.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index e6fcfa7ee3..5c4a7f45bb 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 raingloom <raingloom <at> riseup.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -113,11 +114,8 @@ (define builder
                          #:tests? #$tests?
                          #: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 chicken-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:12 GMT) Full text and rfc822 format available.

Message #205 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 10/47] build-system: clojure: Redefine clojure-build.
Date: Sun,  9 Feb 2025 01:50:50 +0100
* guix/build-system/clojure.scm
(clojure-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I5b5b552052cfffc45bc4d82871600b322eb23d85
---
 guix/build-system/clojure.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index 037fcaf21d..cddcf8304e 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Alex Vong <alexvong1995 <at> gmail.com>
 ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -169,11 +170,8 @@ (define builder
                          #:system #$system
                          #: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 clojure-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:12 GMT) Full text and rfc822 format available.

Message #208 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 11/47] build-system: cmake: Redefine cmake-build and
 cmake-cross-build.
Date: Sun,  9 Feb 2025 01:50:51 +0100
* guix/build-system/cmake.scm
(cmake-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I0c3ceb08391a38c52521416093d2c4b2ae869165
---
 guix/build-system/cmake.scm | 27 ++++++---------------------
 1 file changed, 6 insertions(+), 21 deletions(-)

diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index 9d757c0d06..2051f71f88 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml <at> gmail.com>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -129,7 +130,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))
@@ -161,16 +162,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?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -263,16 +256,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?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define cmake-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:13 GMT) Full text and rfc822 format available.

Message #211 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 12/47] build-system: composer: Redefine composer-build.
Date: Sun,  9 Feb 2025 01:50:52 +0100
* guix/build-system/composer.scm
(composer-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib7787a5116744e61e3d0afeac6d85f61c6b6c9c4
---
 guix/build-system/composer.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/composer.scm b/guix/build-system/composer.scm
index 48ad90f253..ceb2bf6880 100644
--- a/guix/build-system/composer.scm
+++ b/guix/build-system/composer.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Julien Lepiller <julien <at> lepiller.eu>
+;;; Copyright © 2023-2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +19,7 @@
 
 (define-module (guix build-system composer)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix derivations)
   #:use-module (guix search-paths)
@@ -151,11 +153,8 @@ (define builder
                    #:strip-flags #$strip-flags
                    #:strip-directories #$strip-directories))))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define composer-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:14 GMT) Full text and rfc822 format available.

Message #214 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 13/47] build-system: copy: Redefine copy-build.
Date: Sun,  9 Feb 2025 01:50:53 +0100
* guix/build-system/copy.scm
(copy-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I96dfa099501796df007143db63a49e2adedbee92
---
 guix/build-system/copy.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index 1f2937e0f1..ec0f3d9542 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Pierre Neidhardt <mail <at> ambrevar.xyz>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,14 +127,8 @@ (define builder
                             #: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 #f
-                      #:substitutable? substitutable?
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define copy-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:15 GMT) Full text and rfc822 format available.

Message #217 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 14/47] build-system: dub: Redefine dub-build.
Date: Sun,  9 Feb 2025 01:50:54 +0100
* guix/build-system/dub.scm
(dub-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I678a7287172157688b95cab00175e61852a99c58
---
 guix/build-system/dub.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 831a34af0d..170f247e5d 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2016 David Craven <david <at> craven.ch>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym <at> scratchpost.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -93,11 +94,8 @@ (define builder
                                              search-paths))
                      #: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* (lower name
                 #:key source inputs native-inputs outputs system target
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:15 GMT) Full text and rfc822 format available.

Message #220 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 15/47] build-system: dune: Redefine dune-build.
Date: Sun,  9 Feb 2025 01:50:55 +0100
* guix/build-system/dune.scm
(dune-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I2a0a9a771afbe491538ed50aeb47b9fa4fd9341b
---
 guix/build-system/dune.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index c45f308349..990d94db0f 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 pukkamustard <pukkamustard <at> posteo.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,7 @@
 
 (define-module (guix build-system dune)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix search-paths)
@@ -152,11 +154,8 @@ (define builder
                       #:strip-flags #$strip-flags
                       #:strip-directories #$strip-directories))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define dune-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:16 GMT) Full text and rfc822 format available.

Message #223 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 16/47] build-system: elm: Redefine elm-build.
Date: Sun,  9 Feb 2025 01:50:56 +0100
* guix/build-system/elm.scm
(elm-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I9d45b254d5e8fdc337d075e7394e3354c9186ea6
---
 guix/build-system/elm.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/elm.scm b/guix/build-system/elm.scm
index 7405db3d98..aa842ca9c6 100644
--- a/guix/build-system/elm.scm
+++ b/guix/build-system/elm.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Philip McGrath <philip <at> philipmcgrath.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -193,11 +194,8 @@ (define builder
                                         (map search-path-specification->sexp
                                              search-paths))
                      #: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 elm-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:16 GMT) Full text and rfc822 format available.

Message #226 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 17/47] build-system: emacs: Redefine emacs-build.
Date: Sun,  9 Feb 2025 01:50:57 +0100
* guix/build-system/emacs.scm
(emacs-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I89cc8c1171eef7c5e02e35df5e1298ce3813c1b5
---
 guix/build-system/emacs.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 03273d738b..d0276f5cb8 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith <at> outlook.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -116,11 +117,8 @@ (define builder
                                                search-paths))
                        #: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 emacs-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:17 GMT) Full text and rfc822 format available.

Message #229 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 18/47] build-system: font: Redefine font-build.
Date: Sun,  9 Feb 2025 01:50:58 +0100
* guix/build-system/font.scm
(font-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I2a4838fc616e4ef8819b292d6842961284288867
---
 guix/build-system/font.scm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index a4eeca00ca..1cab4a4e9d 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2022 Arun Isaac <arunisaac <at> systemreboot.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,13 +109,8 @@ (define builder
                                                     search-paths))
                             #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define font-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:17 GMT) Full text and rfc822 format available.

Message #232 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 19/47] build-system: glib-or-gtk: Improve
 glib-or-gtk-cross-build style.
Date: Sun,  9 Feb 2025 01:50:59 +0100
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-cross-build): Use with-imported-modules around the
glib-or-gtk-cross-build builder gexp.

Change-Id: I8eaa032ffc0a3f8dbf02c96a4ecee85475c32111
---
 guix/build-system/glib-or-gtk.scm | 89 +++++++++++++++----------------
 1 file changed, 44 insertions(+), 45 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 5d026ec5ab..e1cc83c012 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -224,55 +224,55 @@ (define* (glib-or-gtk-cross-build name
                                   disallowed-references)
   "Cross-build SOURCE with INPUTS.  See GNU-BUILD for more details."
   (define builder
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        (define %build-host-inputs
-          #+(input-tuples->gexp build-inputs))
+          (define %build-host-inputs
+            #+(input-tuples->gexp build-inputs))
 
-        (define %build-target-inputs
-          (append #$(input-tuples->gexp host-inputs)
-                  #+(input-tuples->gexp target-inputs)))
+          (define %build-target-inputs
+            (append #$(input-tuples->gexp host-inputs)
+                    #+(input-tuples->gexp target-inputs)))
 
-        (define %build-inputs
-          (append %build-host-inputs %build-target-inputs))
+          (define %build-inputs
+            (append %build-host-inputs %build-target-inputs))
 
-        (define %outputs
-          #$(outputs->gexp outputs))
-
-        (glib-or-gtk-build #:source #+source
-                           #:system #$system
-                           #:build #$build
-                           #:target #$target
-                           #:outputs %outputs
-                           #:inputs %build-target-inputs
-                           #:native-inputs %build-host-inputs
-                           #:search-paths '#$(sexp->gexp
-                                              (map search-path-specification->sexp
-                                                   search-paths))
-                           #:native-search-paths '#$(sexp->gexp
-                                                     (map search-path-specification->sexp
-                                                          native-search-paths))
-                           #:phases #$(if (pair? phases)
-                                          (sexp->gexp phases)
-                                          phases)
-                           #:glib-or-gtk-wrap-excluded-outputs
-                           #$glib-or-gtk-wrap-excluded-outputs
-                           #:configure-flags #$configure-flags
-                           #:make-flags #$make-flags
-                           #:out-of-source? #$out-of-source?
-                           #:tests? #$tests?
-                           #:test-target #$test-target
-                           #:parallel-build? #$parallel-build?
-                           #:parallel-tests? #$parallel-tests?
-                           #:validate-runpath? #$validate-runpath?
-                           #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
-                           #:patch-shebangs? #$patch-shebangs?
-                           #:strip-binaries? #$strip-binaries?
-                           #:strip-flags #$strip-flags
-                           #:strip-directories
-                           #$strip-directories)))
+          (define %outputs
+            #$(outputs->gexp outputs))
 
+          (glib-or-gtk-build #:source #+source
+                             #:system #$system
+                             #:build #$build
+                             #:target #$target
+                             #:outputs %outputs
+                             #:inputs %build-target-inputs
+                             #:native-inputs %build-host-inputs
+                             #:search-paths '#$(sexp->gexp
+                                                (map search-path-specification->sexp
+                                                     search-paths))
+                             #:native-search-paths '#$(sexp->gexp
+                                                       (map search-path-specification->sexp
+                                                            native-search-paths))
+                             #:phases #$(if (pair? phases)
+                                            (sexp->gexp phases)
+                                            phases)
+                             #:glib-or-gtk-wrap-excluded-outputs
+                             #$glib-or-gtk-wrap-excluded-outputs
+                             #:configure-flags #$configure-flags
+                             #:make-flags #$make-flags
+                             #:out-of-source? #$out-of-source?
+                             #:tests? #$tests?
+                             #:test-target #$test-target
+                             #:parallel-build? #$parallel-build?
+                             #:parallel-tests? #$parallel-tests?
+                             #:validate-runpath? #$validate-runpath?
+                             #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+                             #:patch-shebangs? #$patch-shebangs?
+                             #:strip-binaries? #$strip-binaries?
+                             #:strip-flags #$strip-flags
+                             #:strip-directories
+                             #$strip-directories))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -280,7 +280,6 @@ (define %outputs
                       #:system system
                       #:target target
                       #:graft? #f
-                      #:modules imported-modules
                       #:allowed-references allowed-references
                       #:disallowed-references disallowed-references
                       #:guile-for-build guile)))
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:18 GMT) Full text and rfc822 format available.

Message #235 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 20/47] build-system: glib-or-gtk: Redefine
 glib-or-gtk-build functions.
Date: Sun,  9 Feb 2025 01:51:00 +0100
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-build): Monadic procedure returns a gexp instead of a derivation.
(glib-or-gtk-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I24f722e47f3ecce7132a7647b5689f6c10abbfd6
---
 guix/build-system/glib-or-gtk.scm | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index e1cc83c012..170a9e9dd0 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml <at> gmail.com>
 ;;; Copyright © 2014 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -148,7 +149,7 @@ (define* (glib-or-gtk-build name inputs
                             allowed-references
                             disallowed-references)
   "Build SOURCE with INPUTS.  See GNU-BUILD for more details."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -180,16 +181,8 @@ (define build
                                    #: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
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (glib-or-gtk-cross-build name
                                   #:key
@@ -274,15 +267,8 @@ (define %outputs
                              #: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
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define glib-or-gtk-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:18 GMT) Full text and rfc822 format available.

Message #238 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 22/47] build-system: guile: Redefine guile-build and
 guile-cross-build.
Date: Sun,  9 Feb 2025 01:51:02 +0100
* guix/build-system/guile.scm
(guile-build): Monadic procedure returns a gexp instead of a derivation.
(guile-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I60f2d7707f064ef6a678e8e47e21309d0eb545ef
---
 guix/build-system/guile.scm | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm
index ee59bb15f2..06bd68aad3 100644
--- a/guix/build-system/guile.scm
+++ b/guix/build-system/guile.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018-2019, 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,14 +110,8 @@ (define builder
                        #:search-paths '#$(map search-path-specification->sexp
                                               search-paths)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (guile-cross-build name
                             #:key
@@ -170,14 +165,8 @@ (define %outputs
                        #:make-dynamic-linker-cache? #f ;cross-compiling
                        #:phases #$phases))))
 
-  (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 guile-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:19 GMT) Full text and rfc822 format available.

Message #241 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 21/47] build-system: go: Redefine go-build and
 go-cross-build.
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 <cdo <at> mutix.org>
 ;;; Copyright © 2024 Troy Figiel <troy <at> troyfigiel.com>
 ;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; 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





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:19 GMT) Full text and rfc822 format available.

Message #244 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 23/47] build-system: haskell: Redefine haskell-build.
Date: Sun,  9 Feb 2025 01:51:03 +0100
* guix/build-system/haskell.scm
(haskell-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Iaa4e6af7a69a9bd2710572054b1f304a7701f113
---
 guix/build-system/haskell.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index b0019dd014..f734584cf5 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -178,11 +179,8 @@ (define builder
                                                        search-paths))
                                #: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 haskell-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:19 GMT) Full text and rfc822 format available.

Message #247 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 24/47] build-system: julia: Redefine julia-build.
Date: Sun,  9 Feb 2025 01:51:04 +0100
* guix/build-system/julia.scm
(julia-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I34303f6cc1423e60f3aa8f66409ca0563e9876cb
---
 guix/build-system/julia.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index e098749683..57c403f4d0 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv <at> pm.me>
 ;;; Copyright © 2021, 2022 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2022 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -111,11 +112,8 @@ (define builder
                        #:julia-package-uuid #$julia-package-uuid
                        #:julia-package-dependencies #$julia-package-dependencies))))
 
-  (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 julia-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:20 GMT) Full text and rfc822 format available.

Message #250 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 25/47] build-system: linux-module: Redefine
 linux-module-build functions.
Date: Sun,  9 Feb 2025 01:51:05 +0100
* guix/build-system/linux-module.scm
(linux-module-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I289c0c77a219445ae0c21f1a9709a67063b38f55
---
 guix/build-system/linux-module.scm | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index d8ebef60d0..a0d213abd5 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -190,12 +191,8 @@ (define builder
                                     #:parallel-build? #$parallel-build?
                                     #: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
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (linux-module-build-cross
           name
@@ -250,12 +247,8 @@ (define %build-target-inputs
                               #:phases #$phases
                               #:tests? #$tests?))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:guile-for-build guile
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define linux-module-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:20 GMT) Full text and rfc822 format available.

Message #253 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 26/47] build-system: maven: Redefine maven-build.
Date: Sun,  9 Feb 2025 01:51:06 +0100
* guix/build-system/maven.scm
(maven-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ieb96bcdb1c654371279bd7295ea69e2dfad71175
---
 guix/build-system/maven.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 03e4e96b89..270fceb350 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -185,11 +186,8 @@ (define builder
                        #: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
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define maven-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:21 GMT) Full text and rfc822 format available.

Message #256 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 28/47] build-system: minify: Redefine minify-build.
Date: Sun,  9 Feb 2025 01:51:08 +0100
* guix/build-system/minify.scm
(minify-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib009adcec6791d7145ce0d822745495dad9cf6e5
---
 guix/build-system/minify.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 98c6e75980..56590f6819 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017, 2018, 2023 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -97,11 +98,8 @@ (define builder
                                                 search-paths))
                         #: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 minify-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:21 GMT) Full text and rfc822 format available.

Message #259 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 27/47] build-system: meson: Redefine meson-build and
 meson-cross-build.
Date: Sun,  9 Feb 2025 01:51:07 +0100
* guix/build-system/meson.scm
(meson-build): Monadic procedure returns a gexp instead of a derivation.
(meson-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Id801e757463080dbeedc05a43bd0b2ae23fae4c7
---
 guix/build-system/meson.scm | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 5eeeb59e65..585a3515c1 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021-2022, 2024 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -254,16 +255,8 @@ (define build-phases
                              #:strip-directories #$strip-directories
                              #:elf-directories #$(sexp->gexp elf-directories))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (meson-cross-build name
                             #:key
@@ -370,16 +363,8 @@ (define build-phases
                        #:strip-directories #$strip-directories
                        #:elf-directories #$(sexp->gexp elf-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?
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define meson-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:22 GMT) Full text and rfc822 format available.

Message #262 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 29/47] build-system: mix: Redefine mix-build.
Date: Sun,  9 Feb 2025 01:51:09 +0100
* guix/build-system/mix.scm
(mix-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8a31c048d1458ece0f906023763b4585502f7710
---
 guix/build-system/mix.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/guix/build-system/mix.scm b/guix/build-system/mix.scm
index 4a3ba9fb60..6de09f587f 100644
--- a/guix/build-system/mix.scm
+++ b/guix/build-system/mix.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Pierre-Henry Fröhring <contact <at> phfrohring.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -125,15 +126,8 @@ (define builder
                            #:inputs
                            %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system
-                                                  #:graft? #f)))
-    (gexp->derivation name
-                      builder
-                      #:system system
-                      #:graft? #f       ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (lower name
                 #:key
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:22 GMT) Full text and rfc822 format available.

Message #265 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 30/47] build-system: node: Redefine node-build.
Date: Sun,  9 Feb 2025 01:51:10 +0100
* guix/build-system/node.scm
(node-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I507547e474c379c0f66dde15abad73787953e5e6
---
 guix/build-system/node.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 57fe5f6030..5116bc4a42 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2021 Philip McGrath <philip <at> philipmcgrath.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,11 +109,8 @@ (define builder
                                               search-paths))
                       #: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 node-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:23 GMT) Full text and rfc822 format available.

Message #268 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 31/47] build-system: ocaml: Redefine ocaml-build.
Date: Sun,  9 Feb 2025 01:51:11 +0100
* guix/build-system/ocaml.scm
(ocaml-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ib525ddc1df03b33b95a433dd2add79405f611f94
---
 guix/build-system/ocaml.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 2f2e6dd62e..cd4c877048 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 (define-module (guix build-system ocaml)
   #:use-module (guix store)
+  #:use-module (guix monads)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (guix search-paths)
@@ -305,11 +307,8 @@ (define builder
                        #:strip-flags #$strip-flags
                        #:strip-directories #$strip-directories))))
 
-  (gexp->derivation name builder
-                    #:system system
-                    #:target #f
-                    #:graft? #f
-                    #:guile-for-build guile))
+  (mbegin %store-monad
+    (return builder)))
 
 (define ocaml-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:23 GMT) Full text and rfc822 format available.

Message #271 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 32/47] build-system: perl: Redefine perl-build and
 perl-cross-build.
Date: Sun,  9 Feb 2025 01:51:12 +0100
* guix/build-system/perl.scm
(perl-build): Monadic procedure returns a gexp instead of a derivation.
(perl-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Id54ae050c2b64269ea42ec9f89d9c3a84ad4429a
---
 guix/build-system/perl.scm | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 98d48fec7c..3f088fa6bf 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,7 @@ (define* (perl-build name inputs
                                 (guix build utils))))
   "Build SOURCE using PERL, and with INPUTS.  This assumes that SOURCE
 provides a `Makefile.PL' file as its build system."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -146,14 +147,8 @@ (define build
                             #:parallel-tests? #$parallel-tests?
                             #:outputs %outputs
                             #:inputs %build-inputs)))))
-
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define* (perl-cross-build name #:key
                            source
@@ -211,13 +206,8 @@ (define builder
                       #:outputs #$(outputs->gexp outputs)
                       #:inputs #$inputs
                       #:native-inputs #+(input-tuples->gexp build-inputs)))))
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target target
-                      #:graft? #false
-                      #:guile-for-build guile)))
+ (mbegin %store-monad
+    (return builder)))
 
 (define perl-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:24 GMT) Full text and rfc822 format available.

Message #274 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 33/47] build-system: pyproject: Redefine pyproject-build.
Date: Sun,  9 Feb 2025 01:51:13 +0100
* guix/build-system/pyproject.scm
(pyproject-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ia26001291b472c69c65647d8bddd1199f0ddc483
---
 guix/build-system/pyproject.scm | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyproject.scm
index bdf8f440ac..04c506b09d 100644
--- a/guix/build-system/pyproject.scm
+++ b/guix/build-system/pyproject.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun <lars <at> 6xq.net>
 ;;; Copyright © 2022 Marius Bakke <marius <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,7 +110,7 @@ (define* (pyproject-build name inputs
                           allowed-references
                           disallowed-references)
   "Build SOURCE using PYTHON, and with INPUTS."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -134,16 +135,8 @@ (define build
                                          search-paths))
                  #:inputs %build-inputs)))))
 
-
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define pyproject-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:53:24 GMT) Full text and rfc822 format available.

Message #277 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 34/47] build-system: python: Redefine python-build.
Date: Sun,  9 Feb 2025 01:51:14 +0100
* guix/build-system/python.scm
(python-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I1d270fa64192394072279f73ae0d77877d41f01c
---
 guix/build-system/python.scm | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index a51c033d01..3c37ca11f1 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2021 Lars-Dominik Braun <lars <at> 6xq.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -184,7 +185,7 @@ (define* (python-build name inputs
                        disallowed-references)
   "Build SOURCE using PYTHON, and with INPUTS.  This assumes that SOURCE
 provides a 'setup.py' file as its build system."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -206,15 +207,9 @@ (define build
                                                       search-paths))
                               #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:target #f
-                      #:guile-for-build guile
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references)))
+
+  (mbegin %store-monad
+    (return builder)))
 
 (define python-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:02 GMT) Full text and rfc822 format available.

Message #280 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 37/47] build-system: rakudo: Redefine rakudo-build.
Date: Sun,  9 Feb 2025 01:51:17 +0100
* guix/build-system/rakudo.scm
(rakudo-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I5f484023b8eb9806ed366e5fc596b844a61f524e
---
 guix/build-system/rakudo.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm
index ee13c50791..6d4e9b9f6e 100644
--- a/guix/build-system/rakudo.scm
+++ b/guix/build-system/rakudo.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -127,11 +128,8 @@ (define builder
                         #:outputs #$(outputs->gexp outputs)
                         #: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 rakudo-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:02 GMT) Full text and rfc822 format available.

Message #283 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 38/47] build-system: rebar: Redefine rebar-build.
Date: Sun,  9 Feb 2025 01:51:18 +0100
* guix/build-system/rebar.scm
(rebar-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I7d4a29cfc1bedaa762e25deed41cc0eb802abb9f
---
 guix/build-system/rebar.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/guix/build-system/rebar.scm b/guix/build-system/rebar.scm
index 7c7cc5870f..4766eda9de 100644
--- a/guix/build-system/rebar.scm
+++ b/guix/build-system/rebar.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -139,15 +140,8 @@ (define builder
                                               search-paths))
                       #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    ;; Note: Always pass #:graft? #f.  Without it, ALLOWED-REFERENCES &
-    ;; co. would be interpreted as referring to grafted packages.
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define rebar-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:04 GMT) Full text and rfc822 format available.

Message #286 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 39/47] build-system: renpy: Redefine renpy-build.
Date: Sun,  9 Feb 2025 01:51:19 +0100
* guix/build-system/renpy.scm
(renpy-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I20bf5af43fc9fc41fb2f36637e67d35136bf1606
---
 guix/build-system/renpy.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm
index 015dd7c210..f364da1208 100644
--- a/guix/build-system/renpy.scm
+++ b/guix/build-system/renpy.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2021 Leo Prikler <leo.prikler <at> student.tugraz.at>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,11 +105,8 @@ (define builder
                                                search-paths))
                        #: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 renpy-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:04 GMT) Full text and rfc822 format available.

Message #289 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 41/47] build-system: ruby: Redefine ruby-build.
Date: Sun,  9 Feb 2025 01:51:21 +0100
* guix/build-system/ruby.scm
(ruby-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8de0e2b382271e9ea09d2be9b6169ccfc792230b
---
 guix/build-system/ruby.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index f258ade6e7..e1c0ecef4f 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -88,7 +88,7 @@ (define* (ruby-build name inputs
                      (modules '((guix build ruby-build-system)
                                 (guix build utils))))
   "Build SOURCE using RUBY and INPUTS."
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@(sexp->gexp modules))
@@ -109,13 +109,8 @@ (define build
                                                     search-paths))
                             #:inputs %build-inputs)))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name build
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define ruby-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:05 GMT) Full text and rfc822 format available.

Message #292 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 40/47] build-system: ruby: Improve ruby-cross-build style.
Date: Sun,  9 Feb 2025 01:51:20 +0100
* guix/build-system/ruby.scm
(ruby-cross-build): Use with-imported-modules around the
ruby-cross-build builder gexp.

Change-Id: I1051124f034f2082ccef531e9bcf37913d5a9449
---
 guix/build-system/ruby.scm | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 33aab5f719..f258ade6e7 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,24 +89,25 @@ (define* (ruby-build name inputs
                                 (guix build utils))))
   "Build SOURCE using RUBY and INPUTS."
   (define build
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        #$(with-build-variables inputs outputs
-            #~(ruby-build #:name #$name
-                          #:source #+source
-                          #:system #$system
-                          #:gem-flags #$gem-flags
-                          #:test-target #$test-target
-                          #:tests? #$tests?
-                          #:phases #$(if (pair? phases)
-                                         (sexp->gexp phases)
-                                         phases)
-                          #:outputs %outputs
-                          #:search-paths '#$(sexp->gexp
-                                             (map search-path-specification->sexp
-                                                  search-paths))
-                          #:inputs %build-inputs))))
+          #$(with-build-variables inputs outputs
+              #~(ruby-build #:name #$name
+                            #:source #+source
+                            #:system #$system
+                            #:gem-flags #$gem-flags
+                            #:test-target #$test-target
+                            #:tests? #$tests?
+                            #:phases #$(if (pair? phases)
+                                           (sexp->gexp phases)
+                                           phases)
+                            #:outputs %outputs
+                            #:search-paths '#$(sexp->gexp
+                                               (map search-path-specification->sexp
+                                                    search-paths))
+                            #:inputs %build-inputs)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
@@ -113,7 +115,6 @@ (define build
                       #:system system
                       #:target #f
                       #:graft? #f
-                      #:modules imported-modules
                       #:guile-for-build guile)))
 
 (define ruby-build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:05 GMT) Full text and rfc822 format available.

Message #295 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 35/47] build-system: qt: Redefine qt-build and
 qt-cross-build.
Date: Sun,  9 Feb 2025 01:51:15 +0100
* guix/build-system/qt.scm
(qt-build): Monadic procedure returns a gexp instead of a derivation.
(qt-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I194a9d1a7c7600af2e991e1efad627a9ced235d1
---
 guix/build-system/qt.scm | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index d1f721c54e..6d4b02ac71 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -179,14 +180,8 @@ (define builder
                     #: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
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:system system
-                      #:guile-for-build guile
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references)))
+  (mbegin %store-monad
+    (return builder)))
 
 
 ;;;
@@ -270,14 +265,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
-                      #:graft? #f                 ;consistent with 'gnu-build'
-                      #:system system
-                      #:guile-for-build guile
-                      #:allowed-references allowed-references
-                      #:disallowed-references disallowed-references)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define qt-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:06 GMT) Full text and rfc822 format available.

Message #298 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 36/47] build-system: r: Redefine r-build.
Date: Sun,  9 Feb 2025 01:51:16 +0100
* guix/build-system/r.scm
(r-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I8f5a76eac6b65beba95852b7bf1645cd8a7b255a
---
 guix/build-system/r.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 92449c7dbb..15587b083b 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015-2024 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -137,12 +138,8 @@ (define builder
                                            search-paths))
                    #: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
-                      #:substitutable? substitutable?)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define r-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:07 GMT) Full text and rfc822 format available.

Message #301 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 43/47] build-system: texlive: Redefine texlive-build.
Date: Sun,  9 Feb 2025 01:51:23 +0100
* guix/build-system/texlive.scm
(texlive-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I00cc4e5647eec7e5cd7103ccd9ca0beb21361b3a
---
 guix/build-system/texlive.scm | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 35587b50fc..b5b687e4e4 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -151,14 +152,8 @@ (define builder
                                                   (map search-path-specification->sexp
                                                        search-paths)))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target #f
-                      #:graft? #f
-                      #:substitutable? substitutable?
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define texlive-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:07 GMT) Full text and rfc822 format available.

Message #304 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 42/47] build-system: scons: Redefine scons-build.
Date: Sun,  9 Feb 2025 01:51:22 +0100
* guix/build-system/scons.scm
(scons-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ic8c99d06ac53b2ba80a02a191d18de92e9c74e6b
---
 guix/build-system/scons.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm
index e76c419b1e..1b0dde0f48 100644
--- a/guix/build-system/scons.scm
+++ b/guix/build-system/scons.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +19,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (guix build-system scons)
+  #:use-module (guix store)
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix monads)
@@ -117,11 +119,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 scons-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:08 GMT) Full text and rfc822 format available.

Message #307 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 44/47] build-system: tree-sitter: Redefine
 tree-sitter-build functions.
Date: Sun,  9 Feb 2025 01:51:24 +0100
* guix/build-system/tree-sitter.scm
(tree-sitter-build): Monadic procedure returns a gexp instead of a derivation.
(tree-sitter-cross-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: I761d0663a511deefd0626ad427be22df09b72894
---
 guix/build-system/tree-sitter.scm | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/guix/build-system/tree-sitter.scm b/guix/build-system/tree-sitter.scm
index 21c4eb35b2..c9e45b1fb9 100644
--- a/guix/build-system/tree-sitter.scm
+++ b/guix/build-system/tree-sitter.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -119,11 +120,8 @@ (define builder
                                       search-paths))
                              #: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* (tree-sitter-cross-build name
                                   #:key
@@ -179,12 +177,8 @@ (define %build-inputs
                                   search-path-specification->sexp
                                   native-search-paths))))))
 
-  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
-                                                  system #:graft? #f)))
-    (gexp->derivation name builder
-                      #:system system
-                      #:target target
-                      #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define tree-sitter-build-system
   (build-system
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:09 GMT) Full text and rfc822 format available.

Message #310 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 45/47] build-system: vim: Redefine vim-build.
Date: Sun,  9 Feb 2025 01:51:25 +0100
* guix/build-system/vim.scm
(vim-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Iedbb15faac445f169cffa16397b357bc4f15c0f6
---
 guix/build-system/vim.scm | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/guix/build-system/vim.scm b/guix/build-system/vim.scm
index dddf7ea14b..22c38aefca 100644
--- a/guix/build-system/vim.scm
+++ b/guix/build-system/vim.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Jonathan Scoresby <me <at> jonscoresby.com>
 ;;; Copyright © 2023 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,7 @@ (define* (vim-build name inputs
                     (modules '((guix build vim-build-system)
                                (guix build utils))))
 
-  (define build
+  (define builder
     (with-imported-modules imported-modules
       #~(begin
           (use-modules #$@modules)
@@ -151,16 +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?
-                          #:guile-for-build guile)))
+  (mbegin %store-monad
+    (return builder)))
 
 (define vim-build-system
   (build-system (name 'vim)
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:10 GMT) Full text and rfc822 format available.

Message #313 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 46/47] build-system: waf: Improve waf-build style.
Date: Sun,  9 Feb 2025 01:51:26 +0100
* guix/build-system/waf.scm
(waf-build): Use with-imported-modules around the waf-build builder gexp.

Change-Id: Id242046eb4bfef90dba60d7c3b1b68597ddf502e
---
 guix/build-system/waf.scm | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index 5f24615514..4ca293ffd8 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,22 +87,23 @@ (define* (waf-build name inputs
   "Build SOURCE with INPUTS.  This assumes that SOURCE provides a 'waf' file
 as its build system."
   (define build
-    #~(begin
-        (use-modules #$@(sexp->gexp modules))
+    (with-imported-modules imported-modules
+      #~(begin
+          (use-modules #$@(sexp->gexp modules))
 
-        #$(with-build-variables inputs outputs
-            #~(waf-build #:name #$name
-                         #:source #+source
-                         #:configure-flags #$configure-flags
-                         #:system #$system
-                         #:test-target #$test-target
-                         #:tests? #$tests?
-                         #:phases #$phases
-                         #:outputs %outputs
-                         #:search-paths '#$(sexp->gexp
-                                            (map search-path-specification->sexp
-                                                 search-paths))
-                         #:inputs %build-inputs))))
+          #$(with-build-variables inputs outputs
+              #~(waf-build #:name #$name
+                           #:source #+source
+                           #:configure-flags #$configure-flags
+                           #:system #$system
+                           #:test-target #$test-target
+                           #:tests? #$tests?
+                           #:phases #$phases
+                           #:outputs %outputs
+                           #:search-paths '#$(sexp->gexp
+                                              (map search-path-specification->sexp
+                                                   search-paths))
+                           #:inputs %build-inputs)))))
 
   (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
                                                   system #:graft? #f)))
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Sun, 09 Feb 2025 00:54:10 GMT) Full text and rfc822 format available.

Message #316 received at 68315 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v3 47/47] build-system: zig: Redefine zig-build.
Date: Sun,  9 Feb 2025 01:51:27 +0100
* guix/build-system/zig.scm
(zig-build): Monadic procedure returns a gexp instead of a derivation.

Change-Id: Ide64e7047d6e7127024471b311366f3cf8533e00
---
 guix/build-system/zig.scm | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guix/build-system/zig.scm b/guix/build-system/zig.scm
index 43d6ee977c..3d6eddca3a 100644
--- a/guix/build-system/zig.scm
+++ b/guix/build-system/zig.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2023 Ekaitz Zarraga <ekaitz <at> elenq.tech>
+;;; Copyright © 2024 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -90,11 +91,8 @@ (define builder
                                              search-paths))
                      #: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* (zig-cross-build name
                           #:key
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Fri, 13 Jun 2025 20:13:02 GMT) Full text and rfc822 format available.

Message #319 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org>,
 68315 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: Re: [bug#68315] [PATCH v3 00/47] Extend bag-build to gexp.
Date: Fri, 13 Jun 2025 20:35:40 +0200
Hi Nicolas,

On Sun, 09 Feb 2025 at 01:50, Nicolas Graves via Guix-patches via <guix-patches <at> gnu.org> wrote:

> Nicolas Graves (47):
>   guix: packages: Extend bag-build to support gexp.

[...]

>  45 files changed, 334 insertions(+), 507 deletions(-)

This series is tagged as ’moreinfo’.  What is the status?


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#68315; Package guix-patches. (Fri, 13 Jun 2025 20:13:02 GMT) Full text and rfc822 format available.

This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.