2019-12-02 04:48:26 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, cryptography
|
|
|
|
, mock
|
|
|
|
, pyfakefs
|
2019-01-10 17:03:55 +00:00
|
|
|
}:
|
2018-06-28 15:08:48 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fido2";
|
2021-04-07 12:21:57 +01:00
|
|
|
version = "0.9.1";
|
2018-06-28 15:08:48 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-07 12:21:57 +01:00
|
|
|
hash = "sha256-hoDuJSOOIwdZbrOQCg+MDZzJEYkUbtgDlUTxo6ad/m4=";
|
2018-06-28 15:08:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six cryptography ];
|
|
|
|
|
2019-01-10 17:03:55 +00:00
|
|
|
checkInputs = [ mock pyfakefs ];
|
|
|
|
|
2021-04-07 12:21:57 +01: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-16 22:09:51 +00:00
|
|
|
pythonImportsCheck = [ "fido2" ];
|
|
|
|
|
2018-06-28 15:08:48 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Provides library functionality for FIDO 2.0, including communication with a device over USB.";
|
2019-12-02 04:48:26 +00:00
|
|
|
homepage = "https://github.com/Yubico/python-fido2";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
2018-06-28 15:08:48 +01:00
|
|
|
};
|
|
|
|
}
|