1{ lib, fetchFromGitHub, buildPythonPackage, pytestCheckHook, eth-hash, eth-typing,
2 cytoolz, hypothesis }:
3
4buildPythonPackage rec {
5 pname = "eth-utils";
6 version = "1.10.0";
7
8 # Tests are missing from the PyPI source tarball so let's use GitHub
9 # https://github.com/ethereum/eth-utils/issues/130
10 src = fetchFromGitHub {
11 owner = "ethereum";
12 repo = pname;
13 rev = "v${version}";
14 sha256 = "sha256-sq3H4HmUFUipqVYleZxWLG1gBsQEoNwcZAXiKckacek=";
15 };
16
17 checkInputs = [ pytestCheckHook hypothesis ];
18 propagatedBuildInputs = [ eth-hash eth-typing cytoolz ];
19
20 pythonImportsCheck = [ "eth_utils" ];
21
22 meta = {
23 description = "Common utility functions for codebases which interact with ethereum";
24 homepage = "https://github.com/ethereum/eth-utils";
25 license = lib.licenses.mit;
26 maintainers = with lib.maintainers; [ jluttine ];
27 };
28}