From 2174b6acb9055ad30b7dfb9eef52128f507a55a9 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 19 Nov 2024 20:58:45 +0400 Subject: [PATCH] rabbitmq-server: fix management agent crash when calling ps on macOS When built with procps in the runtime path, the rabbitmq_management_agent repeatedly crashes trying to call `ps -o rss=`. It errors out with: `rss: requires entitlement`. This PR uses the built-in ps on macOS instead. I imagine it's signed with the correct entitlements. --- pkgs/servers/amqp/rabbitmq-server/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 383ab5af129f..6b220efca66b 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -33,12 +33,14 @@ let erlang getconf # for getting memory limits socat - procps gnused coreutils # used by helper scripts ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ systemd ] - ); # for systemd unit activation check + ++ lib.optionals stdenv.hostPlatform.isLinux [ + procps # the built-in macOS version has extra entitlements to read rss + systemd # for systemd unit activation check + ] + ); in stdenv.mkDerivation rec {