2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, eth-hash
|
|
|
|
, eth-typing
|
|
|
|
, eth-utils
|
|
|
|
, hypothesis
|
|
|
|
, parsimonious
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "eth-abi";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "3.0.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ethereum";
|
|
|
|
repo = "eth-abi";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-xrZpT/9zwDtjSwSPDDse+Aq8plPm26OR/cIrliZUpLY=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "parsimonious>=0.8.0,<0.9.0" "parsimonious"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
eth-typing
|
|
|
|
eth-utils
|
|
|
|
parsimonious
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# lots of: TypeError: isinstance() arg 2 must be a type or tuple of types
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ eth-hash.optional-dependencies.pycryptodome;
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# boolean list representation changed
|
|
|
|
"test_get_abi_strategy_returns_certain_strategies_for_known_type_strings"
|
|
|
|
# hypothesis.errors.Flaky
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_base_equals_has_expected_behavior_for_parsable_types"
|
2022-06-16 17:23:12 +00:00
|
|
|
"test_has_arrlist_has_expected_behavior_for_parsable_types"
|
|
|
|
"test_is_base_tuple_has_expected_behavior_for_parsable_types"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "eth_abi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Ethereum ABI utilities";
|
|
|
|
homepage = "https://github.com/ethereum/eth-abi";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|