2019-02-14 05:17:13 +01:00
|
|
|
{ stdenv, lib, fetchurl
|
|
|
|
, cmocka, doxygen, ibm-sw-tpm2, iproute, openssl, perl, pkgconfig, procps
|
|
|
|
, uthash, which }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tpm2-tss";
|
2019-03-01 01:25:38 +01:00
|
|
|
version = "2.2.1";
|
2019-02-14 05:17:13 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
|
2019-03-01 01:25:38 +01:00
|
|
|
sha256 = "194k0gg75ygclwhb205zr26qrnx4hsik7pbazs39yf15js55bksv";
|
2019-02-14 05:17:13 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|