1{ lib, buildPythonPackage, fetchPypi, pythonOlder
2, attrs
3, sortedcontainers
4, async_generator
5, idna
6, outcome
7, contextvars
8, pytestCheckHook
9, pyopenssl
10, trustme
11, sniffio
12, stdenv
13, jedi
14, pylint
15, astor
16, yapf
17}:
18
19buildPythonPackage rec {
20 pname = "trio";
21 version = "0.19.0";
22 disabled = pythonOlder "3.6";
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "895e318e5ec5e8cea9f60b473b6edb95b215e82d99556a03eb2d20c5e027efe1";
27 };
28
29 checkInputs = [ astor pytestCheckHook pyopenssl trustme jedi pylint yapf ];
30 # It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
31 disabledTests = [
32 "getnameinfo"
33 "SocketType_resolve"
34 "getprotobyname"
35 "waitpid"
36 "static_tool_sees_all_symbols"
37 # tests pytest more than python
38 "fallback_when_no_hook_claims_it"
39 ];
40
41 propagatedBuildInputs = [
42 attrs
43 sortedcontainers
44 async_generator
45 idna
46 outcome
47 sniffio
48 ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
49
50 # tests are failing on Darwin
51 doCheck = !stdenv.isDarwin;
52
53 meta = {
54 description = "An async/await-native I/O library for humans and snake people";
55 homepage = "https://github.com/python-trio/trio";
56 license = with lib.licenses; [ mit asl20 ];
57 maintainers = with lib.maintainers; [ catern ];
58 };
59}