1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, eth-hash 5, eth-typing 6, cytoolz 7, hypothesis 8, isPyPy 9, pytestCheckHook 10, pythonOlder 11, toolz 12}: 13 14buildPythonPackage rec { 15 pname = "eth-utils"; 16 version = "2.1.1"; 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = "ethereum"; 21 repo = pname; 22 rev = "v${version}"; 23 hash = "sha256-Ogp4o99smw5qVwDec6zd/xVqqKMyNk41iBfRNzrwuvE="; 24 }; 25 26 propagatedBuildInputs = [ 27 eth-hash 28 eth-typing 29 ] ++ lib.optional (!isPyPy) cytoolz 30 ++ lib.optional isPyPy toolz; 31 32 nativeCheckInputs = [ 33 hypothesis 34 pytestCheckHook 35 ] ++ eth-hash.optional-dependencies.pycryptodome; 36 37 # Removing a poorly written test case from test suite. 38 # TODO work with the upstream 39 disabledTestPaths = [ 40 "tests/functional-utils/test_type_inference.py" 41 ]; 42 43 pythonImportsCheck = [ "eth_utils" ]; 44 45 meta = { 46 description = "Common utility functions for codebases which interact with ethereum"; 47 homepage = "https://github.com/ethereum/eth-utils"; 48 license = lib.licenses.mit; 49 maintainers = with lib.maintainers; [ ]; 50 }; 51}