1 { lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
4 os = if stdenv.hostPlatform.isDarwin then "osx" else "linux";
7 aarch64-linux = "arm64";
9 aarch64-darwin = "arm64";
10 }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
13 x64-linux_hash = "sha256-RvzAWVm2rUSL296H0FNsvGp1aCGu2xSoiQEJJM3hLRI=";
14 arm64-linux_hash = "sha256-/j7yyiUBFJHDQ+14sQYrZDeWuBqNQ6Ipo2MOVWuYYlc=";
15 x64-osx_hash = "sha256-Q5M2t7fEVYxvtTuP8C7kqe/yMTlus3pDUmbDBw14u3Q=";
16 arm64-osx_hash = "sha256-Lgdlxwb5szkz2qRDs0eup3J4M/GQ4sYHzvhIJP+0ow0=";
17 }."${arch}-${os}_hash";
19 in stdenv.mkDerivation rec {
21 version = "5.14.0.9383";
24 url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.master.${version}.${os}-core-${arch}.tar.gz";
28 nativeBuildInputs = [ makeWrapper ];
33 mkdir -p $out/{bin,share/${pname}-${version}}
34 cp -r * $out/share/${pname}-${version}/.
36 makeWrapper "${dotnet-runtime}/bin/dotnet" $out/bin/Radarr \
37 --add-flags "$out/share/${pname}-${version}/Radarr.dll" \
38 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
39 curl sqlite libmediainfo mono openssl icu zlib ]}
45 updateScript = ./update.sh;
46 tests.smoke-test = nixosTests.radarr;
50 description = "Usenet/BitTorrent movie downloader";
51 homepage = "https://radarr.video/";
52 changelog = "https://github.com/Radarr/Radarr/releases/tag/v${version}";
53 license = licenses.gpl3Only;
54 maintainers = with maintainers; [ edwtjo purcell ];
55 mainProgram = "Radarr";
56 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];