at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 isPyPy, 7 # dependencies 8 eth-hash, 9 eth-typing, 10 cytoolz, 11 toolz, 12 pydantic, 13 # nativeCheckInputs 14 hypothesis, 15 mypy, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "eth-utils"; 21 version = "5.3.1"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "ethereum"; 26 repo = "eth-utils"; 27 tag = "v${version}"; 28 hash = "sha256-uyUsX9jX2KumrERrIc6nXloH0G+rQeKzFMwex+Mh3eM="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 propagatedBuildInputs = [ 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 pydantic 45 ] 46 ++ eth-hash.optional-dependencies.pycryptodome; 47 48 pythonImportsCheck = [ "eth_utils" ]; 49 50 disabledTests = [ "test_install_local_wheel" ]; 51 52 meta = with lib; { 53 changelog = "https://github.com/ethereum/eth-utils/blob/${src.rev}/docs/release_notes.rst"; 54 description = "Common utility functions for codebases which interact with ethereum"; 55 homepage = "https://github.com/ethereum/eth-utils"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ siraben ]; 58 }; 59}