unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 68315@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#68315] [PATCH 19/48] build-system: glib-or-gtk: Improve glib-or-gtk-cross-build style.
Date: Mon,  8 Jan 2024 09:02:51 +0100	[thread overview]
Message-ID: <20240108080350.1665-19-ngraves@ngraves.fr> (raw)
In-Reply-To: <20240108080350.1665-1-ngraves@ngraves.fr>

* 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





  parent reply	other threads:[~2024-01-08  8:06 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wmsgc0z6.fsf@ngraves.fr>
2024-01-08  8:00 ` [bug#68315] [PATCH 00/48] Extend bag-build to gexps Nicolas Graves via Guix-patches via
2024-01-08  8:02   ` [bug#68315] [PATCH 01/48] guix: packages: Extend bag-build to support gexp Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 02/48] build-system: gnu: Improve gnu-cross-build style Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 03/48] build-system: gnu: Redefine gnu-build and gnu-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 04/48] build-system: agda: Redefine agda-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 05/48] build-system: android-ndk: Redefine gnu-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 06/48] build-system: ant: Redefine ant-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 07/48] build-system: asdf: Redefine asdf-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 08/48] build-system: cargo: Redefine cargo-build and cargo-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 09/48] build-system: chicken: Redefine chicken-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 10/48] build-system: clojure: Redefine clojure-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 11/48] build-system: cmake: Redefine cmake-build and cmake-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 12/48] build-system: composer: Redefine composer-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 13/48] build-system: copy: Redefine copy-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 14/48] build-system: dub: Redefine dub-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 15/48] build-system: dune: Redefine dune-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 16/48] build-system: elm: Redefine elm-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 17/48] build-system: emacs: Redefine emacs-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 18/48] build-system: font: Redefine font-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` Nicolas Graves via Guix-patches via [this message]
2024-01-08  8:02     ` [bug#68315] [PATCH 20/48] build-system: glib-or-gtk: Redefine glib-or-gtk-build functions Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 21/48] build-system: go: Redefine go-build and go-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 22/48] build-system: guile: Redefine guile-build and guile-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 23/48] build-system: haskell: Redefine haskell-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 24/48] build-system: julia: Redefine julia-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 25/48] build-system: linux-module: Redefine linux-module-build functions Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 26/48] build-system: maven: Redefine maven-build Nicolas Graves via Guix-patches via
2024-01-08  8:02     ` [bug#68315] [PATCH 27/48] build-system: meson: Redefine meson-build and meson-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 28/48] build-system: minify: Redefine minify-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 29/48] build-system: mix: Redefine mix-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 30/48] build-system: node: Redefine node-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 31/48] build-system: ocaml: Redefine ocaml-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 32/48] build-system: perl: Redefine perl-build and perl-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 33/48] build-system: pyproject: Redefine pyproject-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 34/48] build-system: python: Redefine python-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 35/48] build-system: qt: Redefine qt-build and qt-cross-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 36/48] build-system: r: Redefine r-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 37/48] build-system: rakudo: Redefine rakudo-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 38/48] build-system: rebar: Redefine rebar-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 39/48] build-system: renpy: Redefine renpy-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 40/48] build-system: ruby: Improve ruby-cross-build style Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 41/48] build-system: ruby: Redefine ruby-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 42/48] build-system: scons: Redefine scons-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 43/48] build-system: texlive: Redefine texlive-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 44/48] build-system: tree-sitter: Redefine tree-sitter-build functions Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 45/48] build-system: vim: Redefine vim-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 46/48] build-system: waf: Improve waf-build style Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 47/48] build-system: zig: Redefine zig-build Nicolas Graves via Guix-patches via
2024-01-08  8:03     ` [bug#68315] [PATCH 48/48] build-system: trivial: Redefine trivial-build functions Nicolas Graves via Guix-patches via
2024-01-08 22:49       ` Nicolas Graves via Guix-patches via
2024-04-13 20:53   ` [bug#68315] [Nicolas Graves] Re: [PATCH 00/48] Extend bag-build to gexps Nicolas Graves via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240108080350.1665-19-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=68315@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).