Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 = "2.0.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-MGHNBec7Og72r8O4A9V8gmqi1qlzLRar1ydzYfWOeWQ="; 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 # Disable tests which require physical device 39 pytestFlagsArray = [ "--no-device" ]; 40 41 pythonImportsCheck = [ "fido2" ]; 42 43 meta = { 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 = lib.licenses.bsd2; 48 maintainers = with lib.maintainers; [ prusnak ]; 49 }; 50}