Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / fido2 / default.nix
blob1e1af8e95916ea7377902990e2a911599c857048
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , six
5 , cryptography
6 , mock
7 , pyfakefs
8 }:
10 buildPythonPackage rec {
11   pname = "fido2";
12   version = "0.9.1";
14   src = fetchPypi {
15     inherit pname version;
16     hash = "sha256-hoDuJSOOIwdZbrOQCg+MDZzJEYkUbtgDlUTxo6ad/m4=";
17   };
19   propagatedBuildInputs = [ six cryptography ];
21   checkInputs = [ mock pyfakefs ];
23   # Testing with `python setup.py test` doesn't work:
24   # https://github.com/Yubico/python-fido2/issues/108#issuecomment-763513576
25   checkPhase = ''
26     runHook preCheck
28     python -m unittest discover -v
30     runHook postCheck
31   '';
33   pythonImportsCheck = [ "fido2" ];
35   meta = with lib; {
36     description = "Provides library functionality for FIDO 2.0, including communication with a device over USB.";
37     homepage = "https://github.com/Yubico/python-fido2";
38     license = licenses.bsd2;
39     maintainers = with maintainers; [ prusnak ];
40   };