23 buildPythonPackage rec {
28 disabled = pythonOlder "3.8";
31 inherit pname version;
32 hash = "sha256-Akb0/Rvyv3AuBrDUXukWd+5cMSQvOaq06m/gxRrt0P0=";
40 env.LIBUV_CONFIGURE_HOST = stdenv.hostPlatform.config;
44 ] ++ lib.optionals stdenv.isDarwin [
57 # Tries to run "env", but fails to find it, even with coreutils provided
58 "--deselect=tests/test_process.py::Test_UV_Process::test_process_env_2"
59 "--deselect=tests/test_process.py::Test_AIO_Process::test_process_env_2"
60 # AssertionError: b'' != b'out\n'
61 "--deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect"
62 "--deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect"
63 ] ++ lib.optionals (stdenv.isDarwin) [
65 "--deselect=tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename"
66 # Broken: https://github.com/NixOS/nixpkgs/issues/160904
67 "--deselect=tests/test_context.py::Test_UV_Context::test_create_ssl_server_manual_connection_lost"
71 # ignore code linting tests
72 "tests/test_sourcecode.py"
76 # force using installed/compiled uvloop
78 '' + lib.optionalString stdenv.isDarwin ''
79 # Work around "OSError: AF_UNIX path too long"
80 # https://github.com/MagicStack/uvloop/issues/463
84 pythonImportsCheck = [
89 # Some of the tests use localhost networking.
90 __darwinAllowLocalNetworking = true;
93 changelog = "https://github.com/MagicStack/uvloop/releases/tag/v${version}";
94 description = "Fast implementation of asyncio event loop on top of libuv";
95 homepage = "https://github.com/MagicStack/uvloop";
96 license = licenses.mit;
97 maintainers = with maintainers; [ ];