1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, bitarray
5, eth-abi
6, eth-keyfile
7, eth-keys
8, eth-rlp
9, eth-utils
10, hexbytes
11, pythonOlder
12, rlp
13}:
14
15buildPythonPackage rec {
16 pname = "eth-account";
17 version = "0.6.1";
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "ethereum";
22 repo = "eth-account";
23 rev = "v${version}";
24 hash = "sha256-cjQvTKC4lDbKnAvbmnTGHQiJZsZFhXc/+UH5rUdlGxs=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace "bitarray>=1.2.1,<1.3.0" "bitarray>=2.4.0,<3"
30 '';
31
32 propagatedBuildInputs = [
33 bitarray
34 eth-abi
35 eth-keyfile
36 eth-keys
37 eth-rlp
38 eth-utils
39 hexbytes
40 rlp
41 ];
42
43 # require buildinga npm project
44 doCheck = false;
45
46 pythonImportsCheck = [ "eth_account" ];
47
48 meta = with lib; {
49 description = "Account abstraction library for web3.py";
50 homepage = "https://github.com/ethereum/eth-account";
51 license = licenses.mit;
52 maintainers = with maintainers; [ SuperSandro2000 ];
53 };
54}