nixpkgs-suyu/pkgs/servers/amqp/rabbitmq-server/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, erlang, python, libxml2, libxslt, xmlto
2013-03-07 12:34:45 +01:00
, docbook_xml_dtd_45, docbook_xsl, zip, unzip }:
stdenv.mkDerivation rec {
name = "rabbitmq-server-${version}";
2014-07-26 13:32:25 +02:00
version = "3.3.4";
src = fetchurl {
url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
2014-07-26 13:32:25 +02:00
sha256 = "13nnsn34b44mz8w4b69bcpxmq4daqnxzd0lppg0f138pcssha43l";
};
buildInputs =
2013-03-07 12:34:45 +01:00
[ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip ];
preBuild =
''
# Fix the "/usr/bin/env" in "calculate-relative".
patchShebangs .
'';
installFlags = "TARGET_DIR=$(out)/libexec/rabbitmq SBIN_DIR=$(out)/sbin MAN_DIR=$(out)/share/man DOC_INSTALL_DIR=$(out)/share/doc";
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
'';
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";
platforms = stdenv.lib.platforms.unix;
};
}