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-07-27 06:49:29 +00:00
|
|
|
x64-linux_hash = "sha256-MlnT16a2l209uqu9DuXLwqf4yiWBn9MggqVubzg0pM4=";
|
|
|
|
arm64-linux_hash = "sha256-2NkklAOjpDbAXid+rayiQ+jndLluIAMEiKz0MA1Hg0k=";
|
|
|
|
x64-osx_hash = "sha256-OzUZsXUwE7jF4h/rCvWAY5mh97z/cUbhh6MK0ozHC+A=";
|
|
|
|
arm64-osx_hash = "sha256-ggNqWCixkHxhiWTYfUx9qeZ9ocTyJEEgSZJqgGOnL+Q=";
|
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-07-27 06:49:29 +00:00
|
|
|
version = "5.7.0.8882";
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Usenet/BitTorrent movie downloader";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|