Merge pull request #278446 from shyim/add-dynamodb-local

dynamodb-local: init at 2023-12-14
This commit is contained in:
Pol Dellaiera 2024-01-03 15:23:48 +01:00 committed by GitHub
commit 3efa1d5b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,44 @@
{ lib
, stdenvNoCC
, fetchurl
, jre
, makeBinaryWrapper
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dynamodb-local";
version = "2023-12-14";
src = fetchurl {
url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_${finalAttrs.version}.tar.gz";
hash = "sha256-F9xTcLNAVFVbH7l0FlMuVNoLBrJS/UcHKXTkJh1n40w=";
};
sourceRoot = ".";
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/dynamodb-local
cp -r DynamoDBLocal* $out/share/dynamodb-local
makeBinaryWrapper ${jre}/bin/java $out/bin/dynamodb-local \
--add-flags "-jar $out/share/dynamodb-local/DynamoDBLocal.jar"
runHook postInstall
'';
meta = with lib; {
description = "DynamoDB Local is a small client-side database and server that mimics the DynamoDB service.";
homepage = "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html";
license = licenses.unfree;
mainProgram = "dynamodb-local";
maintainers = with maintainers; [ shyim ];
platforms = platforms.all;
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
};
})