biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / ctap-keyring-device / default.nix
blob07cf1b616027fcf3b1c9d2d5325956f6f951916d
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   setuptools-scm,
6   # install requirements
7   fido2,
8   keyring,
9   cryptography,
10   # test requirements
11   pytestCheckHook,
14 let
15   fido2_0 = fido2.overridePythonAttrs (oldAttrs: rec {
16     version = "0.9.3";
17     format = "setuptools";
18     src = fetchPypi {
19       inherit (oldAttrs) pname;
20       inherit version;
21       hash = "sha256-tF6JphCc/Lfxu1E3dqotZAjpXEgi+DolORi5RAg0Zuw=";
22     };
23   });
25 buildPythonPackage rec {
26   pname = "ctap-keyring-device";
27   version = "1.0.6";
28   format = "setuptools";
30   src = fetchPypi {
31     inherit version pname;
32     hash = "sha256-pEJkuz0wxKt2PkowmLE2YC+HPYa2ZiENK7FAW14Ec/Y=";
33   };
35   # removing optional dependency needing pyobjc
36   postPatch = ''
37     substituteInPlace pytest.ini \
38       --replace "--flake8 --black --cov" ""
39   '';
41   nativeBuildInputs = [
42     setuptools-scm
43   ];
45   pythonRemoveDeps = [
46     # This is a darwin requirement missing pyobjc
47     "pyobjc-framework-LocalAuthentication"
48   ];
50   propagatedBuildInputs = [
51     keyring
52     fido2_0
53     cryptography
54   ];
56   pythonImportsCheck = [ "ctap_keyring_device" ];
58   checkInputs = [ pytestCheckHook ];
60   disabledTests = [
61     # Disabled tests that needs pyobjc or windows
62     "touch_id_ctap_user_verifier"
63     "windows_hello_ctap_user_verifier"
64   ];
66   meta = with lib; {
67     description = "CTAP (client-to-authenticator-protocol) device backed by python's keyring library";
68     homepage = "https://github.com/dany74q/ctap-keyring-device";
69     license = licenses.mit;
70     maintainers = with maintainers; [ jbgosselin ];
71   };