1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 asn1crypto,
7 cbor2,
8 cryptography,
9 pythonOlder,
10 pyopenssl,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "webauthn";
16 version = "2.2.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "duo-labs";
23 repo = "py_webauthn";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-NBCR5GwmXA6COP9NOYnoD3l1vuOpym/kyNawd8FstLc=";
26 };
27
28 build-system = [ setuptools ];
29
30 propagatedBuildInputs = [
31 asn1crypto
32 cbor2
33 cryptography
34 pyopenssl
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "webauthn" ];
40
41 disabledTests = [
42 # TypeError: X509StoreContextError.__init__() missing 1 required...
43 #"test_throws_on_bad_root_cert"
44 ];
45
46 meta = with lib; {
47 description = "Implementation of the WebAuthn API";
48 homepage = "https://github.com/duo-labs/py_webauthn";
49 changelog = "https://github.com/duo-labs/py_webauthn/blob/v${version}/CHANGELOG.md";
50 license = licenses.bsd3;
51 maintainers = [ ];
52 };
53}