1 { lib, stdenv, fetchurl, jdk, jre, makeBinaryWrapper, runCommand, python3Packages, writeText }:
3 stdenv.mkDerivation (finalAttrs: {
4 pname = "elasticmq-server";
8 url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${finalAttrs.version}.jar";
9 sha256 = "sha256-7VpalDKa2Qr3HaIO5LcORvm5rAhgYQzStQkp7rs3pMQ=";
13 unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
15 nativeBuildInputs = [ makeBinaryWrapper ];
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"
27 passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
28 inherit runCommand python3Packages writeText;
29 elasticmq-server = finalAttrs.finalPackage;
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";