rabbitmq: fix darwin build

ed16f83 made all dependencies explicit, including systemd, which makes the
build step to fail on macOS. Here systemd is added to runtimePath only if the
target system is Linux
This commit is contained in:
Tae Sandoval 2020-05-31 17:38:48 +02:00 committed by Dmitry Kalinkin
parent 17b5c02975
commit 0e3a28a462

View file

@ -29,12 +29,12 @@ stdenv.mkDerivation rec {
export LANG=C.UTF-8 # fix elixir locale warning
'';
runtimePath = stdenv.lib.makeBinPath [
runtimePath = stdenv.lib.makeBinPath ([
erlang
getconf # for getting memory limits
socat systemd procps # for systemd unit activation check
socat procps
gnused coreutils # used by helper scripts
];
] ++ stdenv.lib.optionals stdenv.isLinux [ systemd ]); # for systemd unit activation check
postInstall = ''
# rabbitmq-env calls to sed/coreutils, so provide everything early
sed -i $out/sbin/rabbitmq-env -e '2s|^|PATH=${runtimePath}\''${PATH:+:}\$PATH/\n|'