From e3ca2d8810d795ba1b1d9aa19cacb83f28e5e09c Mon Sep 17 00:00:00 2001 From: nikstur Date: Fri, 12 Jul 2024 18:08:13 +0200 Subject: [PATCH] tests: add passthruRust test using cloud-hypervisor --- flake.nix | 2 +- nix/tests/default.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d75ae2b..1ea2d30 100644 --- a/flake.nix +++ b/flake.nix @@ -79,7 +79,7 @@ nativeCheckInputs = (previousAttrs.nativeCheckInputs or [ ]) ++ [ pkgs.rustfmt ]; checkPhase = "cargo fmt --check"; }); - } // import ./nix/tests { inherit pkgs buildBom; }; + } // import ./nix/tests { inherit pkgs buildBom passthruVendoredSbom; }; pre-commit = { check.enable = true; diff --git a/nix/tests/default.nix b/nix/tests/default.nix index c9b33a3..cbac4bd 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -1,8 +1,11 @@ { pkgs , buildBom +, passthruVendoredSbom }: let + rustPassthru = pkg: pkgs.callPackage (passthruVendoredSbom.rust pkg) { }; + buildtimeOptions = { includeBuildtimeDependencies = true; }; # This list cannot grow indefinitely because building a Bom requires all @@ -24,6 +27,9 @@ let { name = "git-extra-paths"; drv = git; options = { extraPaths = [ poetry ]; }; } { name = "git-extra-paths-buildtime"; drv = git; options = buildtimeOptions // { extraPaths = [ poetry ]; }; } + + { name = "cloud-hypervisor"; drv = rustPassthru cloud-hypervisor; options = { }; } + { name = "cloud-hypervisor"; drv = rustPassthru cloud-hypervisor; options = buildtimeOptions; } ]; cycloneDxSpec = pkgs.fetchFromGitHub {