2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-05-18 14:49:53 +00:00
|
|
|
, fetchPypi
|
|
|
|
, attrs
|
|
|
|
, argon2-cffi
|
|
|
|
, base58
|
2021-05-20 23:08:51 +00:00
|
|
|
, cbor2
|
|
|
|
, cffi
|
2022-05-18 14:49:53 +00:00
|
|
|
, click
|
2021-05-20 23:08:51 +00:00
|
|
|
, cryptography
|
2022-05-18 14:49:53 +00:00
|
|
|
, ecdsa
|
2022-06-16 17:23:12 +00:00
|
|
|
, eth-abi
|
|
|
|
, eth-account
|
2021-05-20 23:08:51 +00:00
|
|
|
, flatbuffers
|
2022-05-18 14:49:53 +00:00
|
|
|
, jinja2
|
|
|
|
, hkdf
|
|
|
|
, hyperlink
|
|
|
|
, mnemonic
|
2021-05-20 23:08:51 +00:00
|
|
|
, mock
|
|
|
|
, msgpack
|
|
|
|
, passlib
|
2022-06-16 17:23:12 +00:00
|
|
|
, py-ecc
|
2023-07-15 17:15:38 +00:00
|
|
|
# , py-eth-sig-utils
|
2022-05-18 14:49:53 +00:00
|
|
|
, py-multihash
|
|
|
|
, py-ubjson
|
2021-05-20 23:08:51 +00:00
|
|
|
, pynacl
|
2022-05-18 14:49:53 +00:00
|
|
|
, pygobject3
|
|
|
|
, pyopenssl
|
2022-06-16 17:23:12 +00:00
|
|
|
, qrcode
|
2024-02-29 20:09:43 +00:00
|
|
|
, pytest-asyncio_0_21
|
2022-05-18 14:49:53 +00:00
|
|
|
, python-snappy
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-05-18 14:49:53 +00:00
|
|
|
# , pytrie
|
|
|
|
, rlp
|
|
|
|
, service-identity
|
2024-05-15 15:35:15 +00:00
|
|
|
, setuptools
|
2022-05-18 14:49:53 +00:00
|
|
|
, spake2
|
2021-05-20 23:08:51 +00:00
|
|
|
, twisted
|
|
|
|
, txaio
|
|
|
|
, ujson
|
2022-05-18 14:49:53 +00:00
|
|
|
# , web3
|
|
|
|
# , wsaccel
|
|
|
|
# , xbr
|
|
|
|
, yapf
|
|
|
|
# , zlmdb
|
2024-01-13 08:15:51 +00:00
|
|
|
, zope-interface
|
2022-05-18 14:49:53 +00:00
|
|
|
}@args:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "autobahn";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "23.6.2";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-7JQhxSohAzZNHvBGgDbmAZ7oT3FyHoazb+Ga1pZsEYE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "pytest>=2.8.6,<3.3.0" "pytest"
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-05-20 23:08:51 +00:00
|
|
|
cryptography
|
2022-05-18 14:49:53 +00:00
|
|
|
hyperlink
|
2021-05-20 23:08:51 +00:00
|
|
|
pynacl
|
|
|
|
txaio
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
mock
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio_0_21
|
2021-05-20 23:08:51 +00:00
|
|
|
pytestCheckHook
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ optional-dependencies.scram
|
|
|
|
++ optional-dependencies.serialization
|
|
|
|
++ optional-dependencies.xbr;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
preCheck = ''
|
|
|
|
# Run asyncio tests (requires twisted)
|
|
|
|
export USE_ASYNCIO=1
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--pyargs autobahn"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"autobahn"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
optional-dependencies = rec {
|
2022-05-18 14:49:53 +00:00
|
|
|
all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr;
|
|
|
|
accelerate = [ /* wsaccel */ ];
|
|
|
|
compress = [ python-snappy ];
|
2022-06-16 17:23:12 +00:00
|
|
|
encryption = [ pynacl pyopenssl qrcode /* pytrie */ service-identity ];
|
2022-05-18 14:49:53 +00:00
|
|
|
nvx = [ cffi ];
|
|
|
|
scram = [ argon2-cffi cffi passlib ];
|
|
|
|
serialization = [ cbor2 flatbuffers msgpack ujson py-ubjson ];
|
2024-01-13 08:15:51 +00:00
|
|
|
twisted = [ attrs args.twisted zope-interface ];
|
2022-05-18 14:49:53 +00:00
|
|
|
ui = [ pygobject3 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
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 */ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "WebSocket and WAMP in Python for Twisted and asyncio";
|
|
|
|
homepage = "https://crossbar.io/autobahn";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|