summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2018-03-22 17:41:59 +0100
committerMoritz Ulrich <moritz@tarn-vedra.de>2018-03-23 10:41:42 +0100
commit3e61f3b911c4bf38b47b8f76415b987ab1964b6a (patch)
tree4d07778a7339079b523c64e0d95e55fbcafa535b /pkgs
parent9dd4cb394862ae1a5d864d6012762f14bb660582 (diff)
downloadnixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar.gz
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar.bz2
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar.lz
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar.xz
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.tar.zst
nixlib-3e61f3b911c4bf38b47b8f76415b987ab1964b6a.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/interpreters/erlang/generic-builder.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix
index 1d2b79074fb4..6ea3ac73a4b1 100644
--- a/pkgs/development/interpreters/erlang/generic-builder.nix
+++ b/pkgs/development/interpreters/erlang/generic-builder.nix
@@ -65,9 +65,9 @@ in stdenv.mkDerivation ({
   '';
 
   postPatch = ''
-    ${postPatch}
-
     patchShebangs make
+
+    ${postPatch}
   '';
 
   preConfigure = ''
@@ -88,9 +88,9 @@ in stdenv.mkDerivation ({
   # (PDFs are generated only when fop is available).
 
   postInstall = ''
-    ${postInstall}
-
     ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
+
+    ${postInstall}
   '';
 
   # Some erlang bin/ scripts run sed and awk