[M6] resolver: pkg-config probe + codegen for PkgConfig
This commit is contained in:
@@ -167,6 +167,18 @@ auto flake_nix(const GenerateInputs& in) -> std::string {
|
||||
|
||||
out += emit_inputs_block(pinned);
|
||||
|
||||
const bool any_pkg_config =
|
||||
std::ranges::any_of(in.recipes,
|
||||
[](const linkdb::Recipe& r) {
|
||||
return r.pkg_config_module &&
|
||||
!r.pkg_config_module->empty();
|
||||
}) ||
|
||||
std::ranges::any_of(in.dev_recipes,
|
||||
[](const linkdb::Recipe& r) {
|
||||
return r.pkg_config_module &&
|
||||
!r.pkg_config_module->empty();
|
||||
});
|
||||
|
||||
out += "\n";
|
||||
out += " outputs = ";
|
||||
out += emit_outputs_params(pinned);
|
||||
@@ -181,8 +193,11 @@ auto flake_nix(const GenerateInputs& in) -> std::string {
|
||||
" version = \"1.0\";\n"
|
||||
" nativeBuildInputs = [\n"
|
||||
" pkgs.ninja\n"
|
||||
" pkgs.cmake\n"
|
||||
" ];\n"
|
||||
" pkgs.cmake\n";
|
||||
if (any_pkg_config) {
|
||||
out += " pkgs.pkg-config\n";
|
||||
}
|
||||
out += " ];\n"
|
||||
" buildInputs = [\n";
|
||||
out += emit_build_inputs(bindings);
|
||||
out += " ];\n"
|
||||
|
||||
Reference in New Issue
Block a user