1{ lib 2, buildPythonPackage 3, fetchPypi 4, attrs 5, argon2-cffi 6, base58 7, cbor2 8, cffi 9, click 10, cryptography 11, ecdsa 12, eth-abi 13, eth-account 14, flatbuffers 15, jinja2 16, hkdf 17, hyperlink 18, mnemonic 19, mock 20, msgpack 21, passlib 22, py-ecc 23# , py-eth-sig-utils 24, py-multihash 25, py-ubjson 26, pynacl 27, pygobject3 28, pyopenssl 29, qrcode 30, pytest-asyncio 31, python-snappy 32, pytestCheckHook 33, pythonOlder 34 # , pytrie 35, rlp 36, service-identity 37, spake2 38, twisted 39, txaio 40, ujson 41 # , web3 42 # , wsaccel 43 # , xbr 44, yapf 45 # , zlmdb 46, zope_interface 47}@args: 48 49buildPythonPackage rec { 50 pname = "autobahn"; 51 version = "23.6.2"; 52 format = "setuptools"; 53 54 disabled = pythonOlder "3.9"; 55 56 src = fetchPypi { 57 inherit pname version; 58 hash = "sha256-7JQhxSohAzZNHvBGgDbmAZ7oT3FyHoazb+Ga1pZsEYE="; 59 }; 60 61 postPatch = '' 62 substituteInPlace setup.py \ 63 --replace "pytest>=2.8.6,<3.3.0" "pytest" 64 ''; 65 66 propagatedBuildInputs = [ 67 cryptography 68 hyperlink 69 pynacl 70 txaio 71 ]; 72 73 nativeCheckInputs = [ 74 mock 75 pytest-asyncio 76 pytestCheckHook 77 ] ++ passthru.optional-dependencies.scram 78 ++ passthru.optional-dependencies.serialization 79 ++ passthru.optional-dependencies.xbr; 80 81 preCheck = '' 82 # Run asyncio tests (requires twisted) 83 export USE_ASYNCIO=1 84 ''; 85 86 pytestFlagsArray = [ 87 "--pyargs autobahn" 88 ]; 89 90 pythonImportsCheck = [ 91 "autobahn" 92 ]; 93 94 passthru.optional-dependencies = rec { 95 all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr; 96 accelerate = [ /* wsaccel */ ]; 97 compress = [ python-snappy ]; 98 encryption = [ pynacl pyopenssl qrcode /* pytrie */ service-identity ]; 99 nvx = [ cffi ]; 100 scram = [ argon2-cffi cffi passlib ]; 101 serialization = [ cbor2 flatbuffers msgpack ujson py-ubjson ]; 102 twisted = [ attrs args.twisted zope_interface ]; 103 ui = [ pygobject3 ]; 104 xbr = [ base58 cbor2 click ecdsa eth-abi jinja2 hkdf mnemonic py-ecc /* py-eth-sig-utils */ py-multihash rlp spake2 twisted /* web3 xbr */ yapf /* zlmdb */ ]; 105 }; 106 107 meta = with lib; { 108 description = "WebSocket and WAMP in Python for Twisted and asyncio"; 109 homepage = "https://crossbar.io/autobahn"; 110 license = licenses.mit; 111 maintainers = with maintainers; [ ]; 112 }; 113}