python312Packages.fido2: refactor

- migrate to pytestCheckHook
- clean-up inputs
- update disabled
- add optional-dependencies
This commit is contained in:
Fabian Affolter 2024-05-21 21:07:55 +02:00
parent 8d3b5db8f5
commit 48c51e6061

View File

@ -3,38 +3,33 @@
buildPythonPackage,
cryptography,
fetchPypi,
mock,
poetry-core,
pyfakefs,
pyscard,
pythonOlder,
six,
unittestCheckHook,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fido2";
version = "1.1.3";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-JhAPIm0SztYhymGYUozhft9nt430KHruEoX+481aqfw=";
};
nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];
propagatedBuildInputs = [
cryptography
six
];
dependencies = [ cryptography ];
nativeCheckInputs = [
unittestCheckHook
mock
pyfakefs
];
passthru.optional-dependencies = {
pcsc = [ pyscard ];
};
nativeCheckInputs = [ pytestCheckHook ];
unittestFlagsArray = [ "-v" ];