1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5 6# propagates 7, cryptography 8, six 9 10# optional 11, webob 12 13# tests 14, pytestCheckHook 15}: 16 17buildPythonPackage rec { 18 pname = "python-u2flib-server"; 19 version = "5.0.1"; 20 format = "setuptools"; 21 22 src = fetchFromGitHub { 23 owner = "Yubico"; 24 repo = "python-u2flib-server"; 25 rev = version; 26 hash = "sha256-ginP9u+aHcdaWpwcFYJWu0Ghf7+nDZq9i3TVAacIPhg="; 27 }; 28 29 patches = [ 30 ./cryptography-37-compat.patch 31 ]; 32 33 propagatedBuildInputs = [ 34 cryptography 35 six 36 ]; 37 38 passthru.optional-dependencies = { 39 u2f_server = [ 40 webob 41 ]; 42 }; 43 44 pythonImportsCheck = [ 45 "u2flib_server" 46 "u2flib_server.u2f" 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 ] ++ passthru.optional-dependencies.u2f_server; 52 53 meta = with lib; { 54 description = "Python based U2F server library"; 55 homepage = "https://github.com/Yubico/python-u2flib-server"; 56 changelog = "https://github.com/Yubico/python-u2flib-server/blob/${src.rev}/NEWS"; 57 license = licenses.bsd2; 58 maintainers = with maintainers; [ hexa ]; 59 }; 60}