gnu: gawk: Refer to the target Bash in io.c.

* gnu/packages/gawk.scm (gawk): Add Bash as an input
  when (%current-target-system) is true.
This commit is contained in:
Ludovic Courtès 2013-06-01 00:07:26 +02:00
parent 8caa6152d0
commit 63c0c19a64

View file

@ -18,6 +18,7 @@
(define-module (gnu packages gawk) (define-module (gnu packages gawk)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (gnu packages bash)
#:use-module (gnu packages libsigsegv) #:use-module (gnu packages libsigsegv)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
@ -45,18 +46,20 @@ (define-public gawk
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Refer to the right shell. ;; Refer to the right shell.
;; FIXME: Remove `else' arm upon core-updates. ;; FIXME: Remove `else' arm upon core-updates.
,(if (%current-target-system) (let ((bash (assoc-ref inputs "bash")))
'(let ((sh (which "sh"))) (substitute* "io.c"
(substitute* "io.c" (("/bin/sh")
(("/bin/sh") sh))) (string-append bash "/bin/bash")))))
'(let ((bash (assoc-ref inputs "bash")))
(substitute* "io.c"
(("/bin/sh")
(string-append bash "/bin/bash"))))))
,(if (%current-target-system) ,(if (%current-target-system)
'%standard-cross-phases '%standard-cross-phases
'%standard-phases)))) '%standard-phases))))
(inputs `(("libsigsegv" ,libsigsegv))) (inputs `(("libsigsegv" ,libsigsegv)
;; TODO: On next core-updates, make Bash input unconditional.
,@(if (%current-target-system)
`(("bash" ,bash))
'())))
(home-page "http://www.gnu.org/software/gawk/") (home-page "http://www.gnu.org/software/gawk/")
(synopsis "A text scanning and processing language") (synopsis "A text scanning and processing language")
(description (description