summary refs log tree commit diff
path: root/pkgs/tools/security/tboot/default.nix
blob: 7c67ebb16b1163a2cf41b80af0755ad0492e6b49 (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
{ stdenv, fetchurl, trousers, openssl, zlib }:

stdenv.mkDerivation rec {
  name = "tboot-1.8.0";

  src = fetchurl {
    url = "mirror://sourceforge/tboot/${name}.tar.gz";
    sha256 = "04z1maryqnr714f3rcynqrpmlx76lxr6bb543xwj5rdl1yvdw2xr";
  };

  buildInputs = [ trousers openssl zlib ];

  patches = [ ./tboot-add-well-known-secret-option-to-lcp_writepol.patch ];

  configurePhase = ''
    for a in lcptools utils tb_polgen; do
      substituteInPlace $a/Makefile --replace /usr/sbin /sbin
    done
    substituteInPlace docs/Makefile --replace /usr/share /share
  '';
  installFlags = "DESTDIR=$(out)";

  meta = with stdenv.lib; {
    description = ''Trusted Boot (tboot) is an open source, pre-kernel/VMM module that uses
                    Intel(R) Trusted Execution Technology (Intel(R) TXT) to perform a measured
                    and verified launch of an OS kernel/VMM.'';
    homepage    = http://sourceforge.net/projects/tboot/;
    license     = licenses.bsd3;
    maintainers = [ maintainers.ak ];
    platforms   = [ "x86_64-linux" ]; # doesn't build on i686 and maybe pointless there
  };
}