mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
Merge pull request #279186 from shyim/upd-dynamodb
dynamodb-local: 2023-12-14 -> 2.2.1
This commit is contained in:
commit
43d514a57a
@ -4,6 +4,13 @@
|
||||
, jdk_headless
|
||||
, jre_minimal
|
||||
, makeBinaryWrapper
|
||||
, curl
|
||||
, jq
|
||||
, yq
|
||||
, dynamodb-local
|
||||
, testers
|
||||
, common-updater-scripts
|
||||
, writeShellScript
|
||||
}:
|
||||
let
|
||||
jre = jre_minimal.override {
|
||||
@ -18,11 +25,11 @@ let
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "dynamodb-local";
|
||||
version = "2023-12-14";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-F9xTcLNAVFVbH7l0FlMuVNoLBrJS/UcHKXTkJh1n40w=";
|
||||
url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_2024-01-04.tar.gz";
|
||||
hash = "sha256-CbZ9Z9A70JoHu4G6It+7WycaEtzuwjVJ2YrOK+37zYA=";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
@ -41,6 +48,29 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = dynamodb-local;
|
||||
};
|
||||
updateScript = writeShellScript "update-dynamodb-local" ''
|
||||
set -o errexit
|
||||
export PATH="${lib.makeBinPath [ curl jq yq common-updater-scripts ]}:$PATH"
|
||||
|
||||
NEW_VERSION=$(curl -s https://repo1.maven.org/maven2/com/amazonaws/DynamoDBLocal/maven-metadata.xml | xq -r '.metadata.versioning.latest')
|
||||
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])"')
|
||||
|
||||
if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then
|
||||
echo "The new version same as the old version."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DOWNLOAD_URL="https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_$NEW_VERSION_DATE.tar.gz"
|
||||
NIX_HASH=$(nix hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
|
||||
|
||||
update-source-version "dynamodb-local" "$NEW_VERSION" "$NIX_HASH" "$DOWNLOAD_URL"
|
||||
'';
|
||||
};
|
||||
|
||||
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";
|
||||
|
Loading…
Reference in New Issue
Block a user