2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
asn1tools,
|
|
|
|
coincurve,
|
|
|
|
eth-hash,
|
|
|
|
eth-typing,
|
|
|
|
eth-utils,
|
|
|
|
factory-boy,
|
|
|
|
hypothesis,
|
|
|
|
isPyPy,
|
|
|
|
pyasn1,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "eth-keys";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.0";
|
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ethereum";
|
|
|
|
repo = "eth-keys";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-vyyaLCG2uIHXX0t93DmFq8/u0rZL+nsBsH2gfgjziyo=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
eth-typing
|
|
|
|
eth-utils
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
asn1tools
|
|
|
|
factory-boy
|
|
|
|
hypothesis
|
|
|
|
pyasn1
|
|
|
|
pytestCheckHook
|
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.coincurve
|
|
|
|
++ lib.optional (!isPyPy) eth-hash.optional-dependencies.pysha3
|
|
|
|
++ lib.optional isPyPy eth-hash.optional-dependencies.pycryptodome;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTests = [
|
|
|
|
# tests are broken
|
|
|
|
"test_compress_decompress_inversion"
|
|
|
|
"test_public_key_generation_is_equal"
|
|
|
|
"test_signing_is_equal"
|
|
|
|
"test_native_to_coincurve_recover"
|
|
|
|
"test_public_key_compression_is_equal"
|
|
|
|
"test_public_key_decompression_is_equal"
|
2022-10-21 18:38:19 +00:00
|
|
|
"test_signatures_with_high_s"
|
2022-12-17 10:02:37 +00:00
|
|
|
# timing sensitive
|
|
|
|
"test_encode_decode_pairings"
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [ "eth_keys" ];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
coincurve = [ coincurve ];
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Common API for Ethereum key operations";
|
|
|
|
homepage = "https://github.com/ethereum/eth-keys";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|