depot/third_party/nixpkgs/pkgs/servers/jackett/default.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

52 lines
1.4 KiB
Nix

{ lib
, stdenv
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, openssl
, mono
, nixosTests
}:
buildDotnetModule rec {
pname = "jackett";
version = "0.21.2831";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha512-Ka993M45A9RYs6txl3gxhoq8c/vKRJzeLP2Ycx2L9uiNPWFsKlDwDr2rPLvZ9H0soZJs7sjeBAt0RFHSAlSvBg==";
};
projectFile = "src/Jackett.Server/Jackett.Server.csproj";
nugetDeps = ./deps.nix;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
dotnetInstallFlags = [ "-p:TargetFramework=net6.0" ];
runtimeDeps = [ openssl ];
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64); # mono is not available on aarch64-darwin
nativeCheckInputs = [ mono ];
testProjectFile = "src/Jackett.Test/Jackett.Test.csproj";
postFixup = ''
# For compatibility
ln -s $out/bin/jackett $out/bin/Jackett || :
ln -s $out/bin/Jackett $out/bin/jackett || :
'';
passthru.updateScript = ./updater.sh;
passthru.tests = { inherit (nixosTests) jackett; };
meta = with lib; {
description = "API Support for your favorite torrent trackers";
mainProgram = "jackett";
homepage = "https://github.com/Jackett/Jackett/";
changelog = "https://github.com/Jackett/Jackett/releases/tag/v${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [ edwtjo nyanloutre purcell ];
};
}