erlang: Change order of commands in postPach and postInstall.

Erlang's generic-builder isn't using the right /bin/sh in some
situations, causing build errors either in the erlang build itself or
in derivations depending on it.

This patch runs `patchShebangs make/` before running the rest of the
`postPatch` phase, hopefully using the right shell early enough.

This might be a solution for #36853, #36823 and #37638.
This commit is contained in:
Moritz Ulrich 2018-03-22 17:41:59 +01:00
parent 9dd4cb3948
commit 3e61f3b911

View File

@ -65,9 +65,9 @@ in stdenv.mkDerivation ({
''; '';
postPatch = '' postPatch = ''
${postPatch}
patchShebangs make patchShebangs make
${postPatch}
''; '';
preConfigure = '' preConfigure = ''
@ -88,9 +88,9 @@ in stdenv.mkDerivation ({
# (PDFs are generated only when fop is available). # (PDFs are generated only when fop is available).
postInstall = '' postInstall = ''
${postInstall}
ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
${postInstall}
''; '';
# Some erlang bin/ scripts run sed and awk # Some erlang bin/ scripts run sed and awk