2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchurl, jdk, jre, makeBinaryWrapper, runCommand, python3Packages, writeText }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "elasticmq-server";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.5.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${finalAttrs.pname}-${finalAttrs.version}.jar";
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-J7LT1OwMIt0jV9lRwTVdkW2Mm9OqxyGUlte3VHZrTZ0=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# don't do anything?
|
|
|
|
unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/elasticmq-server
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cp $src $out/share/elasticmq-server/elasticmq-server.jar
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# 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"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
|
2023-07-15 17:15:38 +00:00
|
|
|
inherit runCommand python3Packages writeText;
|
|
|
|
elasticmq-server = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
|
|
|
|
homepage = "https://github.com/softwaremill/elasticmq";
|
|
|
|
changelog = "https://github.com/softwaremill/elasticmq/releases/tag/v${finalAttrs.version}";
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ peterromfeldhk ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "elasticmq-server";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-09-18 10:52:07 +00:00
|
|
|
})
|