git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.tpm2-pytss: init at 0.2.4

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>

commit7710eed6d0a55f79bc28922a7aa7924b135a70a4 authorArthur Gautier <baloo@superbaloo.net> dateTue 23 Feb 2021, 04:50 (6 years ago) parenteea5575
2 files changed+43
pkgs/development/python-modules/tpm2-pytss/default.nix+41 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/tpm2-pytss/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ lib, buildPythonPackage, fetchPypi, pythonOlder
2+, pkg-config, swig
3+, tpm2-tss
4+, cryptography, ibm-sw-tpm2
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "tpm2-pytss";
9+
10+ # Last version on github is 0.2.4, but it looks
11+ # like a mistake (it's missing commits from 0.1.9)
12+ version = "0.1.9";
13+ disabled = pythonOlder "3.5";
14+
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "sha256-v5Xth0A3tFnLFg54nvWYL2TD201e/GWv+2y5Qc60CmU=";
18+ };
19+ postPatch = ''
20+ substituteInPlace tpm2_pytss/config.py --replace \
21+ 'SYSCONFDIR = CONFIG.get("sysconfdir", "/etc")' \
22+ 'SYSCONFDIR = "${tpm2-tss}/etc"'
23+ '';
24+
25+ nativeBuildInputs = [ pkg-config swig ];
26+ # The TCTI is dynamically loaded from tpm2-tss, we have to provide the library to the end-user
27+ propagatedBuildInputs = [ tpm2-tss ];
28+
29+ checkInputs = [
30+ cryptography
31+ # provide tpm_server used as simulator for the tests
32+ ibm-sw-tpm2
33+ ];
34+
35+ meta = with lib; {
36+ homepage = "https://github.com/tpm2-software/tpm2-pytss";
37+ description = "TPM2 TSS Python bindings for Enhanced System API (ESYS)";
38+ license = licenses.bsd2;
39+ maintainers = with maintainers; [ baloo ];
40+ };
41+}
pkgs/top-level/python-packages.nix+2
@@ -7944,6 +7944,8 @@ in {
79447944
79457945 tox = callPackage ../development/python-modules/tox { };
79467946
7947+ tpm2-pytss = callPackage ../development/python-modules/tpm2-pytss { };
7948+
79477949 tqdm = callPackage ../development/python-modules/tqdm { };
79487950
79497951 traceback2 = callPackage ../development/python-modules/traceback2 { };