2018-09-24 14:30:32 +01:00
|
|
|
|
{ stdenv, fetchurl, erlang, elixir, python, libxml2, libxslt, xmlto
|
|
|
|
|
, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync, getconf, socat
|
2015-10-25 12:37:31 +00:00
|
|
|
|
, AppKit, Carbon, Cocoa
|
|
|
|
|
}:
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
2018-04-11 00:54:11 +01:00
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
|
pname = "rabbitmq-server";
|
2018-09-24 14:30:32 +01:00
|
|
|
|
|
2019-12-09 18:26:33 +00:00
|
|
|
|
version = "3.8.2";
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
2019-07-16 10:12:38 +01:00
|
|
|
|
# when updating, consider bumping elixir version in all-packages.nix
|
2011-03-31 12:09:20 +01:00
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
|
url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${pname}-${version}.tar.xz";
|
2019-12-09 18:26:33 +00:00
|
|
|
|
sha256 = "17gixahxass9n4d697my8sq4an51rw3cicb36fqvl8fbhnwjjrwc";
|
2011-03-31 12:09:20 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
buildInputs =
|
2018-09-24 14:30:32 +01:00
|
|
|
|
[ erlang elixir python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip rsync ]
|
2015-10-25 12:37:31 +00:00
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ];
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
2018-02-19 17:54:16 +00:00
|
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
|
|
2017-02-08 23:12:49 +00:00
|
|
|
|
installFlags = "PREFIX=$(out) RMQ_ERLAPP_DIR=$(out)";
|
|
|
|
|
installTargets = "install install-man";
|
2013-04-19 15:46:31 +01:00
|
|
|
|
|
2018-09-24 14:30:32 +01:00
|
|
|
|
runtimePath = stdenv.lib.makeBinPath [getconf erlang socat];
|
2018-02-19 17:54:16 +00:00
|
|
|
|
postInstall = ''
|
2018-09-24 14:30:32 +01:00
|
|
|
|
echo 'PATH=${runtimePath}:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
|
2018-02-19 17:54:16 +00:00
|
|
|
|
|
|
|
|
|
# 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
|
2018-09-24 14:30:32 +01:00
|
|
|
|
'';
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
homepage = http://www.rabbitmq.com/;
|
|
|
|
|
description = "An implementation of the AMQP messaging protocol";
|
2018-02-19 17:54:16 +00:00
|
|
|
|
license = stdenv.lib.licenses.mpl11;
|
2014-04-29 00:12:44 +01:00
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2018-02-19 17:54:16 +00:00
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ Profpatsch ];
|
2011-03-31 12:09:20 +01:00
|
|
|
|
};
|
|
|
|
|
}
|