Skip to content
Snippets Groups Projects
Commit 9c782445 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 9a97b814
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
(define-module (gnu packages guile) (define-module (gnu packages guile)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages bdw-gc) #:use-module (gnu packages bdw-gc)
#:use-module (gnu packages gawk) #:use-module (gnu packages gawk)
#:use-module (gnu packages gperf) #:use-module (gnu packages gperf)
...@@ -115,7 +116,12 @@ (define-public guile-2.0 ...@@ -115,7 +116,12 @@ (define-public guile-2.0
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs `(("pkgconfig" ,pkg-config))) (native-inputs `(("pkgconfig" ,pkg-config)))
(inputs `(("libffi" ,libffi) (inputs `(("libffi" ,libffi)
("readline" ,readline))) ("readline" ,readline)
;; TODO: On next core-updates, make Bash input unconditional.
,@(if (%current-target-system)
`(("bash" ,bash))
'())))
(propagated-inputs (propagated-inputs
`( ;; These ones aren't normally needed here, but since `libguile-2.0.la' `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
...@@ -133,14 +139,16 @@ (define-public guile-2.0 ...@@ -133,14 +139,16 @@ (define-public guile-2.0
(self-native-input? #t) (self-native-input? #t)
(arguments (arguments
'(#:phases (alist-cons-before `(#:phases (alist-cons-before
'configure 'pre-configure 'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash"))) (let ((bash (assoc-ref inputs "bash")))
(substitute* "module/ice-9/popen.scm" (substitute* "module/ice-9/popen.scm"
(("/bin/sh") (("/bin/sh")
(string-append bash "/bin/bash"))))) (string-append bash "/bin/bash")))))
%standard-phases))) ,(if (%current-target-system)
'%standard-cross-phases
'%standard-phases))))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment