summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/ibm-sw-tpm2
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2019-02-14 04:42:07 +0100
committerPierre Bourdon <delroth@gmail.com>2019-02-19 20:02:31 +0100
commit67d912af0a71ce2f755b783cf9fad121a9d4b633 (patch)
tree320ae71fd2d6f8a7b571ee3c42a3db48e4bf386b /pkgs/tools/security/ibm-sw-tpm2
parent688ca701b239b77918c20ff2742ef53a44d1ec80 (diff)
ibm-sw-tpm2: init at 1332
Diffstat (limited to 'pkgs/tools/security/ibm-sw-tpm2')
-rw-r--r--pkgs/tools/security/ibm-sw-tpm2/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/security/ibm-sw-tpm2/default.nix b/pkgs/tools/security/ibm-sw-tpm2/default.nix
new file mode 100644
index 000000000000..cec31cec3771
--- /dev/null
+++ b/pkgs/tools/security/ibm-sw-tpm2/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, lib, openssl }:
+
+stdenv.mkDerivation rec {
+ pname = "ibm-sw-tpm2";
+ version = "1332";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/ibmswtpm2/ibmtpm${version}.tar.gz";
+ sha256 = "1zdhi8acd4jfp1v7ibd86hcv0g39yk8qrnhxjmmgzn8i7npr70cf";
+ };
+
+ buildInputs = [ openssl ];
+
+ sourceRoot = "src";
+
+ prePatch = ''
+ # Fix hardcoded path to GCC.
+ substituteInPlace makefile --replace /usr/bin/gcc "${stdenv.cc}/bin/cc"
+
+ # Remove problematic default CFLAGS.
+ substituteInPlace makefile \
+ --replace -Werror "" \
+ --replace -O0 "" \
+ --replace -ggdb ""
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp tpm_server $out/bin
+ '';
+
+ meta = with lib; {
+ description = "IBM's Software TPM 2.0, an implementation of the TCG TPM 2.0 specification";
+ homepage = https://sourceforge.net/projects/ibmswtpm2/;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ delroth ];
+ license = licenses.bsd3;
+ };
+}