Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / eth-keys / default.nix
blobedf83f0657019f5a988d4ac41b5e0806ffef763a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , setuptools
5 , asn1tools
6 , coincurve
7 , eth-hash
8 , eth-typing
9 , eth-utils
10 , factory-boy
11 , hypothesis
12 , isPyPy
13 , pyasn1
14 , pytestCheckHook
15 , pythonOlder
18 buildPythonPackage rec {
19   pname = "eth-keys";
20   version = "0.5.0";
21   pyproject = true;
22   disabled = pythonOlder "3.8";
24   src = fetchFromGitHub {
25     owner = "ethereum";
26     repo = "eth-keys";
27     rev = "v${version}";
28     hash = "sha256-vyyaLCG2uIHXX0t93DmFq8/u0rZL+nsBsH2gfgjziyo=";
29   };
31   build-system = [ setuptools];
33   propagatedBuildInputs = [
34     eth-typing
35     eth-utils
36   ];
38   nativeCheckInputs = [
39     asn1tools
40     factory-boy
41     hypothesis
42     pyasn1
43     pytestCheckHook
44   ] ++ passthru.optional-dependencies.coincurve
45   ++ lib.optional (!isPyPy) eth-hash.optional-dependencies.pysha3
46   ++ lib.optional isPyPy eth-hash.optional-dependencies.pycryptodome;
48   disabledTests = [
49     # tests are broken
50     "test_compress_decompress_inversion"
51     "test_public_key_generation_is_equal"
52     "test_signing_is_equal"
53     "test_native_to_coincurve_recover"
54     "test_public_key_compression_is_equal"
55     "test_public_key_decompression_is_equal"
56     "test_signatures_with_high_s"
57     # timing sensitive
58     "test_encode_decode_pairings"
59   ];
61   pythonImportsCheck = [ "eth_keys" ];
63   passthru.optional-dependencies = {
64     coincurve = [ coincurve ];
65   };
67   meta = with lib; {
68     description = "Common API for Ethereum key operations";
69     homepage = "https://github.com/ethereum/eth-keys";
70     license = licenses.mit;
71     maintainers = with maintainers; [ ];
72   };