From b80ea23c7b3848d98a99a2fdb958cc351d8e6c4d Mon Sep 17 00:00:00 2001 From: Dominic Shelton Date: Wed, 12 Jan 2022 20:08:14 +1100 Subject: [PATCH] pynitrokey: init at 0.4.9 --- pkgs/tools/security/pynitrokey/default.nix | 44 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/tools/security/pynitrokey/default.nix diff --git a/pkgs/tools/security/pynitrokey/default.nix b/pkgs/tools/security/pynitrokey/default.nix new file mode 100644 index 000000000000..b50550e74368 --- /dev/null +++ b/pkgs/tools/security/pynitrokey/default.nix @@ -0,0 +1,44 @@ +{ python3Packages, lib }: + +with python3Packages; + +buildPythonApplication rec { + pname = "pynitrokey"; + version = "0.4.9"; + format = "flit"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-mhH6mVgLRX87PSGTFkj1TE75jU1lwcaRZWbC67T+vWo="; + }; + + propagatedBuildInputs = [ + click + cryptography + ecdsa + fido2 + intelhex + pyserial + pyusb + requests + pygments + python-dateutil + urllib3 + cffi + cbor + nkdfu + ]; + + # no tests + doCheck = false; + + pythonImportsCheck = [ "pynitrokey" ]; + + meta = with lib; { + description = "Python client for Nitrokey devices"; + homepage = "https://github.com/Nitrokey/pynitrokey"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ frogamic ]; + mainProgram = "nitropy"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9a5b526c6d33..451c05043c38 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34032,6 +34032,8 @@ with pkgs; xrq = callPackage ../applications/misc/xrq { }; + pynitrokey = callPackage ../tools/security/pynitrokey { }; + nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { }; nitrokey-udev-rules = callPackage ../tools/security/nitrokey-app/udev-rules.nix { };