1{ lib
2, buildPythonPackage
3, fetchPypi
4, mock
5, pyopenssl
6, pytestCheckHook
7, pythonOlder
8, service-identity
9, six
10, twisted
11, txi2p-tahoe
12, txtorcon
13}:
14
15buildPythonPackage rec {
16 pname = "foolscap";
17 version = "23.3.0";
18
19 disabled = pythonOlder "3.7";
20
21 format = "setuptools";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-Vu7oXC1brsgBwr2q59TAgx8j1AFRbi5mjRNIWZTbkUU=";
26 };
27
28 propagatedBuildInputs = [
29 six
30 twisted
31 pyopenssl
32 ] ++ twisted.optional-dependencies.tls;
33
34 passthru.optional-dependencies = {
35 i2p = [ txi2p-tahoe ];
36 tor = [ txtorcon ];
37 };
38
39 nativeCheckInputs = [
40 mock
41 pytestCheckHook
42 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
43
44 pythonImportsCheck = [ "foolscap" ];
45
46 meta = with lib; {
47 description = "RPC protocol for Python that follows the distributed object-capability model";
48 longDescription = ''
49 "Foolscap" is the name for the next-generation RPC protocol, intended to
50 replace Perspective Broker (part of Twisted). Foolscap is a protocol to
51 implement a distributed object-capabilities model in Python.
52 '';
53 homepage = "https://github.com/warner/foolscap";
54 license = licenses.mit;
55 maintainers = with maintainers; [ ];
56 };
57}