2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, asn1crypto
|
|
|
|
, cffi
|
|
|
|
, cryptography
|
|
|
|
, ibm-sw-tpm2
|
2022-08-12 12:06:08 +00:00
|
|
|
, pkgconfig # see nativeBuildInputs
|
|
|
|
, pkg-config # see nativeBuildInputs
|
2022-04-27 09:35:20 +00:00
|
|
|
, pycparser
|
|
|
|
, pytestCheckHook
|
|
|
|
, python
|
2022-08-12 12:06:08 +00:00
|
|
|
, pyyaml
|
2022-04-27 09:35:20 +00:00
|
|
|
, setuptools-scm
|
2021-03-09 03:18:52 +00:00
|
|
|
, tpm2-tss
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tpm2-pytss";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "2.0.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-iN5ePKMnYh1VzGbKtwdIx1tG74T+8ax/AqDGgermr90=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cffi
|
2022-12-28 21:21:41 +00:00
|
|
|
pkgconfig # this is the Python module
|
2022-08-12 12:06:08 +00:00
|
|
|
pkg-config # this is the actual pkg-config tool
|
2022-04-27 09:35:20 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = [
|
|
|
|
tpm2-tss
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
asn1crypto
|
2021-03-09 03:18:52 +00:00
|
|
|
cryptography
|
2022-08-12 12:06:08 +00:00
|
|
|
pyyaml
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# https://github.com/tpm2-software/tpm2-pytss/issues/341
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
ibm-sw-tpm2
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"tpm2_pytss"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tpm2-software/tpm2-pytss";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/tpm2-software/tpm2-pytss/blob/${version}/CHANGELOG.md";
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "TPM2 TSS Python bindings for Enhanced System API (ESYS)";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ baloo ];
|
|
|
|
};
|
|
|
|
}
|