diff options
author | Pierre Bourdon <delroth@gmail.com> | 2019-02-14 06:12:32 +0100 |
---|---|---|
committer | Pierre Bourdon <delroth@gmail.com> | 2019-02-19 20:02:31 +0100 |
commit | d21e4f1ab414c22a35aa7194e0842f15cf5b49c9 (patch) | |
tree | 9bddd9ff00b2b9a26fd85c284bd9fcd9a63c4516 /pkgs/tools/security/tpm2-tools | |
parent | 0cb599293b4d005d57caf21f5c3b511235b580cd (diff) |
tpm2-tools: init at 3.1.3
Diffstat (limited to 'pkgs/tools/security/tpm2-tools')
-rw-r--r-- | pkgs/tools/security/tpm2-tools/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/security/tpm2-tools/default.nix b/pkgs/tools/security/tpm2-tools/default.nix new file mode 100644 index 0000000000000..84369e6ea54dd --- /dev/null +++ b/pkgs/tools/security/tpm2-tools/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, fetchpatch, lib +, cmocka, curl, pandoc, pkgconfig, openssl, tpm2-tss }: + +stdenv.mkDerivation rec { + pname = "tpm2-tools"; + version = "3.1.3"; + + src = fetchurl { + url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz"; + sha256 = "05is1adwcg7y2p121yldd8m1gigdnzf9izbjazvsr6yg95pmg5fc"; + }; + + patches = [ + (fetchpatch { + name = "tests-tss-2.2.0-compat.patch"; + url = "https://patch-diff.githubusercontent.com/raw/tpm2-software/tpm2-tools/pull/1322.patch"; + sha256 = "0yy5qbgbd13d7cl8pzsji95a6qnwiik5s2cyqj35jd8blymikqxh"; + }) + ]; + + nativeBuildInputs = [ pandoc pkgconfig ]; + buildInputs = [ + curl openssl tpm2-tss + # For unit tests. + cmocka + ]; + + configureFlags = [ "--enable-unit" ]; + doCheck = true; + + meta = with lib; { + description = "Command line tools that provide access to a TPM 2.0 compatible device"; + homepage = https://github.com/tpm2-software/tpm2-tools; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ delroth ]; + }; +} |