2011-03-31 12:09:20 +01:00
|
|
|
{ stdenv, fetchurl, erlang, python, libxml2, libxslt, xmlto
|
2013-03-07 11:34:45 +00:00
|
|
|
, docbook_xml_dtd_45, docbook_xsl, zip, unzip }:
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-04-19 15:46:31 +01:00
|
|
|
name = "rabbitmq-server-${version}";
|
|
|
|
|
2015-01-26 01:06:41 +00:00
|
|
|
version = "3.4.3";
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-04-19 15:46:31 +01:00
|
|
|
url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
|
2015-01-26 01:06:41 +00:00
|
|
|
sha256 = "1mdma4bh6196ix9vhsigb3yav8l5gy2x78nsqxychm4hz5l2vjx6";
|
2011-03-31 12:09:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
2013-03-07 11:34:45 +00:00
|
|
|
[ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip ];
|
2011-03-31 12:09:20 +01:00
|
|
|
|
|
|
|
preBuild =
|
|
|
|
''
|
|
|
|
# Fix the "/usr/bin/env" in "calculate-relative".
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2014-01-26 13:15:10 +00:00
|
|
|
installFlags = "TARGET_DIR=$(out)/libexec/rabbitmq SBIN_DIR=$(out)/sbin MAN_DIR=$(out)/share/man DOC_INSTALL_DIR=$(out)/share/doc";
|
2011-03-31 12:09:20 +01:00
|
|
|
|
2013-04-19 15:46:31 +01:00
|
|
|
preInstall =
|
|
|
|
''
|
|
|
|
sed -i \
|
|
|
|
-e 's|SYS_PREFIX=|SYS_PREFIX=''${SYS_PREFIX-''${HOME}/.rabbitmq/${version}}|' \
|
|
|
|
-e 's|CONF_ENV_FILE=''${SYS_PREFIX}\(.*\)|CONF_ENV_FILE=\1|' \
|
|
|
|
scripts/rabbitmq-defaults
|
|
|
|
'';
|
|
|
|
|
2011-03-31 12:09:20 +01:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
echo 'PATH=${erlang}/bin:${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
|
|
|
|
''; # */
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.rabbitmq.com/;
|
|
|
|
description = "An implementation of the AMQP messaging protocol";
|
2014-04-29 00:12:44 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2011-03-31 12:09:20 +01:00
|
|
|
};
|
|
|
|
}
|