1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 isPyPy, 7 # dependencies 8 eth-hash, 9 eth-typing, 10 cytoolz, 11 toolz, 12 # nativeCheckInputs 13 hypothesis, 14 mypy, 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "eth-utils"; 20 version = "5.1.0"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "ethereum"; 25 repo = "eth-utils"; 26 tag = "v${version}"; 27 hash = "sha256-uPzg1gUEsulQL2u22R/REHWx1ZtbMxvcXf6UgWqkDF4="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 propagatedBuildInputs = 33 [ 34 eth-hash 35 eth-typing 36 ] 37 ++ lib.optional (!isPyPy) cytoolz 38 ++ lib.optional isPyPy toolz; 39 40 nativeCheckInputs = [ 41 hypothesis 42 mypy 43 pytestCheckHook 44 ] ++ eth-hash.optional-dependencies.pycryptodome; 45 46 pythonImportsCheck = [ "eth_utils" ]; 47 48 disabledTests = [ "test_install_local_wheel" ]; 49 50 meta = with lib; { 51 changelog = "https://github.com/ethereum/eth-utils/blob/${src.rev}/docs/release_notes.rst"; 52 description = "Common utility functions for codebases which interact with ethereum"; 53 homepage = "https://github.com/ethereum/eth-utils"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ siraben ]; 56 }; 57}