mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 14:19:58 +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
|
, jdk_headless
|
||||||
, jre_minimal
|
, jre_minimal
|
||||||
, makeBinaryWrapper
|
, makeBinaryWrapper
|
||||||
|
, curl
|
||||||
|
, jq
|
||||||
|
, yq
|
||||||
|
, dynamodb-local
|
||||||
|
, testers
|
||||||
|
, common-updater-scripts
|
||||||
|
, writeShellScript
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
jre = jre_minimal.override {
|
jre = jre_minimal.override {
|
||||||
@ -18,11 +25,11 @@ let
|
|||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "dynamodb-local";
|
pname = "dynamodb-local";
|
||||||
version = "2023-12-14";
|
version = "2.2.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_${finalAttrs.version}.tar.gz";
|
url = "https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_2024-01-04.tar.gz";
|
||||||
hash = "sha256-F9xTcLNAVFVbH7l0FlMuVNoLBrJS/UcHKXTkJh1n40w=";
|
hash = "sha256-CbZ9Z9A70JoHu4G6It+7WycaEtzuwjVJ2YrOK+37zYA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
@ -41,6 +48,29 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
runHook postInstall
|
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; {
|
meta = with lib; {
|
||||||
description = "DynamoDB Local is a small client-side database and server that mimics the DynamoDB service.";
|
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";
|
homepage = "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html";
|
||||||
|
Loading…
Reference in New Issue
Block a user