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-08-12 12:06:08 +00:00
|
|
|
version = "1.2.0";
|
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-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-OgWWTjcj3Qd4dSaCwY+fuRQpLSFn4+9o11kPR9n8a54=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cffi
|
2022-08-12 12:06:08 +00:00
|
|
|
pkgconfig # this is the python module
|
|
|
|
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-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [ "tpm2_pytss" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tpm2-software/tpm2-pytss";
|
|
|
|
description = "TPM2 TSS Python bindings for Enhanced System API (ESYS)";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ baloo ];
|
|
|
|
};
|
|
|
|
}
|