1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pytestCheckHook, 7 sphinx, 8 stdenv, 9 unstableGitUpdater, 10}: 11 12buildPythonPackage rec { 13 pname = "curio"; 14 version = "1.6-unstable-2024-04-11"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "dabeaz"; 19 repo = "curio"; 20 rev = "148454621f9bd8dd843f591e87715415431f6979"; 21 hash = "sha256-WLu7XF5wiVzBRQH1KRdAbhluTvGE7VvnRQUS0c3SUDk="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 nativeCheckInputs = [ 27 pytestCheckHook 28 sphinx 29 ]; 30 31 __darwinAllowLocalNetworking = true; 32 33 disabledTests = [ 34 "test_cpu" # timing sensitive 35 "test_aside_basic" # times out 36 "test_write_timeout" # flaky, does not always time out 37 "test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest 38 "test_ssl_outgoing" # touches network 39 "test_unix_echo" # socket bind error on hydra when built with other packages 40 "test_unix_ssl_server" # socket bind error on hydra when built with other packages 41 "test_task_group_thread" # stuck 42 ] 43 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 44 # connects to python.org:1, expects an OsError, hangs in the darwin sandbox 45 "test_create_bad_connection" 46 ]; 47 48 pythonImportsCheck = [ "curio" ]; 49 50 # curio does not package new releaseas any more 51 passthru.updateScript = unstableGitUpdater { }; 52 53 meta = with lib; { 54 description = "Library for performing concurrent I/O with coroutines in Python"; 55 homepage = "https://github.com/dabeaz/curio"; 56 changelog = "https://github.com/dabeaz/curio/raw/${version}/CHANGES"; 57 license = licenses.bsd3; 58 maintainers = [ maintainers.pbsds ]; 59 }; 60}