depot/third_party/nixpkgs/pkgs/tools/security/libtpms/default.nix
Default email 439a6efcab Project import generated by Copybara.
GitOrigin-RevId: f6b5bfdb470d60a876992749d0d708ed7b6b56ca
2021-02-24 18:30:23 +00:00

43 lines
975 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, pkg-config, autoreconfHook
, openssl, perl
, tpm2Support ? false
}:
stdenv.mkDerivation rec {
pname = "libtpms";
version = "0.7.4";
src = fetchFromGitHub {
owner = "stefanberger";
repo = "libtpms";
rev = "v${version}";
sha256 = "sha256-nZSBD3WshlZHVMBFmDBBdFkhBjNgtASfg6+lYOOAhZ8=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
perl # needed for pod2man
];
buildInputs = [ openssl ];
outputs = [ "out" "lib" "man" "dev" ];
enableParallelBuilding = true;
configureFlags = [
"--with-openssl"
] ++ lib.optionals tpm2Support [
"--with-tpm2" # TPM2 support is flagged experimental by upstream
];
meta = with lib; {
description = "The libtpms library provides software emulation of a Trusted Platform Module (TPM 1.2 and TPM 2.0)";
homepage = "https://github.com/stefanberger/libtpms";
license = licenses.bsd3;
maintainers = [ maintainers.baloo ];
};
}