depot/third_party/nixpkgs/pkgs/development/python-modules/foolscap/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

68 lines
1.4 KiB
Nix

{
buildPythonPackage,
fetchPypi,
lib,
mock,
pyopenssl,
pytestCheckHook,
pythonOlder,
setuptools,
six,
twisted,
txi2p-tahoe,
txtorcon,
versioneer,
}:
buildPythonPackage rec {
pname = "foolscap";
version = "23.3.0";
pyproject = true;
build-system = [
setuptools
versioneer
];
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Vu7oXC1brsgBwr2q59TAgx8j1AFRbi5mjRNIWZTbkUU=";
};
postPatch = ''
# Remove vendorized versioneer.py
rm versioneer.py
'';
dependencies = [
six
twisted
pyopenssl
] ++ twisted.optional-dependencies.tls;
passthru.optional-dependencies = {
i2p = [ txi2p-tahoe ];
tor = [ txtorcon ];
};
nativeCheckInputs = [
mock
pytestCheckHook
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
pythonImportsCheck = [ "foolscap" ];
meta = with lib; {
description = "RPC protocol for Python that follows the distributed object-capability model";
longDescription = ''
"Foolscap" is the name for the next-generation RPC protocol, intended to
replace Perspective Broker (part of Twisted). Foolscap is a protocol to
implement a distributed object-capabilities model in Python.
'';
homepage = "https://github.com/warner/foolscap";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}