[M8] cargoxx-pkgs as a flake: cargoxx add → string-form dep

Wrapper: fix cache.nixos.org-1 key; drop AppImage; pin publish to mozart/cargoxx-pkgs.
This commit is contained in:
2026-05-18 23:13:14 +00:00
parent 9d33379f94
commit 7bb39a64c1
16 changed files with 642 additions and 59 deletions

View File

@@ -138,3 +138,44 @@ TEST_CASE("write fails when the target directory does not exist",
auto r = write(m, "/nonexistent/dir/Cargoxx.toml");
REQUIRE_FALSE(r.has_value());
}
TEST_CASE("write round-trips a path-form dependency", "[manifest][write]") {
Manifest m{
pkg("consumer", "0.1.0"),
{Dependency{
.name = "mylib",
.version_spec = "*",
.components = {},
.source = cargoxx::manifest::DepSource::CargoxxPath,
.path = "../mylib",
}},
{},
};
REQUIRE(round_trip(m) == m);
}
TEST_CASE("write round-trips a git-form dependency", "[manifest][write]") {
Manifest m{
pkg("consumer", "0.1.0"),
{Dependency{
.name = "mylib",
.version_spec = "*",
.components = {},
.source = cargoxx::manifest::DepSource::CargoxxGit,
.git_url = "https://gitea.example/me/mylib",
.git_rev = "0123456789012345678901234567890123456789",
}},
{},
};
REQUIRE(round_trip(m) == m);
}
TEST_CASE("write round-trips description/repository/homepage",
"[manifest][write]") {
auto p = pkg("foo", "0.1.0");
p.description = "demo library";
p.repository = "https://gitea.example/me/foo";
p.homepage = "https://example.com/foo";
Manifest m{p, {}, {}};
REQUIRE(round_trip(m) == m);
}