summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-26 23:45:59 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-26 23:46:11 +0200
commit9c782445fb62b96210e1c68981a9fba2b925c2fb (patch)
tree7839ef1e959644ff66fbe48891e4cb6d6ceec598 /gnu/packages
parent9a97b8144ded0385d1e73ebb0bc1b66d1f5c461b (diff)
downloadguix-9c782445fb62b96210e1c68981a9fba2b925c2fb.tar.gz
gnu: guile: Add Bash as an input, to permit cross-compilation.
* gnu/packages/guile.scm (guile-2.0): Add Bash as an input
  when (%current-target-system) is true.  Use %standard-cross-phases as
  a basis when (%current-target-system) is true.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/guile.scm14
1 files changed, 11 insertions, 3 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 757fa997e0..48d10cc9f8 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -19,6 +19,7 @@
 (define-module (gnu packages guile)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gperf)
@@ -115,7 +116,12 @@ extensible.  It supports many SRFIs.")
    (build-system gnu-build-system)
    (native-inputs `(("pkgconfig" ,pkg-config)))
    (inputs `(("libffi" ,libffi)
-             ("readline" ,readline)))
+             ("readline" ,readline)
+
+             ;; TODO: On next core-updates, make Bash input unconditional.
+             ,@(if (%current-target-system)
+                   `(("bash" ,bash))
+                   '())))
 
    (propagated-inputs
     `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
@@ -133,14 +139,16 @@ extensible.  It supports many SRFIs.")
    (self-native-input? #t)
 
    (arguments
-    '(#:phases (alist-cons-before
+    `(#:phases (alist-cons-before
                 'configure 'pre-configure
                 (lambda* (#:key inputs #:allow-other-keys)
                   (let ((bash (assoc-ref inputs "bash")))
                     (substitute* "module/ice-9/popen.scm"
                       (("/bin/sh")
                        (string-append bash "/bin/bash")))))
-                %standard-phases)))
+                ,(if (%current-target-system)
+                     '%standard-cross-phases
+                     '%standard-phases))))
 
    (native-search-paths
     (list (search-path-specification