1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 # dependencies
7 eth-typing,
8 eth-utils,
9 parsimonious,
10 # nativeCheckInputs
11 hypothesis,
12 pytestCheckHook,
13 pytest-xdist,
14 eth-hash,
15}:
16
17buildPythonPackage rec {
18 pname = "eth-abi";
19 version = "5.1.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "ethereum";
24 repo = "eth-abi";
25 tag = "v${version}";
26 hash = "sha256-D3aGMx2oZFttwQ90ouwQbbRelCb2bvyQgvamKweX9Nw=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 eth-typing
33 eth-utils
34 parsimonious
35 ];
36
37 nativeCheckInputs = [
38 hypothesis
39 pytestCheckHook
40 pytest-xdist
41 ] ++ eth-hash.optional-dependencies.pycryptodome;
42
43 disabledTests = [
44 # boolean list representation changed
45 "test_get_abi_strategy_returns_certain_strategies_for_known_type_strings"
46 ];
47
48 pythonImportsCheck = [ "eth_abi" ];
49
50 meta = {
51 description = "Ethereum ABI utilities";
52 homepage = "https://github.com/ethereum/eth-abi";
53 changelog = "https://github.com/ethereum/eth-abi/blob/v${version}/docs/release_notes.rst";
54 license = lib.licenses.mit;
55 maintainers = with lib.maintainers; [ hellwolf ];
56 };
57}