From 9e2c7ce1e620683465e8bb5fb2451a8822a5d9cf Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Wed, 3 Jan 2024 09:30:03 +0100 Subject: [PATCH] dynamodb-local: init at 2023-12-14 --- pkgs/by-name/dy/dynamodb-local/package.nix | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/dy/dynamodb-local/package.nix diff --git a/pkgs/by-name/dy/dynamodb-local/package.nix b/pkgs/by-name/dy/dynamodb-local/package.nix new file mode 100644 index 000000000000..5a422c7eef6f --- /dev/null +++ b/pkgs/by-name/dy/dynamodb-local/package.nix @@ -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 + ]; + }; +})