2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, eth-hash
|
|
|
|
, eth-typing
|
|
|
|
, cytoolz
|
|
|
|
, hypothesis
|
|
|
|
, isPyPy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, toolz
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "eth-utils";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "2.0.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ethereum";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-E2vUROc2FcAv00k50YpdxaaYIRDk1yGSPB8cHHw+7Yw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
eth-hash
|
|
|
|
eth-typing
|
|
|
|
] ++ lib.optional (!isPyPy) cytoolz
|
|
|
|
++ lib.optional isPyPy toolz;
|
|
|
|
|
|
|
|
|
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
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
pythonImportsCheck = [ "eth_utils" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Common utility functions for codebases which interact with ethereum";
|
|
|
|
homepage = "https://github.com/ethereum/eth-utils";
|
|
|
|
license = lib.licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with lib.maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|