gnu: m4: Fix cross-compilation.

* gnu/packages/m4.scm (m4)[arguments]: Look up /bin/sh in NATIVE-INPUTS if
applicable.
This commit is contained in:
Marius Bakke 2022-06-26 20:28:46 +02:00
parent 03e13c8981
commit 1ae2a47a01
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -55,8 +55,9 @@ (define-public m4
(("4 5 6")
"4 6"))))
(add-after 'unpack 'configure-shell
(lambda* (#:key inputs #:allow-other-keys)
(let ((/bin/sh (search-input-file inputs "/bin/sh")))
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(let ((/bin/sh (search-input-file (or native-inputs inputs)
"/bin/sh")))
;; Adjust hard-coded /bin/sh for tests.
(substitute* "lib/config.hin"
(("\"/bin/sh\"")