Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions pkgs/tools/security/tboot/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
{ lib, stdenv, fetchurl, trousers, openssl, zlib }:
{ lib, stdenv, fetchurl, openssl, perl, trousers, zlib }:

stdenv.mkDerivation rec {
pname = "tboot";
version = "1.9.8";
version = "1.10.1";

src = fetchurl {
url = "mirror://sourceforge/tboot/${pname}-${version}.tar.gz";
sha256 = "06f0ggl6vrb5ghklblvh2ixgmmjv31rkp1vfj9qm497iqwq9ac00";
sha256 = "18bnkwnlk16cc20nysqfcjx006idi7jmmhahk8vk09w458bhaajg";
};

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

buildInputs = [ trousers openssl zlib ];
buildInputs = [ openssl trousers zlib ];

enableParallelBuilding = true;

hardeningDisable = [ "pic" "stackprotector" ];

NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ];
preConfigure = ''
substituteInPlace tboot/Makefile --replace /usr/bin/perl ${perl}/bin/perl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't supply this with a configureFlag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Is your solution working with cross compiling?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkgsi686Linux.tboot builds.


configurePhase = ''
for a in lcptools utils tb_polgen; do
substituteInPlace $a/Makefile --replace /usr/sbin /sbin
for a in lcptools-v2 tb_polgen utils; do
substituteInPlace "$a/Makefile" --replace /usr/sbin /sbin
done
substituteInPlace docs/Makefile --replace /usr/share /share
'';
Expand All @@ -31,6 +27,7 @@ stdenv.mkDerivation rec {
meta = with 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 = "https://sourceforge.net/projects/tboot/";
changelog = "https://sourceforge.net/p/tboot/code/ci/v${version}/tree/CHANGELOG";
license = licenses.bsd3;
maintainers = with maintainers; [ ak ];
platforms = [ "x86_64-linux" "i686-linux" ];
Expand Down

This file was deleted.