build-system: gnu: Improve gnu-cross-build style.

* guix/build-system/gnu.scm
(gnu-cross-build): Use with-imported-modules around the
gnu-cross-build builder gexp.

Change-Id: I47246571b1d84a82a67a8c289fd5ad4b5a3b5aeb
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Nicolas Graves 2025-04-25 11:26:30 +02:00 committed by Christopher Baines
parent 490ad5f932
commit aa7b1abf2c
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@ -520,6 +521,7 @@ is one of `host' or `target'."
cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
platform."
(define builder
(with-imported-modules imported-modules
#~(begin
(use-modules #$@(sexp->gexp modules))
@ -570,7 +572,7 @@ platform."
#:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
#:license-file-regexp #$license-file-regexp
#:strip-flags #$strip-flags
#:strip-directories #$strip-directories)))
#:strip-directories #$strip-directories))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
@ -578,7 +580,6 @@ platform."
#:system system
#:target target
#:graft? #f
#:modules imported-modules
#:substitutable? substitutable?
#:allowed-references allowed-references
#:disallowed-references disallowed-references