diff --git a/packages/by-name/mkNixosConfig/package.nix b/packages/by-name/mkNixosConfig/package.nix index 3b08d93d5..767761acc 100644 --- a/packages/by-name/mkNixosConfig/package.nix +++ b/packages/by-name/mkNixosConfig/package.nix @@ -43,6 +43,7 @@ lib.makeOverridable ( pause-bundle nvidia-ctk-oci-hook nvidia-ctk-with-config + tdx-tools ; inherit (outerPkgs.kata) kata-agent; }) diff --git a/packages/by-name/tdx-tools/package.nix b/packages/by-name/tdx-tools/package.nix new file mode 100644 index 000000000..f1e7c9afc --- /dev/null +++ b/packages/by-name/tdx-tools/package.nix @@ -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 + ''; +} diff --git a/packages/nixos/debug.nix b/packages/nixos/debug.nix index 226816e7f..38958f87f 100644 --- a/packages/nixos/debug.nix +++ b/packages/nixos/debug.nix @@ -27,6 +27,7 @@ in util-linux coreutils strace + tdx-tools ]; services.getty.autologinUser = "root";