mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
da84bc4a89
Before, files were put in /var, requiring the server to be run as a privileged user even when just testing locally. This can be overridden by setting the SYS_PREFIX env variable, or on a more coarse-grained basis in /etc/rabbitmq/rabbitmq-env.conf Signed-off-by: Shea Levy <shea@shealevy.com>
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ stdenv, fetchurl, erlang, python, libxml2, libxslt, xmlto
|
|
, docbook_xml_dtd_45, docbook_xsl, zip, unzip }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "rabbitmq-server-${version}";
|
|
|
|
version = "3.0.3";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
|
|
sha256 = "07mp57xvszdrlgw8rgn9r9dpa6vdqdjk7f1dyh6a9sdg8s9fby38";
|
|
};
|
|
|
|
buildInputs =
|
|
[ 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";
|
|
|
|
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.linux;
|
|
};
|
|
}
|