1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-28 03:51:53 +02:00

gnu: erlang: Patch occurrences of /bin/sh in the source.

Previously, the elixir package would often fail to build, as running :os:cmd
would fail, as /bin/sh doesn't exist when building the elixir package. These
changes fix that issue.

* gnu/packages/erlang.scm (erlang)[arguments]: Add new patch-/bin/sh phase to
replace hardcoded references to /bin/sh with a file in the store.
This commit is contained in:
Christopher Baines
2018-06-01 14:29:24 +01:00
parent 9b25e1d124
commit b5453aa7c3
+23
View File
@@ -128,6 +128,29 @@
(date->string source-date-epoch
"{H,Mi,S} = {~H,~M,~S},")))
#t)))
(add-after 'unpack 'patch-/bin/sh
(lambda _
(substitute* "erts/etc/unix/run_erl.c"
(("sh = \"/bin/sh\";")
(string-append "sh = \""
(which "sh")
"\";")))
(substitute* "erts/emulator/sys/unix/sys_drivers.c"
(("SHELL \"/bin/sh\"")
(string-append "SHELL \""
(which "sh")
"\"")))
(substitute* "erts/emulator/sys/unix/erl_child_setup.c"
(("SHELL \"/bin/sh\"")
(string-append "SHELL \""
(which "sh")
"\"")))
(substitute* "lib/kernel/src/os.erl"
(("/bin/sh") (which "sh")))
#t))
(add-after 'patch-source-shebangs 'patch-source-env
(lambda _
(let ((escripts