1{ lib
2, buildPythonPackage
3, fetchPypi
4, gmp
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "fastecdsa";
11 version = "2.3.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-8ZjORPaUbKuwKYip9J0U78QQ26XiEemDIbqdhzeyP/g=";
19 };
20
21 buildInputs = [
22 gmp
23 ];
24
25 nativeCheckInputs = [
26 pytestCheckHook
27 ];
28
29 disabledTestPaths = [
30 # skip tests which require being online to download test vectors
31 "fastecdsa/tests/test_wycheproof_vectors.py"
32 "fastecdsa/tests/test_rfc6979_ecdsa.py"
33 ];
34
35 # skip tests for now, they fail with
36 # ImportError: cannot import name '_ecdsa' from 'fastecdsa'
37 # but the installed package works just fine
38 doCheck = false;
39
40 pythonImportsCheck = [
41 "fastecdsa"
42 ];
43
44 meta = with lib; {
45 description = "Fast elliptic curve digital signatures";
46 homepage = "https://github.com/AntonKueltz/fastecdsa";
47 changelog = "https://github.com/AntonKueltz/fastecdsa/blob/v${version}/CHANGELOG.md";
48 license = licenses.unlicense;
49 maintainers = with maintainers; [ prusnak ];
50 };
51}