Skip to content

Commit

Permalink
packages/tdx-tools: init
Browse files Browse the repository at this point in the history
This adds a package for TDX debugging duties such as reading the event log and includes it in our debug image builds.
  • Loading branch information
msanft committed Nov 22, 2024
1 parent 6f2caf3 commit bd56bd1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/by-name/mkNixosConfig/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lib.makeOverridable (
pause-bundle
nvidia-ctk-oci-hook
nvidia-ctk-with-config
tdx-tools
;
inherit (outerPkgs.kata) kata-agent;
})
Expand Down
30 changes: 30 additions & 0 deletions packages/by-name/tdx-tools/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2024 Edgeless Systems GmbH
# SPDX-License-Identifier: AGPL-3.0-only

{
python3Packages,
fetchFromGitHub,
}:

python3Packages.buildPythonApplication rec {
pname = "tdx-tools";
version = "noble-24.04";
pyproject = true;

src = fetchFromGitHub {
owner = "canonical";
repo = "tdx";
rev = version;
sha256 = "sha256-4Uzsnrf/B3awMutSPSF9PeOZ68mstNzQXnaD11nHWD4=";
};

build-system = [ python3Packages.setuptools ];

dependencies = with python3Packages; [
py-cpuinfo
];

preBuild = ''
cd tests/lib/tdx-tools
'';
}
1 change: 1 addition & 0 deletions packages/nixos/debug.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ in
util-linux
coreutils
strace
tdx-tools
];

services.getty.autologinUser = "root";
Expand Down

0 comments on commit bd56bd1

Please sign in to comment.