harmonoid: 0.3.21 -> 0.3.22, fix update script to update all sources (#502784)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
mpv-unwrapped,
|
||||
}:
|
||||
let
|
||||
version = "0.3.21";
|
||||
version = "0.3.22";
|
||||
url_base = "https://github.com/alexmercerind2/harmonoid-releases/releases/download/v${version}";
|
||||
url =
|
||||
rec {
|
||||
@@ -29,9 +29,9 @@ let
|
||||
or (throw "${stdenv.hostPlatform.system} is an unsupported platform");
|
||||
hash =
|
||||
rec {
|
||||
x86_64-linux = "sha256-RZDRb/afXbalNbLBGaQgx5Qd4UEbNrvIsa3h+e6osJE=";
|
||||
aarch64-linux = "sha256-1ys7uyCjXe4IBeXRk8mFjqmP9OottNefQrrtTkxq/qU=";
|
||||
x86_64-darwin = "sha256-mo7Rj6c89KZrsL29i99x4E7b6soWlGUsC6KpSB7y5iY=";
|
||||
x86_64-linux = "sha256-+fEx30uu0rZiORrtE00xG2piJzpFbfxSZw3OjrhLJyg=";
|
||||
aarch64-linux = "sha256-jXN5i+LudsODNZUzb5SXClqgQxYzanrbZCqB8X0pJRQ=";
|
||||
x86_64-darwin = "sha256-YYMKrb7ZilfEztL2JTxSdeoDd8xQMrHFtN9N9fmsm3w=";
|
||||
aarch64-darwin = x86_64-darwin;
|
||||
}
|
||||
.${stdenv.hostPlatform.system};
|
||||
@@ -44,6 +44,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
inherit url hash;
|
||||
};
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
]
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl pcre2 jq common-updater-scripts
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
release_data=$(curl https://api.github.com/repos/alexmercerind2/harmonoid-releases/releases/latest)
|
||||
version=$(jq -r '.tag_name[1:]' <<< "$release_data")
|
||||
|
||||
linux64_hash=$(jq '.assets[] as $item | if $item.name == "harmonoid-linux-x86_64.tar.gz" then $item.digest[7:] else empty end' -r <<< "$release_data")
|
||||
linux64_hash=$(nix-hash --to-sri --type sha256 "$linux64_hash")
|
||||
|
||||
linux_aarch_hash=$(jq '.assets[] as $item | if $item.name == "harmonoid-linux-aarch64.tar.gz" then $item.digest[7:] else empty end' -r <<< "$release_data")
|
||||
linux_aarch_hash=$(nix-hash --to-sri --type sha256 "$linux_aarch_hash")
|
||||
|
||||
macos_hash=$(jq '.assets[] as $item | if $item.name == "harmonoid-macos-universal.dmg" then $item.digest[7:] else empty end' -r <<< "$release_data")
|
||||
macos_hash=$(nix-hash --to-sri --type sha256 "$macos_hash")
|
||||
|
||||
update-source-version harmonoid "$version" "$linux64_hash" --system=x86_64-linux --ignore-same-version
|
||||
update-source-version harmonoid "$version" "$linux_aarch_hash" --system=aarch64-linux --ignore-same-version
|
||||
update-source-version harmonoid "$version" "$macos_hash" --system=x86_64-darwin --ignore-same-version
|
||||
Reference in New Issue
Block a user