summary refs log tree commit diff
path: root/pkgs/tools/security/libtpms
diff options
context:
space:
mode:
authorArthur Gautier <baloo@superbaloo.net>2021-02-17 03:59:35 +0000
committerArthur Gautier <baloo@superbaloo.net>2021-02-21 17:25:49 +0000
commit7777e229a1caa29d0d76bdbd96181808016d4112 (patch)
treecfffafe6ad5babaa0b0939ad6fa33d2b150a2e68 /pkgs/tools/security/libtpms
parent0befb42b67d61d268852291d068e108d9d0648c0 (diff)
downloadnixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar.gz
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar.bz2
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar.lz
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar.xz
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.tar.zst
nixpkgs-7777e229a1caa29d0d76bdbd96181808016d4112.zip
libtpms: init at 0.7.4
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Diffstat (limited to 'pkgs/tools/security/libtpms')
-rw-r--r--pkgs/tools/security/libtpms/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/security/libtpms/default.nix b/pkgs/tools/security/libtpms/default.nix
new file mode 100644
index 00000000000..71966a934d6
--- /dev/null
+++ b/pkgs/tools/security/libtpms/default.nix
@@ -0,0 +1,43 @@
+{ 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 ];
+  };
+}