2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
eth-hash,
|
|
|
|
eth-typing,
|
|
|
|
cytoolz,
|
|
|
|
hypothesis,
|
|
|
|
isPyPy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
toolz,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "eth-utils";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "4.0.0";
|
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ethereum";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "eth-utils";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-k2pHM1eKPzoGxZlU6yT7bZMv4CCWGaZaSnFHSbT76Zo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
eth-hash
|
|
|
|
eth-typing
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optional (!isPyPy) cytoolz ++ lib.optional isPyPy toolz;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ eth-hash.optional-dependencies.pycryptodome;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# Removing a poorly written test case from test suite.
|
|
|
|
# TODO work with the upstream
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = [ "tests/functional-utils/test_type_inference.py" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "eth_utils" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/ethereum/eth-utils/blob/${src.rev}/docs/release_notes.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Common utility functions for codebases which interact with ethereum";
|
|
|
|
homepage = "https://github.com/ethereum/eth-utils";
|
|
|
|
license = lib.licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|