From 40a57ba84bddee00aa11d5aae97ad7169c3bca6d Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 5 Feb 2024 14:50:25 +0000 Subject: [PATCH] sonarr: 4.0.0.748 -> 4.0.1.929 Also switch to using assets attached to GitHub releases, which now seems to be the official download location. --- pkgs/servers/sonarr/default.nix | 12 ++++++------ pkgs/servers/sonarr/update.sh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/sonarr/default.nix b/pkgs/servers/sonarr/default.nix index f07c0933145f..cf56476719a1 100644 --- a/pkgs/servers/sonarr/default.nix +++ b/pkgs/servers/sonarr/default.nix @@ -10,18 +10,18 @@ let }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); hash = { - x64-linux_hash = "sha256-XCCqAMxaOk9vGlTDHv7MB6VhTx0ODDTuPxkfvTBeJDk="; - arm64-linux_hash = "sha256-4jQzgjicPh4AmO2jY3h8YXlTlvIbk4uyDxMpOQtm+HI="; - x64-osx_hash = "sha256-MYLbAg9oCjWaZEMnSBmLEDEpab9vvcJjI8P8Fdmhmzs="; - arm64-osx_hash = "sha256-FyHffgNVoS/HPXz2YQGyxRowT04VFKtWZYEvsBZ9t4E="; + x64-linux_hash = "sha256-9YNhyhxnnn2CesXLJH5Cs7yB9w23YUAZPrk9vEHvevk="; + arm64-linux_hash = "sha256-RBCyfozmBpWrmsfMcdb1BqcBXj64CMDrgpMZTzj85ZQ="; + x64-osx_hash = "sha256-+AKENBZohBUEKQEM3L69EzC84MhCX3fGvsNFn5p2v84="; + arm64-osx_hash = "sha256-Arx8usecAN+d0NGL7Hv+rB4GG7p/KLAaqpJFgNg7C2Y="; }."${arch}-${os}_hash"; in stdenv.mkDerivation rec { pname = "sonarr"; - version = "4.0.0.748"; + version = "4.0.1.929"; src = fetchurl { - url = "https://download.sonarr.tv/v4/main/${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz"; + url = "https://github.com/Sonarr/Sonarr/releases/download/v${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz"; inherit hash; }; diff --git a/pkgs/servers/sonarr/update.sh b/pkgs/servers/sonarr/update.sh index 50832aba672c..8ccbc5ba9919 100755 --- a/pkgs/servers/sonarr/update.sh +++ b/pkgs/servers/sonarr/update.sh @@ -13,7 +13,7 @@ updateHash() hashKey="${arch}-${os}_hash" - url="https://download.sonarr.tv/v4/main/${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz"; + url="https://github.com/Sonarr/Sonarr/releases/download/v${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz"; hash=$(nix-prefetch-url --type sha256 $url) sriHash="$(nix hash to-sri --type sha256 $hash)" @@ -27,7 +27,7 @@ updateVersion() currentVersion=$(cd $dirname && nix eval --raw -f ../../.. sonarr.version) -latestTag=$(curl https://api.github.com/repos/Sonarr/Sonarr/tags | jq -r '.[] | .name' | sort --version-sort | tail -1) +latestTag=$(curl https://api.github.com/repos/Sonarr/Sonarr/releases/latest | jq -r ".tag_name") latestVersion="$(expr $latestTag : 'v\(.*\)')" if [[ "$currentVersion" == "$latestVersion" ]]; then