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

53 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub
, autoreconfHook, autoconf-archive, pkg-config, doxygen, perl
, openssl, json_c, curl, libgcrypt
, cmocka, uthash, ibm-sw-tpm2, iproute, procps, which
}:
2019-02-14 04:17:13 +00:00
stdenv.mkDerivation rec {
pname = "tpm2-tss";
2020-09-24 19:16:16 +01:00
version = "3.0.1";
2019-02-14 04:17:13 +00:00
src = fetchFromGitHub {
owner = "tpm2-software";
repo = pname;
rev = version;
2020-09-24 19:16:16 +01:00
sha256 = "10wayqk7h1v3hdyd09rkjjs9989r968dpgf8m0xjqgn7q3y78n61";
2019-02-14 04:17:13 +00:00
};
nativeBuildInputs = [
autoreconfHook autoconf-archive pkg-config doxygen perl
];
buildInputs = [ openssl json_c curl libgcrypt ];
checkInputs = [
cmocka uthash ibm-sw-tpm2 iproute procps which
2019-02-14 04:17:13 +00:00
];
preAutoreconf = "./bootstrap";
2020-06-16 12:00:02 +01:00
enableParallelBuilding = true;
2019-02-14 04:17:13 +00: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-14 04:17:13 +00:00
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ delroth ];
};
}