at 24.11-pre 2.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cbor-diag, 5 cbor2, 6 cryptography, 7 dtlssocket, 8 fetchFromGitHub, 9 filelock, 10 ge25519, 11 pygments, 12 pytestCheckHook, 13 pythonAtLeast, 14 pythonOlder, 15 setuptools, 16 termcolor, 17 websockets, 18}: 19 20buildPythonPackage rec { 21 pname = "aiocoap"; 22 version = "0.4.8"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "chrysn"; 29 repo = "aiocoap"; 30 rev = "refs/tags/${version}"; 31 hash = "sha256-jBRxorHr5/CgAR6WVXBUycZpJ6n1DYVFQk6kqVv8D1Q="; 32 }; 33 34 build-system = [ setuptools ]; 35 36 passthru.optional-dependencies = { 37 oscore = [ 38 cbor2 39 cryptography 40 filelock 41 ge25519 42 ]; 43 tinydtls = [ dtlssocket ]; 44 ws = [ websockets ]; 45 prettyprint = [ 46 termcolor 47 cbor2 48 pygments 49 cbor-diag 50 ]; 51 }; 52 53 nativeCheckInputs = [ pytestCheckHook ]; 54 55 disabledTestPaths = [ 56 # Don't test the plugins 57 "tests/test_tls.py" 58 "tests/test_reverseproxy.py" 59 "tests/test_oscore_plugtest.py" 60 ]; 61 62 disabledTests = 63 [ 64 # Communication is not properly mocked 65 "test_uri_parser" 66 ] 67 ++ lib.optionals (pythonAtLeast "3.12") [ 68 # https://github.com/chrysn/aiocoap/issues/339 69 "TestServerTCP::test_big_resource" 70 "TestServerTCP::test_empty_accept" 71 "TestServerTCP::test_error_resources" 72 "TestServerTCP::test_fast_resource" 73 "TestServerTCP::test_js_accept" 74 "TestServerTCP::test_manualbig_resource" 75 "TestServerTCP::test_nonexisting_resource" 76 "TestServerTCP::test_replacing_resource" 77 "TestServerTCP::test_root_resource" 78 "TestServerTCP::test_slow_resource" 79 "TestServerTCP::test_slowbig_resource" 80 "TestServerTCP::test_spurious_resource" 81 "TestServerTCP::test_unacceptable_accept" 82 ]; 83 84 pythonImportsCheck = [ "aiocoap" ]; 85 86 meta = with lib; { 87 description = "Python CoAP library"; 88 homepage = "https://aiocoap.readthedocs.io/"; 89 changelog = "https://github.com/chrysn/aiocoap/blob/${version}/NEWS"; 90 license = with licenses; [ mit ]; 91 maintainers = with maintainers; [ fab ]; 92 }; 93}