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