[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#68315] [PATCH 02/48] build-system: gnu: Improve gnu-cross-build sty
From: |
Nicolas Graves |
Subject: |
[bug#68315] [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@gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves@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
- [bug#68315] [PATCH 00/48] Extend bag-build to gexps., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 01/48] guix: packages: Extend bag-build to support gexp., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 02/48] build-system: gnu: Improve gnu-cross-build style.,
Nicolas Graves <=
- [bug#68315] [PATCH 03/48] build-system: gnu: Redefine gnu-build and gnu-cross-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 04/48] build-system: agda: Redefine agda-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 05/48] build-system: android-ndk: Redefine gnu-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 07/48] build-system: asdf: Redefine asdf-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 08/48] build-system: cargo: Redefine cargo-build and cargo-cross-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 09/48] build-system: chicken: Redefine chicken-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 06/48] build-system: ant: Redefine ant-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 12/48] build-system: composer: Redefine composer-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 11/48] build-system: cmake: Redefine cmake-build and cmake-cross-build., Nicolas Graves, 2024/01/08
- [bug#68315] [PATCH 16/48] build-system: elm: Redefine elm-build., Nicolas Graves, 2024/01/08