nixpkgs/pkgs/tools/security/tboot/default.nix
Franz Pletz aff1f4ab94 Use general hardening flag toggle lists
The following parameters are now available:

  * hardeningDisable
    To disable specific hardening flags
  * hardeningEnable
    To enable specific hardening flags

Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.

cc-wrapper supports the following flags:

  * fortify
  * stackprotector
  * pie (disabled by default)
  * pic
  * strictoverflow
  * format
  * relro
  * bindnow
2016-03-05 18:55:26 +01:00

34 lines
991 B
Nix

{ stdenv, fetchurl, trousers, openssl, zlib }:
stdenv.mkDerivation rec {
name = "tboot-1.8.2";
src = fetchurl {
url = "mirror://sourceforge/tboot/${name}.tar.gz";
sha256 = "1l9ccm7ik9fs7kzg1bjc5cjh0pcf4v0k1c84dmyr51r084i7p31m";
};
buildInputs = [ trousers openssl zlib ];
patches = [ ./tboot-add-well-known-secret-option-to-lcp_writepol.patch ];
hardeningDisable = [ "pic" "stackprotector" ];
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 = "A pre-kernel/VMM module that uses 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 = platforms.linux;
};
}