Merge pull request #195816 from jojosch/fix-pynitrokey

pynitrokey: fix build and update to 0.4.31

Changed files
+53 -7
pkgs
development
python-modules
tools
security
pynitrokey
top-level
+39
pkgs/development/python-modules/tlv8/default.nix
···
···
+
{ lib
+
, buildPythonPackage
+
, fetchFromGitHub
+
, pytestCheckHook
+
}:
+
+
buildPythonPackage rec {
+
pname = "tlv8";
+
version = "0.10.0";
+
format = "setuptools";
+
+
# pypi does not contain test files
+
src = fetchFromGitHub {
+
owner = "jlusiardi";
+
repo = "tlv8_python";
+
rev = "v${version}";
+
sha256 = "sha256-G35xMFYasKD3LnGi9q8wBmmFvqgtg0HPdC+y82nxRWA=";
+
};
+
+
checkInputs = [
+
pytestCheckHook
+
];
+
+
pythonImportsCheck = [
+
"tlv8"
+
];
+
+
meta = with lib; {
+
description = "Type-Length-Value8 (TLV8) for Python";
+
longDescription = ''
+
Python module to handle type-length-value (TLV) encoded data 8-bit type, 8-bit length, and N-byte
+
value as described within the Apple HomeKit Accessory Protocol Specification Non-Commercial Version
+
Release R2.
+
'';
+
homepage = "https://github.com/jlusiardi/tlv8_python";
+
license = licenses.asl20;
+
maintainers = with maintainers; [ jojosch ];
+
};
+
}
+12 -7
pkgs/tools/security/pynitrokey/default.nix
···
buildPythonApplication rec {
pname = "pynitrokey";
-
version = "0.4.27";
format = "flit";
src = fetchPypi {
inherit pname version;
-
sha256 = "sha256-aWQhMvATcDtyBtj38mGnypkKIqKQgneBzWDh5o/5Wkc=";
};
propagatedBuildInputs = [
···
cffi
cbor
nkdfu
];
-
# spsdk is patched to allow for newer cryptography
-
postPatch = ''
-
substituteInPlace pyproject.toml \
-
--replace "cryptography >=3.4.4,<37" "cryptography"
-
'';
# no tests
doCheck = false;
···
buildPythonApplication rec {
pname = "pynitrokey";
+
version = "0.4.31";
format = "flit";
src = fetchPypi {
inherit pname version;
+
sha256 = "sha256-nqw5wUzQxKCBzYBRhqB6v7WWrF1Ojf8z6Kf1YUA9+wU=";
};
propagatedBuildInputs = [
···
cffi
cbor
nkdfu
+
fido2
+
tlv8
];
+
nativeBuildInputs = [
+
pythonRelaxDepsHook
+
];
+
+
pythonRelaxDeps = [
+
"cryptography"
+
"spsdk"
+
];
# no tests
doCheck = false;
+2
pkgs/top-level/python-packages.nix
···
tls-parser = callPackage ../development/python-modules/tls-parser { };
tmb = callPackage ../development/python-modules/tmb { };
todoist = callPackage ../development/python-modules/todoist { };
···
tls-parser = callPackage ../development/python-modules/tls-parser { };
+
tlv8 = callPackage ../development/python-modules/tlv8 { };
+
tmb = callPackage ../development/python-modules/tmb { };
todoist = callPackage ../development/python-modules/todoist { };