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