mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
75 lines
2.1 KiB
Nix
75 lines
2.1 KiB
Nix
{ lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
|
|
|
|
let
|
|
pname = "prowlarr";
|
|
|
|
unsupported = throw "Unsupported system ${stdenv.hostPlatform.system} for ${pname}";
|
|
|
|
os =
|
|
if stdenv.isDarwin then
|
|
"osx"
|
|
else if stdenv.isLinux then
|
|
"linux"
|
|
else
|
|
unsupported;
|
|
|
|
arch = {
|
|
aarch64-darwin = "arm64";
|
|
aarch64-linux = "arm64";
|
|
x86_64-darwin = "x64";
|
|
x86_64-linux = "x64";
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
|
|
|
hash = {
|
|
aarch64-darwin = "sha256-4bzeHU52XNAZW24P6uKQ0etUCW7dIsVpujrilPrI3hM=";
|
|
aarch64-linux = "sha256-0IpayOFTxhdbz7R3PhbTsdweMdDyY6J5WJ8JX/6aFbg=";
|
|
x86_64-darwin = "sha256-6hcuD63xwolT/dDKnrdfosyJy1W5kyPJJf/H4u6XGfw=";
|
|
x86_64-linux = "sha256-7ZDdXAVdMAArOy7iYaqmS6s70TQaZIknRoLRyTKpULg=";
|
|
}.${stdenv.hostPlatform.system} or unsupported;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
inherit pname;
|
|
version = "1.19.0.4568";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Prowlarr/Prowlarr/releases/download/v${version}/Prowlarr.master.${version}.${os}-core-${arch}.tar.gz";
|
|
inherit hash;
|
|
};
|
|
|
|
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 \
|
|
--add-flags "$out/share/${pname}-${version}/Prowlarr.dll" \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
|
curl sqlite libmediainfo mono openssl icu zlib ]}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = ./update.sh;
|
|
tests.smoke-test = nixosTests.prowlarr;
|
|
};
|
|
|
|
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}";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ jdreaver ];
|
|
mainProgram = "Prowlarr";
|
|
platforms = [
|
|
"aarch64-darwin"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"x86_64-linux"
|
|
];
|
|
};
|
|
}
|