a6ff5865d1
- New dependency on 'getconf' binary for3aa619e9ef/src/vm_memory_monitor.erl (L448)
- New dependency on 'socat' for systemd notifications4a3ee3a336/src/rabbit.erl (L361)
- elixir_1_6 for a new 'rabbitmqctl' tool - Replace patching with providing custom PATH, as we already have some other things here - Renamed package in all-packages.nix from a legacy spelling
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{ stdenv, fetchurl, erlang, elixir, python, libxml2, libxslt, xmlto
|
||
, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync, getconf, socat
|
||
, AppKit, Carbon, Cocoa
|
||
}:
|
||
|
||
stdenv.mkDerivation rec {
|
||
name = "rabbitmq-server-${version}";
|
||
|
||
version = "3.7.8";
|
||
|
||
src = fetchurl {
|
||
url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${name}.tar.xz";
|
||
sha256 = "00jsix333g44y20psrp12c96b7d161yvrysnygjjz4wc5gbrzlxy";
|
||
};
|
||
|
||
buildInputs =
|
||
[ erlang elixir python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip rsync ]
|
||
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ];
|
||
|
||
outputs = [ "out" "man" "doc" ];
|
||
|
||
installFlags = "PREFIX=$(out) RMQ_ERLAPP_DIR=$(out)";
|
||
installTargets = "install install-man";
|
||
|
||
runtimePath = stdenv.lib.makeBinPath [getconf erlang socat];
|
||
postInstall = ''
|
||
echo 'PATH=${runtimePath}:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
|
||
|
||
# we know exactly where rabbitmq is gonna be,
|
||
# so we patch that into the env-script
|
||
substituteInPlace $out/sbin/rabbitmq-env \
|
||
--replace 'RABBITMQ_SCRIPTS_DIR=`dirname $SCRIPT_PATH`' \
|
||
"RABBITMQ_SCRIPTS_DIR=$out/sbin"
|
||
|
||
# there’s a few stray files that belong into share
|
||
mkdir -p $doc/share/doc/rabbitmq-server
|
||
mv $out/LICENSE* $doc/share/doc/rabbitmq-server
|
||
|
||
# and an unecessarily copied INSTALL file
|
||
rm $out/INSTALL
|
||
'';
|
||
|
||
meta = {
|
||
homepage = http://www.rabbitmq.com/;
|
||
description = "An implementation of the AMQP messaging protocol";
|
||
license = stdenv.lib.licenses.mpl11;
|
||
platforms = stdenv.lib.platforms.unix;
|
||
maintainers = with stdenv.lib.maintainers; [ Profpatsch ];
|
||
};
|
||
}
|