1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 18:34:41 +00:00
nixpkgs/pkgs/tools/security/ibm-sw-tpm2/default.nix

40 lines
983 B
Nix
Raw Normal View History

2019-02-14 03:42:07 +00:00
{ stdenv, fetchurl, lib, openssl }:
stdenv.mkDerivation rec {
pname = "ibm-sw-tpm2";
2020-06-10 00:04:46 +01:00
version = "1628";
2019-02-14 03:42:07 +00:00
src = fetchurl {
url = "mirror://sourceforge/ibmswtpm2/ibmtpm${version}.tar.gz";
2020-06-10 00:04:46 +01:00
sha256 = "18wywbsdp5sjrapznk2ydbmx0whz513dhybn1lls24xfl7kp9s58";
2019-02-14 03:42:07 +00:00
};
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/";
2019-02-14 03:42:07 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ delroth ];
license = licenses.bsd3;
};
}