about summary refs log tree commit diff
path: root/pkgs/applications/emulators/86box/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/emulators/86box/update.sh')
-rwxr-xr-xpkgs/applications/emulators/86box/update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/86box/update.sh b/pkgs/applications/emulators/86box/update.sh
new file mode 100755
index 0000000000000..8af12478529f3
--- /dev/null
+++ b/pkgs/applications/emulators/86box/update.sh
@@ -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