diff options
author | Woky <pampu.andrei.social+git@pm.me> | 2021-03-25 23:25:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 17:25:14 -0400 |
commit | 6144606a2c700a29603cd43fa837614eef4a3ab9 (patch) | |
tree | f6b823417d366038841133d72227e30bae9a49b7 /pkgs/servers | |
parent | 91b91ebe40204dc91fce5ee9d9e1f345f99dfbc5 (diff) |
sonarr: 2.0.0.5344 -> 3.0.5.1144 (#115944)
* sonarr: 2.0.0.5344 -> 3.0.5.1144
* sonarr: change license to gpl3Only
* sonarr: add test passthru
* sonarr: remove ellipses from arguments
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
* sonarr: create update script
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/sonarr/default.nix | 18 | ||||
-rwxr-xr-x | pkgs/servers/sonarr/update.sh | 7 |
2 files changed, 18 insertions, 7 deletions
diff --git a/pkgs/servers/sonarr/default.nix b/pkgs/servers/sonarr/default.nix index a1803abe6a8c..cdaa96464e7b 100644 --- a/pkgs/servers/sonarr/default.nix +++ b/pkgs/servers/sonarr/default.nix @@ -1,12 +1,12 @@ -{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, ... }: +{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, nixosTests }: stdenv.mkDerivation rec { pname = "sonarr"; - version = "2.0.0.5344"; + version = "3.0.5.1144"; src = fetchurl { - url = "https://download.sonarr.tv/v2/master/mono/NzbDrone.master.${version}.mono.tar.gz"; - sha256 = "0bsxf7m2dir7gi0cfn8vdasr11q224b9mp6cixak9ss5zafwn59a"; + url = "https://download.sonarr.tv/v3/main/${version}/Sonarr.main.${version}.linux.tar.gz"; + sha256 = "1ajqh3hvjfsbs6rb2f8dnndxsycmlzamp0cwjwkh1j2dinbzdbvp"; }; nativeBuildInputs = [ makeWrapper ]; @@ -14,17 +14,21 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin cp -r * $out/bin/ - makeWrapper "${mono}/bin/mono" $out/bin/NzbDrone \ - --add-flags "$out/bin/NzbDrone.exe" \ + --add-flags "$out/bin/Sonarr.exe" \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ curl sqlite libmediainfo ]} ''; + passthru = { + updateScript = "./update.sh"; + tests.smoke-test = nixosTests.sonarr; + }; + meta = { description = "Smart PVR for newsgroup and bittorrent users"; homepage = "https://sonarr.tv/"; - license = lib.licenses.gpl3; + license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ fadenb purcell ]; platforms = lib.platforms.all; }; diff --git a/pkgs/servers/sonarr/update.sh b/pkgs/servers/sonarr/update.sh new file mode 100755 index 000000000000..faa4f65cfc8f --- /dev/null +++ b/pkgs/servers/sonarr/update.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq common-updater-scripts + +latestTag=$(curl https://api.github.com/repos/Sonarr/Sonarr/tags | jq -r '.[] | .name' | sort --version-sort | tail -1) +version="$(expr $latestTag : 'v\(.*\)')" + +update-source-version sonarr "$version" |