Subject: [bug#70492] [PATCH] build-system: copy: Fix cross-compilation.

From: dan <[email-masked]>
Date: Sun, 21 Apr 2024 15:12:30 +0800

* guix/build-system/copy.scm (lower): Change arguments passed to host-inputs
and build-inputs.

Change-Id: I2991854b48587ab00ccc03712304e2850727e6b7
---

This patch tries to fix a issue related to grafting when cross-compiling.
See https://issues.guix.gnu.org/66866 for more discussion.

 guix/build-system/copy.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index d58931b33c..64bd61a53f 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2020 Pierre Neidhardt <[email-masked]>
 ;;; Copyright © 2021, 2022 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2023 Jonathan Brielmaier <[email-masked]>
+;;; Copyright © 2024 dan <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,13 +67,13 @@ (define* (lower name
   (bag
     (name name)
     (system system)
-    (host-inputs `(,@(if source
-                         `(("source" ,source))
-                         '())
-                   ,@inputs
-                   ;; Keep the standard inputs of 'gnu-build-system'.
-                   ,@(standard-packages)))
-    (build-inputs native-inputs)
+    (build-inputs `(,@(if source
+                          `(("source" ,source))
+                          '())
+                    ,@inputs
+                    ,@native-inputs
+                    ;; Keep the standard inputs of 'gnu-build-system'.
+                    ,@(standard-packages)))
     (outputs outputs)
     (build copy-build)
     (arguments (strip-keyword-arguments private-keywords arguments))))

base-commit: 38b88d710ea13ba024aed0543bc2862772cdb645
-- 
2.41.0