Skip to content

Commit 03fd9a3

Browse files
authored
tboot: fix build with gcc 14, refactor (#388574)
2 parents 3601ee9 + ce42dd3 commit 03fd9a3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

pkgs/by-name/tb/tboot/package.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
1414

1515
src = fetchurl {
1616
url = "mirror://sourceforge/tboot/${pname}-${version}.tar.gz";
17-
sha256 = "sha256-TIs/xLxLBkKBN0a0CRB2KMmCq8QgICH1++i485WDU3A=";
17+
hash = "sha256-TIs/xLxLBkKBN0a0CRB2KMmCq8QgICH1++i485WDU3A=";
1818
};
1919

2020
buildInputs = [
@@ -34,14 +34,21 @@ stdenv.mkDerivation rec {
3434
substituteInPlace docs/Makefile --replace /usr/share /share
3535
'';
3636

37+
postPatch = ''
38+
# compute the allocated size from the pointed type, to avoid the warning
39+
substituteInPlace lcptools-v2/pconf_legacy.c \
40+
--replace-fail "digest = malloc(SHA1_DIGEST_SIZE);" \
41+
"digest = malloc(sizeof *digest);"
42+
'';
43+
3744
installFlags = [ "DESTDIR=$(out)" ];
3845

39-
meta = with lib; {
46+
meta = {
4047
description = "Pre-kernel/VMM module that uses Intel(R) TXT to perform a measured and verified launch of an OS kernel/VMM";
4148
homepage = "https://sourceforge.net/projects/tboot/";
4249
changelog = "https://sourceforge.net/p/tboot/code/ci/v${version}/tree/CHANGELOG";
43-
license = licenses.bsd3;
44-
maintainers = with maintainers; [ ak ];
50+
license = lib.licenses.bsd3;
51+
maintainers = with lib.maintainers; [ ak ];
4552
platforms = [
4653
"x86_64-linux"
4754
"i686-linux"

0 commit comments

Comments
 (0)