diff --git a/pkgs/by-name/vi/vintagestory/package.nix b/pkgs/by-name/vi/vintagestory/package.nix index 60f5ba20d977..ce5ee91fcdbc 100644 --- a/pkgs/by-name/vi/vintagestory/package.nix +++ b/pkgs/by-name/vi/vintagestory/package.nix @@ -123,6 +123,8 @@ stdenv.mkDerivation (finalAttrs: { done ''; + passthru.updateScript = ./update.sh; + meta = { description = "In-development indie sandbox game about innovation and exploration"; homepage = "https://www.vintagestory.at/"; diff --git a/pkgs/by-name/vi/vintagestory/update.sh b/pkgs/by-name/vi/vintagestory/update.sh new file mode 100755 index 000000000000..ce8012232e94 --- /dev/null +++ b/pkgs/by-name/vi/vintagestory/update.sh @@ -0,0 +1,7 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I../../../.. -i bash -p curl jq common-updater-scripts + +set -euo pipefail + +new_version="$(curl -sL https://mods.vintagestory.at/api/gameversions | jq -r '.gameversions | map(.name | select(contains("-") | not)) | last')" +update-source-version vintagestory "$new_version"