nixpkgs/pkgs/servers/prowlarr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
2.2 KiB
Nix
Raw Permalink Normal View History

{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
2021-10-10 15:49:50 +00:00
let
pname = "prowlarr";
unsupported = throw "Unsupported system ${stdenv.hostPlatform.system} for ${pname}";
2021-10-10 15:49:50 +00:00
os =
if stdenv.hostPlatform.isDarwin then
"osx"
else if stdenv.hostPlatform.isLinux then
"linux"
else
unsupported;
2021-10-10 15:49:50 +00:00
arch = {
aarch64-darwin = "arm64";
2021-10-10 15:49:50 +00:00
aarch64-linux = "arm64";
x86_64-darwin = "x64";
x86_64-linux = "x64";
}.${stdenv.hostPlatform.system} or unsupported;
2021-10-10 15:49:50 +00:00
hash = {
2024-11-19 20:14:29 +00:00
aarch64-darwin = "sha256-Ht8M0gHO6a+JVUGEZXdU2LFiNCx2jrGmErXT6kVTje0=";
aarch64-linux = "sha256-d3/6NxctWbMBSR7CPF2N46g1TJc63KnKKqZcu2p0A80=";
x86_64-darwin = "sha256-diShDytcYY+9/gNDAQM+xZ/79o40Qs+62dtxpW0EfaQ=";
x86_64-linux = "sha256-bb3UzRr0Df4QejSsFzL7x9PnyULL3ML8CL6EGmsqelM=";
}.${stdenv.hostPlatform.system} or unsupported;
2021-10-10 15:49:50 +00:00
in stdenv.mkDerivation rec {
inherit pname;
2024-11-19 20:14:29 +00:00
version = "1.26.1.4844";
2021-10-10 15:49:50 +00:00
src = fetchurl {
url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.master.${version}.${os}-core-${arch}.tar.gz";
inherit hash;
2021-10-10 15:49:50 +00:00
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/${pname}-${version}}
cp -r * $out/share/${pname}-${version}/.
makeWrapper "${dotnet-runtime}/bin/dotnet" $out/bin/Prowlarr \
2021-10-10 15:49:50 +00:00
--add-flags "$out/share/${pname}-${version}/Prowlarr.dll" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
curl sqlite libmediainfo mono openssl icu zlib ]}
2021-10-10 15:49:50 +00:00
runHook postInstall
'';
passthru = {
updateScript = ./update.sh;
2021-10-10 15:54:22 +00:00
tests.smoke-test = nixosTests.prowlarr;
2021-10-10 15:49:50 +00:00
};
meta = with lib; {
description = "Indexer manager/proxy built on the popular arr .net/reactjs base stack";
homepage = "https://wiki.servarr.com/prowlarr";
changelog = "https://github.com/Prowlarr/Prowlarr/releases/tag/v${version}";
2021-10-10 15:49:50 +00:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ jdreaver ];
2023-07-14 13:38:57 +00:00
mainProgram = "Prowlarr";
platforms = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
2021-10-10 15:49:50 +00:00
};
}