2022-01-19 23:45:15 +00:00
|
|
|
{ fetchurl, lib, stdenv, ant, jdk, jre, python2, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rabbitmq-java-client";
|
|
|
|
version = "3.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-13 20:06:32 +00:00
|
|
|
url = "https://www.rabbitmq.com/releases/rabbitmq-java-client/v${version}/rabbitmq-java-client-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "03kspkgzzjsbq6f8yl2zj5m30qwgxv3l58hrbf6gcgxb5rpfk6sh";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-01-19 23:45:15 +00:00
|
|
|
buildInputs = [ ant jdk python2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = "ant dist";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/java
|
|
|
|
cp build/lib/*.jar lib/*.jar $out/share/java
|
|
|
|
|
|
|
|
# There is a script in the source archive, but ours is cleaner
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/PerfTest \
|
|
|
|
--add-flags "-Djava.awt.headless=true -cp $out/share/java/\* com.rabbitmq.examples.PerfTest"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "RabbitMQ Java client library which allows Java code to interface to AMQP servers";
|
|
|
|
homepage = "https://www.rabbitmq.com/java-client.html";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryBytecode # source bundles dependencies as jars
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ mpl11 gpl2 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|