mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 09:03:48 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, jdk, jre, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "elasticmq-server";
|
|
version = "0.14.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/${pname}-${version}.jar";
|
|
sha256 = "1cp2pmkc6gx7gr6109jlcphlky5rr6s1wj528r6hyhzdc01sjhhz";
|
|
};
|
|
|
|
# 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";
|
|
license = licenses.asl20;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ peterromfeldhk ];
|
|
};
|
|
}
|