2020-11-12 23:50:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, gmp
|
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, pythonOlder
|
2020-11-12 23:50:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastecdsa";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "2.3.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-11-12 23:50:31 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-11-12 23:50:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-8ZjORPaUbKuwKYip9J0U78QQ26XiEemDIbqdhzeyP/g=";
|
2020-11-12 23:50:31 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = [
|
|
|
|
gmp
|
|
|
|
];
|
2020-11-12 23:50:31 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-11-12 23:50:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# skip tests which require being online to download test vectors
|
|
|
|
"fastecdsa/tests/test_wycheproof_vectors.py"
|
|
|
|
"fastecdsa/tests/test_rfc6979_ecdsa.py"
|
2020-11-12 23:50:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# skip tests for now, they fail with
|
|
|
|
# ImportError: cannot import name '_ecdsa' from 'fastecdsa'
|
|
|
|
# but the installed package works just fine
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastecdsa"
|
|
|
|
];
|
2020-11-12 23:50:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast elliptic curve digital signatures";
|
|
|
|
homepage = "https://github.com/AntonKueltz/fastecdsa";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/AntonKueltz/fastecdsa/blob/v${version}/CHANGELOG.md";
|
2020-11-12 23:50:31 +00:00
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|