Merge pull request #303338 from jchw-forks/86box-autoupdate

This commit is contained in:
Sandro 2024-06-02 23:58:24 +02:00 committed by GitHub
commit eecacc43bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -88,6 +88,7 @@ stdenv.mkDerivation (finalAttrs: {
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-58nNTOLund/KeDlNwzwwihjFVigs/P0K8SN07zExE2c="; hash = "sha256-58nNTOLund/KeDlNwzwwihjFVigs/P0K8SN07zExE2c=";
}; };
updateScript = ./update.sh;
}; };
# Some libraries are loaded dynamically, but QLibrary doesn't seem to search # Some libraries are loaded dynamically, but QLibrary doesn't seem to search

View File

@ -0,0 +1,12 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq nix-prefetch-github common-updater-scripts
set -euo pipefail
latest_release=$(curl --silent https://api.github.com/repos/86Box/86Box/releases/latest)
version=$(jq -r '.tag_name' <<<"$latest_release" | cut -c2-)
main_hash=$(nix-prefetch-github --json --rev "v$version" 86Box 86Box | jq -r '.hash')
roms_hash=$(nix-prefetch-github --json --rev "v$version" 86Box roms | jq -r '.hash')
update-source-version _86Box "_$version" "$main_hash"
update-source-version _86Box "$version" "$roms_hash" --source-key=roms