nixpkgs-suyu/pkgs/servers/elasticmq-server-bin/default.nix

35 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jdk, jre, makeWrapper }:
2019-05-20 06:05:06 +02:00
stdenv.mkDerivation rec {
pname = "elasticmq-server";
2020-09-06 18:21:53 +02:00
version = "0.15.7";
2019-05-20 06:05:06 +02:00
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${pname}-${version}.jar";
2020-09-06 18:21:53 +02:00
sha256 = "01jmb6rwh570f2y30b2if5fhcbpdnb2vkxylp9xa09c0x7a2vv4q";
2019-05-20 06:05:06 +02:00
};
# don't do anything?
unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin $out/share/elasticmq-server
cp $src $out/share/elasticmq-server/elasticmq-server.jar
# TODO: how to add extraArgs? current workaround is to use JAVA_TOOL_OPTIONS environment to specify properties
makeWrapper ${jre}/bin/java $out/bin/elasticmq-server \
--add-flags "-jar $out/share/elasticmq-server/elasticmq-server.jar"
'';
meta = with lib; {
2019-05-20 06:05:06 +02:00
homepage = "https://github.com/softwaremill/elasticmq";
description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ peterromfeldhk ];
};
}