erlang: patch sh path

RabbitMQ 3.13 crashes because it requires Erlang/OTP 26 and hits [this call to `sh`](https://github.com/erlang/otp/blob/maint-26/lib/os_mon/src/disksup.erl#L243). This patches the call to `sh` with its full path, `${bash}/bin/sh` when the version is older than 25
This commit is contained in:
Liam Diprose 2024-06-06 16:59:05 +12:00
parent 818dbe2f96
commit 6ae361cbd2

View File

@ -11,6 +11,7 @@
, ncurses
, openssl
, perl
, runtimeShell
, autoconf
, openjdk11 ? null # javacSupport
, unixODBC ? null # odbcSupport
@ -115,6 +116,9 @@ stdenv.mkDerivation ({
patchShebangs make
${postPatch}
'' + optionalString (lib.versionOlder "25" version) ''
substituteInPlace lib/os_mon/src/disksup.erl \
--replace-fail '"sh ' '"${runtimeShell} '
'';
# For OTP 27+ we need ex_doc to build the documentation