From 428fe359b5a63fb0567011334d255fe09e52ee65 Mon Sep 17 00:00:00 2001 From: Dominic Shelton Date: Sat, 18 Feb 2023 23:52:31 +1100 Subject: [PATCH 1/3] pynitrokey: 0.4.31 -> 0.4.34 --- pkgs/tools/security/pynitrokey/default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/security/pynitrokey/default.nix b/pkgs/tools/security/pynitrokey/default.nix index e18b849c343c..3b143f0f3ff3 100644 --- a/pkgs/tools/security/pynitrokey/default.nix +++ b/pkgs/tools/security/pynitrokey/default.nix @@ -1,36 +1,36 @@ -{ python3Packages, lib, nrfutil }: +{ python3Packages, lib, nrfutil }: with python3Packages; buildPythonApplication rec { pname = "pynitrokey"; - version = "0.4.31"; + version = "0.4.34"; format = "flit"; src = fetchPypi { inherit pname version; - sha256 = "sha256-nqw5wUzQxKCBzYBRhqB6v7WWrF1Ojf8z6Kf1YUA9+wU="; + hash = "sha256-lMXoDkNiAmGb6e4u/vZMcmXUclwW402YUGihLjWIr+U="; }; propagatedBuildInputs = [ + certifi + cffi click cryptography ecdsa + frozendict fido2 intelhex + nkdfu nrfutil - pyserial + python-dateutil pyusb requests - pygments - python-dateutil spsdk + tqdm urllib3 - cffi - cbor - nkdfu - fido2 tlv8 + typing-extensions ]; nativeBuildInputs = [ @@ -39,7 +39,9 @@ buildPythonApplication rec { pythonRelaxDeps = [ "cryptography" + "python-dateutil" "spsdk" + "typing_extensions" ]; # no tests From e6495b4112faed54eb87d4a895bf37818bc11e76 Mon Sep 17 00:00:00 2001 From: Dominic Shelton Date: Fri, 17 Mar 2023 23:54:12 +1100 Subject: [PATCH 2/3] python3Packages.spsdk: fix build by relaxing versions --- pkgs/development/python-modules/spsdk/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/spsdk/default.nix b/pkgs/development/python-modules/spsdk/default.nix index 944987f2cd36..8ea41f00c123 100644 --- a/pkgs/development/python-modules/spsdk/default.nix +++ b/pkgs/development/python-modules/spsdk/default.nix @@ -27,6 +27,7 @@ , pyserial , ruamel-yaml , sly +, typing-extensions , pytestCheckHook , voluptuous }: @@ -52,8 +53,10 @@ buildPythonPackage rec { "cmsis-pack-manager" "deepmerge" "jinja2" + "pycryptodome" "pylink-square" "pyocd" + "typing-extensions" ]; pythonRemoveDeps = [ @@ -85,6 +88,7 @@ buildPythonPackage rec { pyserial ruamel-yaml sly + typing-extensions ]; nativeCheckInputs = [ From 6f037e51aaa47a3d4d54d4739965fea76bd5405f Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Sun, 26 Mar 2023 01:10:13 +0100 Subject: [PATCH 3/3] pynitrokey: support more devices via libnitrokey libnitrokey is needed to support e.g. Nitrokey Pro devices. --- pkgs/tools/security/pynitrokey/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/pynitrokey/default.nix b/pkgs/tools/security/pynitrokey/default.nix index 3b143f0f3ff3..9c3eec9e9f3f 100644 --- a/pkgs/tools/security/pynitrokey/default.nix +++ b/pkgs/tools/security/pynitrokey/default.nix @@ -1,4 +1,4 @@ -{ python3Packages, lib, nrfutil }: +{ python3Packages, lib, nrfutil, libnitrokey }: with python3Packages; @@ -44,6 +44,12 @@ buildPythonApplication rec { "typing_extensions" ]; + # libnitrokey is not propagated to users of pynitrokey + # It is only usable from the wrapped bin/nitropy + makeWrapperArgs = [ + "--set LIBNK_PATH ${lib.makeLibraryPath [ libnitrokey ]}" + ]; + # no tests doCheck = false;