diff options
author | JB Gosselin <1536838+dennajort@users.noreply.github.com> | 2023-02-19 11:46:48 -0500 |
---|---|---|
committer | JB Gosselin <1536838+dennajort@users.noreply.github.com> | 2023-03-02 11:16:45 -0500 |
commit | 58191ef83684df3798ab7c9658dd91f53a2932e2 (patch) | |
tree | 560885bdb19a3f868732de72d2859fba8c46ab18 | |
parent | 9916ae28ef57dfc4347fbab2ab62564ce2743c8f (diff) | |
download | nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar.gz nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar.bz2 nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar.lz nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar.xz nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.tar.zst nixpkgs-58191ef83684df3798ab7c9658dd91f53a2932e2.zip |
python310Packages.ctap-keyring-device: init at 1.0.6
-rw-r--r-- | maintainers/maintainer-list.nix | 7 | ||||
-rw-r--r-- | pkgs/development/python-modules/ctap-keyring-device/default.nix | 71 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 80 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3953a0f5fd6..65e50f34faf 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3601,6 +3601,13 @@ githubId = 62989; name = "Demyan Rogozhin"; }; + dennajort = { + email = "gosselinjb@gmail.com"; + matrix = "@dennajort:matrix.org"; + github = "dennajort"; + githubId = 1536838; + name = "Jean-Baptiste Gosselin"; + }; derchris = { email = "derchris@me.com"; github = "derchrisuk"; diff --git a/pkgs/development/python-modules/ctap-keyring-device/default.nix b/pkgs/development/python-modules/ctap-keyring-device/default.nix new file mode 100644 index 00000000000..6406440aa96 --- /dev/null +++ b/pkgs/development/python-modules/ctap-keyring-device/default.nix @@ -0,0 +1,71 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonRelaxDepsHook +, setuptools-scm +# install requirements +, fido2 +, keyring +, cryptography +# test requirements +, pytestCheckHook +}: + +let + fido2_0 = fido2.overridePythonAttrs (oldAttrs: rec { + version = "0.9.3"; + src = fetchPypi { + inherit (oldAttrs) pname; + inherit version; + hash = "sha256-tF6JphCc/Lfxu1E3dqotZAjpXEgi+DolORi5RAg0Zuw="; + }; + }); +in +buildPythonPackage rec { + pname = "ctap-keyring-device"; + version = "1.0.6"; + + src = fetchPypi { + inherit version pname; + sha256 = "sha256-pEJkuz0wxKt2PkowmLE2YC+HPYa2ZiENK7FAW14Ec/Y="; + }; + + # removing optional dependency needing pyobjc + postPatch = '' + substituteInPlace pytest.ini \ + --replace "--flake8 --black --cov" "" + ''; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools-scm + ]; + + pythonRemoveDeps = [ + # This is a darwin requirement missing pyobjc + "pyobjc-framework-LocalAuthentication" + ]; + + propagatedBuildInputs = [ + keyring + fido2_0 + cryptography + ]; + + pythonImportsCheck = [ "ctap_keyring_device" ]; + + checkInputs = [ pytestCheckHook ]; + + disabledTests = [ + # Disabled tests that needs pyobjc or windows + "touch_id_ctap_user_verifier" + "windows_hello_ctap_user_verifier" + ]; + + meta = with lib; { + description = "CTAP (client-to-authenticator-protocol) device backed by python's keyring library"; + homepage = "https://github.com/dany74q/ctap-keyring-device"; + license = licenses.mit; + maintainers = with maintainers; [ dennajort ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 259f5de9334..786049d35af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2144,6 +2144,8 @@ self: super: with self; { csvw = callPackage ../development/python-modules/csvw { }; + ctap-keyring-device = callPackage ../development/python-modules/ctap-keyring-device { }; + cu2qu = callPackage ../development/python-modules/cu2qu { }; cucumber-tag-expressions = callPackage ../development/python-modules/cucumber-tag-expressions { }; |