Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, mock
6, pyopenssl
7, pytestCheckHook
8, service-identity
9, twisted
10}:
11
12buildPythonPackage rec {
13 pname = "foolscap";
14 version = "21.7.0";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "sha256-6dGFU4YNk1joXXZi2c2L84JtUbTs1ICgXfv0/EU2P4Q=";
19 };
20
21 patches = [
22 (fetchpatch {
23 name = "fix-tests-with-twisted-22.10.0.patch";
24 url = "https://github.com/warner/foolscap/commit/c04202eb5d4cf052e650ec2985ea6037605fd79e.patch";
25 hash = "sha256-RldDc18n3WYHdYg0ZmM8PBffIuiGa1NIfdoHs3mEEfc=";
26 })
27 ];
28
29 propagatedBuildInputs = [
30 mock
31 twisted
32 pyopenssl
33 service-identity
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 disabledTestPaths = [
41 # Not all dependencies are present
42 "src/foolscap/test/test_connection.py"
43 ];
44
45 pythonImportsCheck = [ "foolscap" ];
46
47 meta = with lib; {
48 description = "RPC protocol for Python that follows the distributed object-capability model";
49 longDescription = ''
50 "Foolscap" is the name for the next-generation RPC protocol, intended to
51 replace Perspective Broker (part of Twisted). Foolscap is a protocol to
52 implement a distributed object-capabilities model in Python.
53 '';
54 homepage = "https://github.com/warner/foolscap";
55 license = licenses.mit;
56 maintainers = with maintainers; [ ];
57 };
58}