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