Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / elasticmq-server-bin / default.nix
blobdebb1d8a57bcbad2329488c453033330951fb5ea
1 { lib, stdenv, fetchurl, jdk, jre, makeBinaryWrapper, runCommand, python3Packages, writeText }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "elasticmq-server";
5   version = "1.6.5";
7   src = fetchurl {
8     url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${finalAttrs.version}.jar";
9     sha256 = "sha256-7VpalDKa2Qr3HaIO5LcORvm5rAhgYQzStQkp7rs3pMQ=";
10   };
12   # don't do anything?
13   unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
15   nativeBuildInputs = [ makeBinaryWrapper ];
17   installPhase = ''
18     mkdir -p $out/bin $out/share/elasticmq-server
20     cp $src $out/share/elasticmq-server/elasticmq-server.jar
22     # TODO: how to add extraArgs? current workaround is to use JAVA_TOOL_OPTIONS environment to specify properties
23     makeWrapper ${jre}/bin/java $out/bin/elasticmq-server \
24       --add-flags "-jar $out/share/elasticmq-server/elasticmq-server.jar"
25   '';
27   passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
28     inherit runCommand python3Packages writeText;
29     elasticmq-server = finalAttrs.finalPackage;
30   };
32   meta = with lib; {
33     description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
34     homepage = "https://github.com/softwaremill/elasticmq";
35     changelog = "https://github.com/softwaremill/elasticmq/releases/tag/v${finalAttrs.version}";
36     sourceProvenance = with sourceTypes; [ binaryBytecode ];
37     license = licenses.asl20;
38     platforms = platforms.unix;
39     maintainers = with maintainers; [ peterromfeldhk ];
40     mainProgram = "elasticmq-server";
41   };