@@ -1,41 +1,30 @@
1−{ stdenv, fetchurl
2−, erlang, python, libxml2, libxslt, xmlto
3−, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync
1+{ stdenv, fetchurl, erlang, elixir, python, libxml2, libxslt, xmlto
2+, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync, getconf, socat
43, AppKit, Carbon, Cocoa
5−, getconf
64}:
75
86stdenv.mkDerivation rec {
97 name = "rabbitmq-server-${version}";
10− version = "3.6.15";
8+
9+ version = "3.7.8";
1110
1211 src = fetchurl {
13− url = "https://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.xz";
14− sha256 = "1zdmil657mhjmd20jv47s5dfpj2liqwvyg0zv2ky3akanfpgj98y";
12+ url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${name}.tar.xz";
13+ sha256 = "00jsix333g44y20psrp12c96b7d161yvrysnygjjz4wc5gbrzlxy";
1514 };
1615
1716 buildInputs =
18− [ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip rsync ]
17+ [ erlang elixir python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip rsync ]
1918 ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ];
2019
2120 outputs = [ "out" "man" "doc" ];
2221
23− postPatch = with stdenv.lib; ''
24− # patch the path to getconf
25− substituteInPlace deps/rabbit_common/src/vm_memory_monitor.erl \
26− --replace "getconf PAGESIZE" "${getconf}/bin/getconf PAGESIZE"
27− '';
28−
29− preBuild = ''
30− # Fix the "/usr/bin/env" in "calculate-relative".
31− patchShebangs .
32− '';
33−
3422 installFlags = "PREFIX=$(out) RMQ_ERLAPP_DIR=$(out)";
3523 installTargets = "install install-man";
3624
25+ runtimePath = stdenv.lib.makeBinPath [getconf erlang socat];
3726 postInstall = ''
38− echo 'PATH=${erlang}/bin:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
27+ echo 'PATH=${runtimePath}:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
3928
4029 # we know exactly where rabbitmq is gonna be,
4130 # so we patch that into the env-script
@@ -49,13 +38,7 @@ stdenv.mkDerivation rec {
4938
5039 # and an unecessarily copied INSTALL file
5140 rm $out/INSTALL
52−
53− # patched into a source file above;
54− # needs to be explicitely passed to not be stripped by fixup
55− mkdir -p $out/nix-support
56− echo "${getconf}" > $out/nix-support/dont-strip-getconf
57−
58− '';
41+ '';
5942
6043 meta = {
6144 homepage = http://www.rabbitmq.com/;