1{
2 lib,
3 stdenv,
4 fetchurl,
5 trousers,
6 openssl,
7 opencryptoki,
8 perl,
9}:
10
11let
12 version = "1.3.9.1";
13in
14stdenv.mkDerivation rec {
15 pname = "tpm-tools";
16 inherit version;
17
18 src = fetchurl {
19 url = "mirror://sourceforge/trousers/tpm-tools/${version}/${pname}-${version}.tar.gz";
20 sha256 = "0s7srgghykxnlb1g4izabzf2gfb1knxc0nzn6bly49h8cpi19dww";
21 };
22
23 sourceRoot = ".";
24
25 patches = [
26 (fetchurl {
27 url = "https://sources.debian.org/data/main/t/tpm-tools/1.3.9.1-0.1/debian/patches/05-openssl1.1_fix_data_mgmt.patch";
28 sha256 = "161yysw4wgy3spsz6p1d0ib0h5pnrqm8bdh1l71c4hz6a6wpcyxj";
29 })
30 ];
31
32 nativeBuildInputs = [ perl ];
33 buildInputs = [
34 trousers
35 openssl
36 opencryptoki
37 ];
38
39 meta = with lib; {
40 description = "Management tools for TPM hardware";
41 longDescription = ''
42 tpm-tools is an open-source package designed to enable user and
43 application enablement of Trusted Computing using a Trusted Platform
44 Module (TPM), similar to a smart card environment.
45 '';
46 homepage = "https://sourceforge.net/projects/trousers/files/tpm-tools/";
47 license = licenses.cpl10;
48 maintainers = [ maintainers.ak ];
49 platforms = platforms.unix;
50 };
51}