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
|
|
|
|
os =
|
|
|
|
if stdenv.isDarwin then
|
|
|
|
"osx"
|
|
|
|
else if stdenv.isLinux then
|
|
|
|
"linux"
|
|
|
|
else
|
|
|
|
throw "Not supported on ${stdenv.hostPlatform.system}.";
|
|
|
|
|
|
|
|
arch = {
|
|
|
|
x86_64-linux = "x64";
|
|
|
|
aarch64-linux = "arm64";
|
|
|
|
x86_64-darwin = "x64";
|
|
|
|
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
|
|
|
|
hash = {
|
2022-08-21 13:32:41 +00:00
|
|
|
x64-linux_hash = "sha256-VUJgf0gxOJH6RKUN5pODxoT6MM4fX43CSApRCDvPjjU=";
|
|
|
|
arm64-linux_hash = "sha256-rZM9r9CCcB0Q468w4Q5CuTeQS6hmFPCSv/DJ/SPm4Tw=";
|
|
|
|
x64-osx_hash = "sha256-RjeuINFgtqKcKF6I8K+l9CbYTRKagepZGT3fOLXDtJE=";
|
2021-10-11 16:52:03 +00:00
|
|
|
}."${arch}-${os}_hash";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "prowlarr";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.4.4.1947";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.develop.${version}.${os}-core-${arch}.tar.gz";
|
|
|
|
sha256 = hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
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; {
|
|
|
|
description = "An indexer manager/proxy built on the popular arr .net/reactjs base stack";
|
|
|
|
homepage = "https://wiki.servarr.com/prowlarr";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ jdreaver ];
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
}
|