summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-12-20 14:37:40 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-20 16:21:39 +0100
commitbdaf38a6e04052a22b62ae41c72f32cf16356314 (patch)
tree9301fe2033928c941b968bc76416e9a937cecfc9 /guix/build-system
parentb9e5e93342bde25d63f4e6281577c0c4c5311c82 (diff)
build-system/meson: Define build variables when cross-compiling.
Fixes <https://issues.guix.gnu.org/52574>. Reported by L p R n d n <guix@lprndn.info>. * guix/build-system/meson.scm (meson-cross-build)[builder]: Define '%build-host-inputs', '%build-target-inputs', '%build-inputs', and '%outputs'.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/meson.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index ba7441a3eb..ad604f8871 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -287,6 +287,19 @@ SOURCE has a 'meson.build' file."
#~(begin
(use-modules #$@(sexp->gexp modules))
+ (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-inputs
+ (append %build-host-inputs %build-target-inputs))
+
+ (define %outputs
+ #$(outputs->gexp outputs))
+
(define build-phases
#$(let ((phases (if (pair? phases) (sexp->gexp phases) phases)))
(if glib-or-gtk?