12 , common-updater-scripts
16 jre = jre_minimal.override {
27 stdenvNoCC.mkDerivation (finalAttrs: {
28 pname = "dynamodb-local";
32 url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_2024-06-20.tar.gz";
33 hash = "sha256-9SlgKNZFuy0/mf7eCjaUWVbrc4YXRDDnXADm+xs0540=";
38 nativeBuildInputs = [ makeBinaryWrapper ];
43 mkdir -p $out/bin $out/share/dynamodb-local
44 cp -r DynamoDBLocal* $out/share/dynamodb-local
46 makeBinaryWrapper ${jre}/bin/java $out/bin/dynamodb-local \
47 --add-flags "-jar $out/share/dynamodb-local/DynamoDBLocal.jar"
53 tests.version = testers.testVersion {
54 package = dynamodb-local;
56 updateScript = writeShellScript "update-dynamodb-local" ''
58 export PATH="${lib.makeBinPath [ curl jq yq common-updater-scripts ]}:$PATH"
60 NEW_VERSION=$(curl -s https://repo1.maven.org/maven2/com/amazonaws/DynamoDBLocal/maven-metadata.xml | xq -r '.metadata.versioning.latest')
61 NEW_VERSION_DATE=$(curl -s https://repo1.maven.org/maven2/com/amazonaws/DynamoDBLocal/maven-metadata.xml | xq -r '.metadata.versioning.lastUpdated | "\(.[:4])-\(.[4:6])-\(.[6:8])"')
63 if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then
64 echo "The new version same as the old version."
68 DOWNLOAD_URL="https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_$NEW_VERSION_DATE.tar.gz"
69 NIX_HASH=$(nix hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
71 update-source-version "dynamodb-local" "$NEW_VERSION" "$NIX_HASH" "$DOWNLOAD_URL"
76 description = "DynamoDB Local is a small client-side database and server that mimics the DynamoDB service";
77 homepage = "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html";
78 license = licenses.unfree;
79 mainProgram = "dynamodb-local";
80 maintainers = with maintainers; [ shyim martinjlowm ];
81 platforms = platforms.all;
82 sourceProvenance = with lib.sourceTypes; [