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.1.3";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-JhAPIm0SztYhymGYUozhft9nt430KHruEoX+481aqfw=";
22 };
23
24 build-system = [ poetry-core ];
25
26 dependencies = [ cryptography ];
27
28 passthru.optional-dependencies = {
29 pcsc = [ pyscard ];
30 };
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 unittestFlagsArray = [ "-v" ];
35
36 pythonImportsCheck = [ "fido2" ];
37
38 meta = with lib; {
39 description = "Provides library functionality for FIDO 2.0, including communication with a device over USB";
40 homepage = "https://github.com/Yubico/python-fido2";
41 changelog = "https://github.com/Yubico/python-fido2/releases/tag/${version}";
42 license = licenses.bsd2;
43 maintainers = with maintainers; [ prusnak ];
44 };
45}