1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, asn1tools 5, coincurve 6, eth-hash 7, eth-typing 8, eth-utils 9, factory_boy 10, hypothesis 11, isPyPy 12, pyasn1 13, pytestCheckHook 14, pythonOlder 15}: 16 17buildPythonPackage rec { 18 pname = "eth-keys"; 19 version = "0.4.0"; 20 disabled = pythonOlder "3.6"; 21 22 src = fetchFromGitHub { 23 owner = "ethereum"; 24 repo = "eth-keys"; 25 rev = "v${version}"; 26 sha256 = "sha256-jG/jJPM4t3z6UQIdc8L6y0DxZiGx5pVuGL8XwbIt60o="; 27 }; 28 29 propagatedBuildInputs = [ 30 eth-typing 31 eth-utils 32 ]; 33 34 checkInputs = [ 35 asn1tools 36 factory_boy 37 hypothesis 38 pyasn1 39 pytestCheckHook 40 ] ++ passthru.optional-dependencies.coincurve 41 ++ lib.optional (!isPyPy) eth-hash.optional-dependencies.pysha3 42 ++ lib.optional isPyPy eth-hash.optional-dependencies.pycryptodome; 43 44 disabledTests = [ 45 # tests are broken 46 "test_compress_decompress_inversion" 47 "test_public_key_generation_is_equal" 48 "test_signing_is_equal" 49 "test_native_to_coincurve_recover" 50 "test_public_key_compression_is_equal" 51 "test_public_key_decompression_is_equal" 52 "test_signatures_with_high_s" 53 ]; 54 55 pythonImportsCheck = [ "eth_keys" ]; 56 57 passthru.optional-dependencies = { 58 coincurve = [ coincurve ]; 59 }; 60 61 meta = with lib; { 62 description = "Common API for Ethereum key operations"; 63 homepage = "https://github.com/ethereum/eth-keys"; 64 license = licenses.mit; 65 maintainers = with maintainers; [ SuperSandro2000 ]; 66 }; 67}