about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/tpm2-tss
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/tpm2-tss')
-rw-r--r--nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix
new file mode 100644
index 000000000000..fa506733c16e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, fetchFromGitHub
+, autoreconfHook, autoconf-archive, pkg-config, doxygen, perl
+, openssl, json_c, curl, libgcrypt
+, cmocka, uthash, ibm-sw-tpm2, iproute, procps, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tpm2-tss";
+  version = "3.0.3";
+
+  src = fetchFromGitHub {
+    owner = "tpm2-software";
+    repo = pname;
+    rev = version;
+    sha256 = "106yhsjwjadxsl9dqxywg287mdwsksman02hdalhav18vcnvnlpj";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook autoconf-archive pkg-config doxygen perl
+  ];
+  buildInputs = [ openssl json_c curl libgcrypt ];
+  checkInputs = [
+    cmocka uthash ibm-sw-tpm2 iproute procps which
+  ];
+
+  preAutoreconf = "./bootstrap";
+
+  enableParallelBuilding = true;
+
+  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";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ delroth ];
+  };
+}