gnu: coreutils: Update build phase.

* gnu/packages/base.scm (coreutils)[arguments]: Use 'modify-phases'
syntax. Substitute with 'which sh'.
This commit is contained in:
Efraim Flashner 2017-10-07 21:33:58 +03:00
parent b01981a9e2
commit 656a5ba0d5
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -320,21 +320,18 @@ (define-public coreutils
(outputs '("out" "debug"))
(arguments
`(#:parallel-build? #f ; help2man may be called too early
#:phases (alist-cons-before
'build 'patch-shell-references
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
#:phases (modify-phases %standard-phases
(add-before 'build 'patch-shell-references
(lambda _
;; 'split' uses either $SHELL or /bin/sh. Set $SHELL so
;; that tests pass, since /bin/sh isn't in the chroot.
(setenv "SHELL" (which "sh"))
(substitute* (find-files "gnulib-tests" "\\.c$")
(("/bin/sh")
(format #f "~a/bin/sh" bash)))
(("/bin/sh") (which "sh")))
(substitute* (find-files "tests" "\\.sh$")
(("#!/bin/sh")
(format #f "#!~a/bin/sh" bash)))))
%standard-phases)))
(("#!/bin/sh") (which "sh")))
#t)))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
"GNU Coreutils includes all of the basic command-line tools that are