about summary refs log tree commit diff
path: root/pkgs/tools/security/tpm2-tools
diff options
context:
space:
mode:
authorLeon Schuermann <leon@is.currently.online>2019-10-27 11:30:06 +0100
committerEmery Hemingway <ehmry@posteo.net>2019-10-28 16:50:08 +0100
commitd0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae (patch)
tree4491b874e45bbd1097702dbeec568b710dff88ef /pkgs/tools/security/tpm2-tools
parent028dacdcfb4a9a5154f988756640c495d5158e54 (diff)
downloadnixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar.gz
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar.bz2
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar.lz
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar.xz
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.tar.zst
nixlib-d0b8d591e7aa4131ba4b704ecd2ae2503b4a94ae.zip
tpm2-tools: 3.2.0 -> 4.0
Diffstat (limited to 'pkgs/tools/security/tpm2-tools')
-rw-r--r--pkgs/tools/security/tpm2-tools/default.nix28
1 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/tools/security/tpm2-tools/default.nix b/pkgs/tools/security/tpm2-tools/default.nix
index 1a6c8aaaa5d2..e2bbf1037d8b 100644
--- a/pkgs/tools/security/tpm2-tools/default.nix
+++ b/pkgs/tools/security/tpm2-tools/default.nix
@@ -1,24 +1,36 @@
 { stdenv, fetchurl, lib
-, cmocka, curl, pandoc, pkgconfig, openssl, tpm2-tss }:
+, pandoc, pkgconfig, makeWrapper, curl, openssl, tpm2-tss
+, abrmdSupport ? true, tpm2-abrmd ? null }:
 
 stdenv.mkDerivation rec {
   pname = "tpm2-tools";
-  version = "3.2.0";
+  version = "4.0";
 
   src = fetchurl {
     url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
-    sha256 = "057gg84zly6gjp6ypj6bv6zzmnr77cqsygl8x0147cylwa1ywydd";
+    sha256 = "02p0wj87fnrpsijd2zaqcxqxicqs36q7vakp6y8and920x36jb0y";
   };
 
-  nativeBuildInputs = [ pandoc pkgconfig ];
+  nativeBuildInputs = [ pandoc pkgconfig makeWrapper ];
   buildInputs = [
     curl openssl tpm2-tss
-    # For unit tests.
-    cmocka
   ];
 
-  configureFlags = [ "--enable-unit" ];
-  doCheck = true;
+  preFixup = let
+    ldLibraryPath = lib.makeLibraryPath ([
+      tpm2-tss
+    ] ++ (lib.optional abrmdSupport tpm2-abrmd));
+  in ''
+    for bin in $out/bin/*; do
+      wrapProgram $bin \
+        --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
+    done
+  '';
+
+
+  # Unit tests disabled, as they rely on a dbus session
+  #configureFlags = [ "--enable-unit" ];
+  doCheck = false;
 
   meta = with lib; {
     description = "Command line tools that provide access to a TPM 2.0 compatible device";