Merge pull request #238512 from marsam/update-elasticmq

elasticmq-server-bin: 1.4.1 -> 1.4.2
This commit is contained in:
Mario Rodas 2023-06-24 08:35:02 -05:00 committed by GitHub
commit 48d9f9bce0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,41 +1,41 @@
{ lib, stdenv, fetchurl, jdk, jre, makeWrapper, runCommand, python3Packages, writeText }:
{ lib, stdenv, fetchurl, jdk, jre, makeBinaryWrapper, runCommand, python3Packages, writeText }:
let
elasticmq-server = stdenv.mkDerivation rec {
pname = "elasticmq-server";
version = "1.4.1";
stdenv.mkDerivation (finalAttrs: {
pname = "elasticmq-server";
version = "1.4.2";
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${pname}-${version}.jar";
sha256 = "sha256-F1G9shYvntFiSgLdXPkSTpN/MP86ewhHRIchbXues+s=";
};
# 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; {
homepage = "https://github.com/softwaremill/elasticmq";
description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ peterromfeldhk ];
};
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${finalAttrs.pname}-${finalAttrs.version}.jar";
sha256 = "sha256-71GlX8zwiC5tZm2LGSUdOa4ZDZUQQJ9zTY8viu2MQLk=";
};
in elasticmq-server.overrideAttrs (_: {
# don't do anything?
unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
nativeBuildInputs = [ makeBinaryWrapper ];
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"
'';
passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
inherit elasticmq-server runCommand python3Packages writeText;
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 ];
};
})