gnu: kcov: Prepare for cross-compilation.

* gnu/packages/code.scm (kcov)[arguments]: Look up bash in the inputs.
This commit is contained in:
Tobias Geerinckx-Rice 2021-11-26 22:22:08 +01:00
parent 1e4b2d8e22
commit c6e99f78f0
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -588,10 +588,11 @@ (define-public kcov
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-/bin/bash-references
(lambda _
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
(substitute* (find-files "src" ".*\\.cc?$")
(("/bin/bash") (which "bash"))
(("/bin/sh") (which "sh"))))))))
(("/bin/(bash|sh)" shell)
(string-append (assoc-ref inputs "bash") shell)))))))))
(inputs
`(("curl" ,curl)
("elfutils" ,elfutils)