1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/pkgs/servers/sonarr/default.nix
2021-10-03 00:31:15 +02:00

40 lines
1 KiB
Nix

{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, nixosTests }:
stdenv.mkDerivation rec {
pname = "sonarr";
version = "3.0.6.1342";
src = fetchurl {
url = "https://download.sonarr.tv/v3/main/${version}/Sonarr.main.${version}.linux.tar.gz";
sha256 = "sha256-6RMthsf60FJLDHB72QJkPeF7vXmjBgcqKujO0IOjVIk=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
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 ]}
runHook postInstall
'';
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;
};
}