Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonarr: 2.0.0.5344 -> 3.0.5.1144 #115944

Merged
merged 5 commits into from Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions pkgs/servers/sonarr/default.nix
@@ -1,30 +1,34 @@
{ 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 ];

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;
tomberek marked this conversation as resolved.
Show resolved Hide resolved
};
Expand Down
7 changes: 7 additions & 0 deletions 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"