2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
let
|
2023-02-22 10:55:15 +00:00
|
|
|
pname = "prowlarr";
|
|
|
|
|
|
|
|
unsupported = throw "Unsupported system ${stdenv.hostPlatform.system} for ${pname}";
|
|
|
|
|
2021-10-11 16:52:03 +00:00
|
|
|
os =
|
2024-09-26 11:04:55 +00:00
|
|
|
if stdenv.hostPlatform.isDarwin then
|
2021-10-11 16:52:03 +00:00
|
|
|
"osx"
|
2024-09-26 11:04:55 +00:00
|
|
|
else if stdenv.hostPlatform.isLinux then
|
2021-10-11 16:52:03 +00:00
|
|
|
"linux"
|
|
|
|
else
|
2023-02-22 10:55:15 +00:00
|
|
|
unsupported;
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
arch = {
|
2023-02-22 10:55:15 +00:00
|
|
|
aarch64-darwin = "arm64";
|
2021-10-11 16:52:03 +00:00
|
|
|
aarch64-linux = "arm64";
|
|
|
|
x86_64-darwin = "x64";
|
2023-02-22 10:55:15 +00:00
|
|
|
x86_64-linux = "x64";
|
|
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
hash = {
|
2024-10-04 16:56:33 +00:00
|
|
|
aarch64-darwin = "sha256-n9WGbxxackZ2FRexvy7lFVUTjcydhSzSkXO78wsywi8=";
|
|
|
|
aarch64-linux = "sha256-CS3T9beQZo/WllZo2mRMUMYvgM0x6H//tTqByx3ikQw=";
|
|
|
|
x86_64-darwin = "sha256-p3sPwSKE0761R7DlmO55FhmjGDWbGl8X9UcQBjaUXQs=";
|
|
|
|
x86_64-linux = "sha256-wfucjWxTpYsrRRLoQDgy66HZHdRILCKrFEnZyaoQ560=";
|
2023-02-22 10:55:15 +00:00
|
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2023-02-22 10:55:15 +00:00
|
|
|
inherit pname;
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "1.24.3.4754";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-09 11:40:11 +00:00
|
|
|
url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.master.${version}.${os}-core-${arch}.tar.gz";
|
2023-02-22 10:55:15 +00:00
|
|
|
inherit hash;
|
2021-10-11 16:52:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
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/Prowlarr \
|
2021-10-11 16:52:03 +00:00
|
|
|
--add-flags "$out/share/${pname}-${version}/Prowlarr.dll" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
2022-05-18 14:49:53 +00:00
|
|
|
curl sqlite libmediainfo mono openssl icu zlib ]}
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
tests.smoke-test = nixosTests.prowlarr;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Indexer manager/proxy built on the popular arr .net/reactjs base stack";
|
2021-10-11 16:52:03 +00:00
|
|
|
homepage = "https://wiki.servarr.com/prowlarr";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/Prowlarr/Prowlarr/releases/tag/v${version}";
|
2021-10-11 16:52:03 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ jdreaver ];
|
2023-07-15 17:15:38 +00:00
|
|
|
mainProgram = "Prowlarr";
|
2023-02-22 10:55:15 +00:00
|
|
|
platforms = [
|
|
|
|
"aarch64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
2021-10-11 16:52:03 +00:00
|
|
|
};
|
|
|
|
}
|