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";
|
2023-10-09 19:29:22 +00:00
|
|
|
aarch64-darwin = "arm64";
|
2021-03-20 04:20:00 +00:00
|
|
|
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
|
|
|
|
hash = {
|
2024-02-29 20:09:43 +00:00
|
|
|
x64-linux_hash = "sha256-oZI2nvxvxOiv9F9c2AaP9hEBVd3kV4tjuEmvaR5V0Lc=";
|
|
|
|
arm64-linux_hash = "sha256-Pquc/b/VXJEi4N8uOfvg4X1083JaOdCXg2IPAGZAMV0=";
|
|
|
|
x64-osx_hash = "sha256-HHmx8bI4d+xmL63v/qmUIJDt+laoSs5Iqp+I7OzoU/k=";
|
|
|
|
arm64-osx_hash = "sha256-Us/ZEDlZ96/ybs8lxnl4bSFICwc9xJtXScA+hGEwfWk=";
|
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";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "5.3.6.8612";
|
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/";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/Radarr/Radarr/releases/tag/v${version}";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ edwtjo purcell ];
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "Radarr";
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|