1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 fetchPypi,
6 mock,
7 poetry-core,
8 pyfakefs,
9 pythonOlder,
10 six,
11 unittestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "fido2";
16 version = "1.1.3";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-JhAPIm0SztYhymGYUozhft9nt430KHruEoX+481aqfw=";
24 };
25
26 nativeBuildInputs = [ poetry-core ];
27
28 propagatedBuildInputs = [
29 cryptography
30 six
31 ];
32
33 nativeCheckInputs = [
34 unittestCheckHook
35 mock
36 pyfakefs
37 ];
38
39 unittestFlagsArray = [ "-v" ];
40
41 pythonImportsCheck = [ "fido2" ];
42
43 meta = with lib; {
44 description = "Provides library functionality for FIDO 2.0, including communication with a device over USB";
45 homepage = "https://github.com/Yubico/python-fido2";
46 changelog = "https://github.com/Yubico/python-fido2/releases/tag/${version}";
47 license = licenses.bsd2;
48 maintainers = with maintainers; [ prusnak ];
49 };
50}