nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, fetchpatch
2020-06-16 03:46:53 -07:00
, cmocka, doxygen, ibm-sw-tpm2, iproute, openssl, perl, pkgconfig, procps, json_c, curl
, uthash, which
}:
2019-02-13 20:17:13 -08:00
stdenv.mkDerivation rec {
pname = "tpm2-tss";
2020-06-16 03:46:53 -07:00
version = "2.4.1";
2019-02-13 20:17:13 -08:00
src = fetchurl {
url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
2020-06-16 03:46:53 -07:00
sha256 = "03g6l64nzkpadjyabmbhnhs8648iqb95fviinnpslggzp75azmsq";
2019-02-13 20:17:13 -08:00
};
nativeBuildInputs = [
doxygen perl pkgconfig
];
buildInputs = [
2020-06-16 03:46:53 -07:00
openssl json_c curl
];
checkInputs = [
cmocka uthash ibm-sw-tpm2 iproute procps which
2019-02-13 20:17:13 -08:00
];
2020-06-16 04:00:02 -07:00
enableParallelBuilding = true;
2019-02-13 20:17:13 -08:00
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";
2019-02-13 20:17:13 -08:00
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ delroth ];
};
}