1{ lib
2, stdenv
3, fetchFromGitHub
4, pkg-config, autoreconfHook
5, openssl, perl
6}:
7
8stdenv.mkDerivation rec {
9 pname = "libtpms";
10 version = "0.9.6";
11
12 src = fetchFromGitHub {
13 owner = "stefanberger";
14 repo = "libtpms";
15 rev = "v${version}";
16 sha256 = "sha256-I2TYuOLwgEm6ofF2onWI7j2yu9wpXxNt7lJePSpF9VM=";
17 };
18
19 nativeBuildInputs = [
20 autoreconfHook
21 pkg-config
22 perl # needed for pod2man
23 ];
24 buildInputs = [ openssl ];
25
26 outputs = [ "out" "man" "dev" ];
27
28 enableParallelBuilding = true;
29
30 configureFlags = [
31 "--with-openssl"
32 "--with-tpm2"
33 ];
34
35 meta = with lib; {
36 description = "The libtpms library provides software emulation of a Trusted Platform Module (TPM 1.2 and TPM 2.0)";
37 homepage = "https://github.com/stefanberger/libtpms";
38 license = licenses.bsd3;
39 maintainers = [ maintainers.baloo ];
40 };
41}