summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2020-04-24 11:21:48 +0200
committerJan Nieuwenhuizen <janneke@gnu.org>2020-04-26 19:46:27 +0200
commit56389433bcbbeb7abb94b4156957d2d2568ff36c (patch)
tree40479041415de17d7119558a849f678f6f611190 /gnu
parentd653e184ec45cedbc3dc6deb18d3f8666f1c2492 (diff)
downloadguix-56389433bcbbeb7abb94b4156957d2d2568ff36c.tar.gz
gnu: guix: Cross-build workaround: Run native guile for version.
We need to take some care here, the native guile is not necessarily always the
same version as the host guile.

* gnu/packages/package-management.scm (guix)[arguments]: Do not attempt to run
host guile for getting effective-version; resort to native guile.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/package-management.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 1b9697b387..fdc570f0f4 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -245,11 +245,13 @@ $(prefix)/etc/init.d\n")))
                         (setenv "SHELL" (which "sh"))
                         #t))
                     (add-after 'install 'wrap-program
-                      (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
                         ;; Make sure the 'guix' command finds GnuTLS,
                         ;; Guile-JSON, and Guile-Git automatically.
                         (let* ((out    (assoc-ref outputs "out"))
-                               (guile  (assoc-ref inputs "guile"))
+                               (guile  ,@(if (%current-target-system)
+                                             '((assoc-ref native-inputs "guile"))
+                                             '((assoc-ref inputs "guile"))))
                                (gcrypt (assoc-ref inputs "guile-gcrypt"))
                                (json   (assoc-ref inputs "guile-json"))
                                (sqlite (assoc-ref inputs "guile-sqlite3"))