2021-10-10 17:49:50 +02:00
|
|
|
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnetCorePackages, openssl, nixosTests }:
|
|
|
|
|
|
|
|
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-01-28 16:13:24 +01:00
|
|
|
x64-linux_hash = "sha256-NTkb6E0GRofd63TozLPxyNZ6GxO4pAc+MWsUDKWLZDY=";
|
|
|
|
arm64-linux_hash = "sha256-eB1Izvf/E0iOGkWt6fSc4oAt1sJ7XTxn/iwDNYz7WkA=";
|
|
|
|
x64-osx_hash = "sha256-TAphdcbzbNUZpWYVaHBkhI+RsgxWmI8n8Z6VwYxHXWg=";
|
2021-10-10 17:49:50 +02:00
|
|
|
}."${arch}-${os}_hash";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "prowlarr";
|
2022-01-28 16:13:24 +01:00
|
|
|
version = "0.2.0.1448";
|
2021-10-10 17:49:50 +02: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}/.
|
|
|
|
|
2021-09-26 23:06:38 +02:00
|
|
|
makeWrapper "${dotnetCorePackages.runtime_3_1}/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 [
|
|
|
|
curl sqlite libmediainfo mono openssl icu ]}
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ jdreaver ];
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
}
|