[M5+] realize candidate output before nix-cmake-scan
This commit is contained in:
@@ -33,6 +33,18 @@ auto parse_nix_eval_json(std::string_view attr, std::string_view json)
|
||||
// `ResolutionNetworkError` on timeout or evaluator errors.
|
||||
auto nixpkgs_probe(const std::string& attr) -> util::Result<NixpkgsInfo>;
|
||||
|
||||
// Materializes a flake attribute on disk by shelling out to
|
||||
// nix build --no-link --print-out-paths nixpkgs#<flake_attr>
|
||||
// and returns the absolute store path. The eval-only `nixpkgs_probe`
|
||||
// computes the path the output *would* have, but it isn't actually
|
||||
// present on disk until it's been built / fetched from the binary
|
||||
// cache; nix_cmake_scan needs it on disk to walk lib/cmake. Use
|
||||
// `realize_path("libclang.dev")` to scan a dev output, etc.
|
||||
//
|
||||
// `ResolutionUnknownPackage` for unknown attrs, `ResolutionNetworkError`
|
||||
// for build / network errors.
|
||||
auto realize_path(const std::string& flake_attr) -> util::Result<std::string>;
|
||||
|
||||
// One CMake config-file's IMPORTED targets together with the find_package
|
||||
// expression derived from its filename stem.
|
||||
struct NixCmakeCandidate {
|
||||
|
||||
Reference in New Issue
Block a user