toxic: 0.15.1 -> 0.16.0
[NixPkgs.git] / pkgs / servers / elasticmq-server-bin / default.nix
blob0a126b1d99fe032281dfe336d5c92a410926e174
2   lib,
3   stdenv,
4   fetchurl,
5   jdk,
6   jre,
7   makeBinaryWrapper,
8   runCommand,
9   python3Packages,
10   writeText,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "elasticmq-server";
15   version = "1.6.9";
17   src = fetchurl {
18     url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${finalAttrs.version}.jar";
19     sha256 = "sha256-yUjwvBLSfxP5bW6mhf3q9uzkhRoOwLYk3lkwEedqflA=";
20   };
22   # don't do anything?
23   unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
25   nativeBuildInputs = [ makeBinaryWrapper ];
27   installPhase = ''
28     mkdir -p $out/bin $out/share/elasticmq-server
30     cp $src $out/share/elasticmq-server/elasticmq-server.jar
32     # TODO: how to add extraArgs? current workaround is to use JAVA_TOOL_OPTIONS environment to specify properties
33     makeWrapper ${jre}/bin/java $out/bin/elasticmq-server \
34       --add-flags "-jar $out/share/elasticmq-server/elasticmq-server.jar"
35   '';
37   passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
38     inherit runCommand python3Packages writeText;
39     elasticmq-server = finalAttrs.finalPackage;
40   };
42   meta = with lib; {
43     description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
44     homepage = "https://github.com/softwaremill/elasticmq";
45     changelog = "https://github.com/softwaremill/elasticmq/releases/tag/v${finalAttrs.version}";
46     sourceProvenance = with sourceTypes; [ binaryBytecode ];
47     license = licenses.asl20;
48     platforms = platforms.unix;
49     maintainers = with maintainers; [ peterromfeldhk ];
50     mainProgram = "elasticmq-server";
51   };