summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/foolscap/default.nix
blob: 83e6ae9e8dd380fe3bc32240484120c0e6721be8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  buildPythonPackage,
  fetchPypi,
  lib,
  mock,
  pyopenssl,
  pytestCheckHook,
  setuptools,
  six,
  twisted,
  txi2p-tahoe,
  txtorcon,
  versioneer,
}:

buildPythonPackage rec {
  pname = "foolscap";
  version = "24.9.0";

  pyproject = true;
  build-system = [
    setuptools
    versioneer
  ];

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-vWsAdUDbWQuG3e0oAtLq8rA4Ys2wg38fD/h+E1ViQQg=";
  };

  postPatch = ''
    # Remove vendorized versioneer.py
    rm versioneer.py
  '';

  dependencies = [
    six
    twisted
    pyopenssl
  ]
  ++ twisted.optional-dependencies.tls;

  optional-dependencies = {
    i2p = [ txi2p-tahoe ];
    tor = [ txtorcon ];
  };

  nativeCheckInputs = [
    mock
    pytestCheckHook
  ]
  ++ lib.concatAttrValues optional-dependencies;

  pythonImportsCheck = [ "foolscap" ];

  meta = {
    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 = lib.licenses.mit;
    maintainers = [ ];
  };
}