[M8] reusable libraries: install layout + cargoxx-path deps

This commit is contained in:
2026-05-17 18:13:15 +00:00
parent fdf97861a4
commit e6c39914b3
25 changed files with 932 additions and 21 deletions

View File

@@ -118,6 +118,30 @@ TEST_CASE("write round-trips lockfile recipe fields", "[lockfile]") {
REQUIRE(round_trip(l) == l);
}
TEST_CASE("write round-trips cargoxx-path source fields", "[lockfile]") {
Lockfile l{
.version = 1,
.packages = {
LockfilePackage{
.name = "mylib",
.version = "*",
.dependencies = {},
.nixpkgs_attr = std::nullopt,
.nixpkgs_rev = std::nullopt,
.linkdb_source = "cargoxx-path",
.find_package = "mylib CONFIG REQUIRED",
.targets = {"mylib::mylib"},
.pkg_config_module = std::nullopt,
.brute_force_libs = {},
.brute_force_includes = {},
.source_kind = "cargoxx-path",
.source_path = "../mylib",
},
},
};
REQUIRE(round_trip(l) == l);
}
TEST_CASE("Lockfile::nixpkgs_rev returns the shared rev", "[lockfile]") {
Lockfile l{
.version = 1,