diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-01 14:29:24 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-12 07:44:05 +0100 |
commit | b5453aa7c314bec95e0c25b904f3517d338577ed (patch) | |
tree | b9f95e75cc76f3a43d4e959bb7f820bdec2e43f8 /gnu/packages | |
parent | 9b25e1d1248da83fa3f39f8fe163b842ec4c4d5a (diff) | |
download | guix-b5453aa7c314bec95e0c25b904f3517d338577ed.tar.gz guix-b5453aa7c314bec95e0c25b904f3517d338577ed.zip |
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.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/erlang.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index 55e0e62478..1c18efe9da 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -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 |