3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/elasticmq-server-bin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jdk, jre, makeWrapper, runCommand, python3Packages, writeText }:
2019-05-20 05:05:06 +01:00
let
elasticmq-server = stdenv.mkDerivation rec {
pname = "elasticmq-server";
2021-08-31 22:39:40 +01:00
version = "1.2.0";
2019-05-20 05:05:06 +01:00
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${pname}-${version}.jar";
2021-08-31 22:39:40 +01:00
sha256 = "06bn5ixz0pvvhfvavr6njv8c2i9pgd6gj32wnp2f0fn0z1kypn1f";
};
2019-05-20 05:05:06 +01:00
# don't do anything?
unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
2019-05-20 05:05:06 +01:00
nativeBuildInputs = [ makeWrapper ];
2019-05-20 05:05:06 +01:00
installPhase = ''
mkdir -p $out/bin $out/share/elasticmq-server
2019-05-20 05:05:06 +01:00
cp $src $out/share/elasticmq-server/elasticmq-server.jar
2019-05-20 05:05:06 +01: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"
'';
2019-05-20 05:05:06 +01:00
meta = with lib; {
homepage = "https://github.com/softwaremill/elasticmq";
description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ peterromfeldhk ];
};
};
in elasticmq-server.overrideAttrs (_: {
passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
inherit elasticmq-server runCommand python3Packages writeText;
2019-05-20 05:05:06 +01:00
};
})