From 6ae361cbd244868082a14c1de45911537a072ae5 Mon Sep 17 00:00:00 2001 From: Liam Diprose Date: Thu, 6 Jun 2024 16:59:05 +1200 Subject: [PATCH] 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 --- pkgs/development/interpreters/erlang/generic-builder.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index 2f3b6de7d11c..ff8aadf90980 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -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