[M5+] wire resolver::discover into cargoxx add
This commit is contained in:
@@ -115,4 +115,25 @@ struct VerifyLinkRequest {
|
||||
auto verify_link(const VerifyLinkRequest& req, const BuildFn& build_fn)
|
||||
-> util::Result<void>;
|
||||
|
||||
// What discover() returns: the verified Recipe and a tag identifying
|
||||
// which probe yielded it ("conan", "vcpkg", or "nix-probe").
|
||||
struct Discovered {
|
||||
linkdb::Recipe recipe;
|
||||
std::string source;
|
||||
};
|
||||
|
||||
// Walks the full auto-resolution chain for a package not present in the
|
||||
// curated linkdb or the user's overlay:
|
||||
// 1. nixpkgs_probe(name) — confirms the attribute exists, captures
|
||||
// version + out_path
|
||||
// 2. for each of conan_probe, vcpkg_probe, nix_cmake_scan(out_path,…):
|
||||
// build a candidate linkdb::Recipe, run verify_link on it, return
|
||||
// on first success
|
||||
// 3. all candidates failed → ResolutionUnsatisfiable
|
||||
auto discover(const std::string& name, const std::string& version_spec,
|
||||
const std::vector<std::string>& components,
|
||||
const std::filesystem::path& overlay_path,
|
||||
const std::filesystem::path& scratch_root, const BuildFn& build_fn)
|
||||
-> util::Result<Discovered>;
|
||||
|
||||
} // namespace cargoxx::resolver
|
||||
|
||||
Reference in New Issue
Block a user