diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-01 14:29:24 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-01 14:29:24 +0100 |
commit | 5195245e81ba6ff5352a691b3f8aedc4a6b21e29 (patch) | |
tree | 0405ce71357f37300593ffd331b7964c2e3c3611 | |
parent | 5d669883ecc104403c5d3ba7d172e9c02234577c (diff) | |
download | guix-5195245e81ba6ff5352a691b3f8aedc4a6b21e29.tar guix-5195245e81ba6ff5352a691b3f8aedc4a6b21e29.tar.gz |
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.
-rw-r--r-- | gnu/packages/erlang.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index 0e2b7b5bcb..1fce573883 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -127,6 +127,27 @@ (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"))))) (add-after 'patch-source-shebangs 'patch-source-env (lambda _ (let ((escripts |