blob: 012d492aacad6265d10a2e2b65ab83ae8e7bcf21 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ stdenv, fetchurl, lib, openssl }:
stdenv.mkDerivation rec {
pname = "ibm-sw-tpm2";
version = "1682";
src = fetchurl {
url = "mirror://sourceforge/ibmswtpm2/ibmtpm${version}.tar.gz";
hash = "sha256-PLZC+HGheyPVCwRuX5X0ScIodBX8HnrrS9u4kg28s48=";
};
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;
};
}
|