From 3e61f3b911c4bf38b47b8f76415b987ab1964b6a Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Thu, 22 Mar 2018 17:41:59 +0100 Subject: [PATCH] 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. --- pkgs/development/interpreters/erlang/generic-builder.nix | 8 ++++---- 1 file 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