2021-03-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnetCorePackages, openssl, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
let
|
|
|
|
os = if stdenv.isDarwin then "osx" else "linux";
|
|
|
|
arch = {
|
|
|
|
x86_64-linux = "x64";
|
|
|
|
aarch64-linux = "arm64";
|
|
|
|
x86_64-darwin = "x64";
|
|
|
|
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
|
|
|
|
hash = {
|
2021-06-04 09:07:49 +00:00
|
|
|
x64-linux_hash = "sha256-/9W8VwA3d7R2pYH45QvGC1q9f9M9C867nKuhSlU6zsg=";
|
|
|
|
arm64-linux_hash = "sha256-QjIg+XY5vTmYH+wYqU3VZ5MfxSAcUcGVvapyrlMDbLI=";
|
|
|
|
x64-osx_hash = "sha256-K17tzGdLKpHkkLSOT3a4FXXfeGz6LJ6cxd20IuJ2zVs=";
|
2021-03-20 04:20:00 +00:00
|
|
|
}."${arch}-${os}_hash";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "radarr";
|
2021-06-04 09:07:49 +00:00
|
|
|
version = "3.2.1.5070";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-20 04:20:00 +00:00
|
|
|
url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.master.${version}.${os}-core-${arch}.tar.gz";
|
|
|
|
sha256 = hash;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
|
|
|
cp -r * $out/share/${pname}-${version}/.
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
makeWrapper "${dotnetCorePackages.netcore_3_1}/bin/dotnet" $out/bin/Radarr \
|
|
|
|
--add-flags "$out/share/${pname}-${version}/Radarr.dll" \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
2021-03-20 04:20:00 +00:00
|
|
|
curl sqlite libmediainfo mono openssl icu ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
tests.smoke-test = nixosTests.radarr;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Usenet/BitTorrent movie downloader";
|
|
|
|
homepage = "https://radarr.video/";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ edwtjo purcell ];
|
2021-03-20 04:20:00 +00:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|