nixpkgs/pkgs/servers/amqp/rabbitmq-server/default.nix
Vladimír Čunát 01b0d1c926 rabbitmq: move docs: $out/docs -> $out/share/docs
As pointed out by @bjornfor, we mostly have it under share.
2014-01-26 14:15:10 +01:00

43 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.2.1";
src = fetchurl {
url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
sha256 = "0j9yx64sdgkv0h20zjs65aa2ag6wwv50i6hd3x69m0cc6shzcc0f";
};
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 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.linux;
};
}