1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 bitarray, 11 ckzg, 12 eth-abi, 13 eth-keyfile, 14 eth-keys, 15 eth-rlp, 16 eth-utils, 17 hexbytes, 18 rlp, 19 websockets, 20 21 # tests 22 hypothesis, 23 pydantic, 24 pytestCheckHook, 25 pytest-xdist, 26}: 27 28buildPythonPackage rec { 29 pname = "eth-account"; 30 version = "0.13.7"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "ethereum"; 35 repo = "eth-account"; 36 tag = "v${version}"; 37 hash = "sha256-Ipz2zIKCpIzKBtX0UZnvpKZeTUcDPbGTzMgmcJC/4qs="; 38 }; 39 40 build-system = [ setuptools ]; 41 42 dependencies = [ 43 bitarray 44 ckzg 45 eth-abi 46 eth-keyfile 47 eth-keys 48 eth-rlp 49 eth-utils 50 hexbytes 51 pydantic 52 rlp 53 websockets 54 ]; 55 56 nativeCheckInputs = [ 57 hypothesis 58 pydantic 59 pytestCheckHook 60 pytest-xdist 61 ]; 62 63 disabledTests = [ 64 # requires local nodejs install 65 "test_messages_where_all_3_sigs_match" 66 "test_messages_where_eth_account_matches_ethers_but_not_metamask" 67 "test_messages_where_eth_account_matches_metamask_but_not_ethers" 68 69 # disable flaky fuzzing test 70 "test_compatibility" 71 72 # Attempts at installing the wheel 73 "test_install_local_wheel" 74 ]; 75 76 pythonImportsCheck = [ "eth_account" ]; 77 78 pythonRelaxDeps = [ "eth-keyfile" ]; 79 80 meta = { 81 description = "Account abstraction library for web3.py"; 82 homepage = "https://github.com/ethereum/eth-account"; 83 changelog = "https://github.com/ethereum/eth-account/blob/v${version}/docs/release_notes.rst"; 84 license = lib.licenses.mit; 85 maintainers = with lib.maintainers; [ hellwolf ]; 86 }; 87}