2020-01-08 15:38:28 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchpatch
|
2019-02-14 04:17:13 +00:00
|
|
|
, cmocka, doxygen, ibm-sw-tpm2, iproute, openssl, perl, pkgconfig, procps
|
2020-01-08 15:38:28 +00:00
|
|
|
, uthash, which
|
|
|
|
}:
|
2019-02-14 04:17:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tpm2-tss";
|
2019-12-24 23:29:07 +00:00
|
|
|
version = "2.3.2";
|
2019-02-14 04:17:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
|
2019-12-24 23:29:07 +00:00
|
|
|
sha256 = "19jg09sxy3aj4dc1yv32jjv0m62cnmhjlw02jbh4d4pk2439m4l2";
|
2019-02-14 04:17:13 +00:00
|
|
|
};
|
|
|
|
|
2020-01-08 15:38:28 +00:00
|
|
|
patches = [
|
|
|
|
# Fix test failure. see https://github.com/tpm2-software/tpm2-tss/pull/1585
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/tpm2-software/tpm2-tss/pull/1585.patch";
|
|
|
|
sha256 = "0ak3l588ahzv3yx1gfa4sa6p74lsffxzkr23ppznm34wvlcci86n";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-02-14 04:17:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
doxygen perl pkgconfig
|
|
|
|
# For unit tests and integration tests.
|
|
|
|
ibm-sw-tpm2 iproute procps which
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
# For unit tests and integration tests.
|
|
|
|
cmocka uthash
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = "patchShebangs script";
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-unit"
|
|
|
|
"--enable-integration"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Do not install the upstream udev rules, they rely on specific
|
|
|
|
# users/groups which aren't guaranteed to exist on the system.
|
|
|
|
rm -R $out/lib/udev
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OSS implementation of the TCG TPM2 Software Stack (TSS2)";
|
|
|
|
homepage = https://github.com/tpm2-software/tpm2-tss;
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|