2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
|
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 = {
|
2022-06-16 17:23:12 +00:00
|
|
|
x64-linux_hash = "sha256-3oxCBg+lxN8eGaS1kmIK0kL2qUNOLHhLnkMPmPlZcyw=";
|
|
|
|
arm64-linux_hash = "sha256-OaCI2neL8bMFf/QuZEZXKuZgJBnUT+Q2XMChfSqF5Bc=";
|
|
|
|
x64-osx_hash = "sha256-vv3ds5BE2PDA94Hkr//MB0a7CF3dnk7r7wYF9SAzL48=";
|
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";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "4.1.0.6175";
|
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 = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
|
|
|
cp -r * $out/share/${pname}-${version}/.
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
makeWrapper "${dotnet-runtime}/bin/dotnet" $out/bin/Radarr \
|
2021-03-20 04:20:00 +00:00
|
|
|
--add-flags "$out/share/${pname}-${version}/Radarr.dll" \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
2022-05-18 14:49:53 +00:00
|
|
|
curl sqlite libmediainfo mono openssl icu zlib ]}
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
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
|
|
|
};
|
|
|
|
}
|