Merge pull request #195816 from jojosch/fix-pynitrokey

pynitrokey: fix build and update to 0.4.31
This commit is contained in:
Weijia Wang 2023-03-17 13:00:49 +02:00 committed by GitHub
commit a9fc1a78bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 7 deletions

View File

@ -0,0 +1,39 @@
{ 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 ];
};
}

View File

@ -4,12 +4,12 @@ with python3Packages;
buildPythonApplication rec {
pname = "pynitrokey";
version = "0.4.27";
version = "0.4.31";
format = "flit";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-aWQhMvATcDtyBtj38mGnypkKIqKQgneBzWDh5o/5Wkc=";
sha256 = "sha256-nqw5wUzQxKCBzYBRhqB6v7WWrF1Ojf8z6Kf1YUA9+wU=";
};
propagatedBuildInputs = [
@ -29,13 +29,18 @@ buildPythonApplication rec {
cffi
cbor
nkdfu
fido2
tlv8
];
# spsdk is patched to allow for newer cryptography
postPatch = ''
substituteInPlace pyproject.toml \
--replace "cryptography >=3.4.4,<37" "cryptography"
'';
nativeBuildInputs = [
pythonRelaxDepsHook
];
pythonRelaxDeps = [
"cryptography"
"spsdk"
];
# no tests
doCheck = false;

View File

@ -11721,6 +11721,8 @@ self: super: with self; {
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 { };