2022-04-08 21:26:52 +02:00
|
|
|
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
let
|
2023-02-20 13:01:06 +01:00
|
|
|
pname = "prowlarr";
|
|
|
|
|
|
|
|
unsupported = throw "Unsupported system ${stdenv.hostPlatform.system} for ${pname}";
|
|
|
|
|
2021-10-10 17:49:50 +02:00
|
|
|
os =
|
|
|
|
if stdenv.isDarwin then
|
|
|
|
"osx"
|
|
|
|
else if stdenv.isLinux then
|
|
|
|
"linux"
|
|
|
|
else
|
2023-02-20 13:01:06 +01:00
|
|
|
unsupported;
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
arch = {
|
2023-02-20 13:01:06 +01:00
|
|
|
aarch64-darwin = "arm64";
|
2021-10-10 17:49:50 +02:00
|
|
|
aarch64-linux = "arm64";
|
|
|
|
x86_64-darwin = "x64";
|
2023-02-20 13:01:06 +01:00
|
|
|
x86_64-linux = "x64";
|
|
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
hash = {
|
2023-10-27 11:25:05 +02:00
|
|
|
aarch64-darwin = "sha256-5K18Vd0Ly/2YSmAvTbgiSQR8ifaz9wMs3vI0WFtB90g=";
|
|
|
|
aarch64-linux = "sha256-QI4+TVW/Zj1sI4yoxTGpzYNPufKnp68fLgDmajzD+6Y=";
|
|
|
|
x86_64-darwin = "sha256-qofWOMJIen8dI1wDFwNWeYuV9Ett3KvaTLfuK/v2USs=";
|
|
|
|
x86_64-linux = "sha256-qqAoXPdsjpn6Al5CLcvqfsZe9PRp8Swg1Wiy0w20hHs=";
|
2023-02-20 13:01:06 +01:00
|
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2023-02-20 13:01:06 +01:00
|
|
|
inherit pname;
|
2023-10-27 11:25:05 +02:00
|
|
|
version = "1.9.4.4039";
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-20 13:01:06 +01:00
|
|
|
url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.master.${version}.${os}-core-${arch}.tar.gz";
|
|
|
|
inherit hash;
|
2021-10-10 17:49:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
|
|
|
cp -r * $out/share/${pname}-${version}/.
|
|
|
|
|
2022-04-08 21:26:52 +02:00
|
|
|
makeWrapper "${dotnet-runtime}/bin/dotnet" $out/bin/Prowlarr \
|
2021-10-10 17:49:50 +02:00
|
|
|
--add-flags "$out/share/${pname}-${version}/Prowlarr.dll" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
2022-04-08 21:26:52 +02:00
|
|
|
curl sqlite libmediainfo mono openssl icu zlib ]}
|
2021-10-10 17:49:50 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
2021-10-10 17:54:22 +02:00
|
|
|
tests.smoke-test = nixosTests.prowlarr;
|
2021-10-10 17:49:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An indexer manager/proxy built on the popular arr .net/reactjs base stack";
|
|
|
|
homepage = "https://wiki.servarr.com/prowlarr";
|
2023-02-20 13:01:06 +01:00
|
|
|
changelog = "https://github.com/Prowlarr/Prowlarr/releases/tag/v${version}";
|
2021-10-10 17:49:50 +02:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ jdreaver ];
|
2023-07-14 15:38:57 +02:00
|
|
|
mainProgram = "Prowlarr";
|
2023-02-20 13:01:06 +01:00
|
|
|
platforms = [
|
|
|
|
"aarch64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
2021-10-10 17:49:50 +02:00
|
|
|
};
|
|
|
|
}
|