nixpkgs-suyu/pkgs/servers/sonarr/default.nix
Woky 6144606a2c
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>
2021-03-25 17:25:14 -04:00

35 lines
1,002 B
Nix

{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, nixosTests }:
stdenv.mkDerivation rec {
pname = "sonarr";
version = "3.0.5.1144";
src = fetchurl {
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/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.gpl3Only;
maintainers = with lib.maintainers; [ fadenb purcell ];
platforms = lib.platforms.all;
};
}