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.5";
31 pyproject = true;
32
33 src = fetchFromGitHub {
34 owner = "ethereum";
35 repo = "eth-account";
36 tag = "v${version}";
37 hash = "sha256-CBD0vJLYA+3FreOTsVXJlDJhRvPbDUn4X55o6EF+uBA=";
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 rlp
52 websockets
53 ];
54
55 nativeCheckInputs = [
56 hypothesis
57 pydantic
58 pytestCheckHook
59 pytest-xdist
60 ];
61
62 disabledTests = [
63 # requires local nodejs install
64 "test_messages_where_all_3_sigs_match"
65 "test_messages_where_eth_account_matches_ethers_but_not_metamask"
66 "test_messages_where_eth_account_matches_metamask_but_not_ethers"
67
68 # disable flaky fuzzing test
69 "test_compatibility"
70
71 # Attempts at installing the wheel
72 "test_install_local_wheel"
73 ];
74
75 pythonImportsCheck = [ "eth_account" ];
76
77 meta = {
78 description = "Account abstraction library for web3.py";
79 homepage = "https://github.com/ethereum/eth-account";
80 changelog = "https://github.com/ethereum/eth-account/blob/v${version}/docs/release_notes.rst";
81 license = lib.licenses.mit;
82 maintainers = with lib.maintainers; [ hellwolf ];
83 };
84}