2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, cryptography
|
|
|
|
, mock
|
|
|
|
, pyfakefs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fido2";
|
2021-04-08 16:26:57 +00:00
|
|
|
version = "0.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "8680ee25238e2307596eb3900a0f8c0d9cc91189146ed8039544f1a3a69dfe6e";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six cryptography ];
|
|
|
|
|
|
|
|
checkInputs = [ mock pyfakefs ];
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
# Testing with `python setup.py test` doesn't work:
|
|
|
|
# https://github.com/Yubico/python-fido2/issues/108#issuecomment-763513576
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
python -m unittest discover -v
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
pythonImportsCheck = [ "fido2" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Provides library functionality for FIDO 2.0, including communication with a device over USB.";
|
|
|
|
homepage = "https://github.com/Yubico/python-fido2";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|