Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-u2flib-server / default.nix
blob08a62d41363aafb404101386444783f1fd21bda1
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
6 # propagates
7 , cryptography
8 , six
10 # optional
11 , webob
13 # tests
14 , pytestCheckHook
17 buildPythonPackage rec {
18   pname = "python-u2flib-server";
19   version = "5.0.1";
20   format = "setuptools";
22   src = fetchFromGitHub {
23     owner = "Yubico";
24     repo = "python-u2flib-server";
25     rev = version;
26     hash = "sha256-ginP9u+aHcdaWpwcFYJWu0Ghf7+nDZq9i3TVAacIPhg=";
27   };
29   patches = [
30     ./cryptography-37-compat.patch
31   ];
33   propagatedBuildInputs = [
34     cryptography
35     six
36   ];
38   passthru.optional-dependencies = {
39     u2f_server = [
40       webob
41     ];
42   };
44   pythonImportsCheck = [
45     "u2flib_server"
46     "u2flib_server.u2f"
47   ];
49   nativeCheckInputs = [
50     pytestCheckHook
51   ] ++ passthru.optional-dependencies.u2f_server;
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   };