Skip to content

Commit

Permalink
tests: add passthruRust test using cloud-hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
nikstur committed Jul 12, 2024
1 parent 2ec7aff commit e3ca2d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions nix/tests/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand 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 {
Expand Down

0 comments on commit e3ca2d8

Please sign in to comment.