meteor: add passthru.updateScript

This commit is contained in:
Hythera
2026-04-19 20:12:43 +02:00
parent b28a8f0bc6
commit 20985100c4
2 changed files with 22 additions and 0 deletions
+2
View File
@@ -114,6 +114,8 @@ stdenv.mkDerivation {
done
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Complete open source platform for building web and mobile apps in pure JavaScript";
homepage = "https://www.meteor.com/";
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash common-updater-scripts curl nix-update
releaseInfo=$(curl https://install.meteor.com)
latestVersion=$(grep <<<"$releaseInfo" -oP 'RELEASE="\K[^"]+')
currentVersion=$(nix eval --raw -f . meteor.version)
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi
systems=$(nix eval --json -f . meteor.meta.platforms | jq --raw-output '.[]')
for system in $systems; do
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . meteor.src.url --system "$system")))
update-source-version meteor $latestVersion $hash --system=$system --ignore-same-version --ignore-same-hash
done