1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 fetchPypi,
6 poetry-core,
7 pyscard,
8 pythonOlder,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "fido2";
14 version = "1.2.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-45+VkgEi1kKD/aXlWB2VogbnBPpChGv6RmL4aqDTMzs=";
22 };
23
24 build-system = [ poetry-core ];
25
26 pythonRelaxDeps = [ "cryptography" ];
27
28 dependencies = [ cryptography ];
29
30 optional-dependencies = {
31 pcsc = [ pyscard ];
32 };
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 unittestFlagsArray = [ "-v" ];
37
38 pythonImportsCheck = [ "fido2" ];
39
40 meta = with lib; {
41 description = "Provides library functionality for FIDO 2.0, including communication with a device over USB";
42 homepage = "https://github.com/Yubico/python-fido2";
43 changelog = "https://github.com/Yubico/python-fido2/releases/tag/${version}";
44 license = licenses.bsd2;
45 maintainers = with maintainers; [ prusnak ];
46 };
47}