mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 00:12:43 +01:00
nix_api_store: add userdata param to nix_store_build
This commit is contained in:
parent
1e583c4ebd
commit
1777e4a5bb
2 changed files with 8 additions and 3 deletions
|
|
@ -93,7 +93,9 @@ StorePath *nix_store_parse_path(nix_c_context *context, Store *store,
|
|||
}
|
||||
|
||||
nix_err nix_store_build(nix_c_context *context, Store *store, StorePath *path,
|
||||
void (*iter)(const char *, const char *)) {
|
||||
void *userdata,
|
||||
void (*iter)(void *userdata, const char *,
|
||||
const char *)) {
|
||||
if (context)
|
||||
context->last_err_code = NIX_OK;
|
||||
try {
|
||||
|
|
@ -107,7 +109,7 @@ nix_err nix_store_build(nix_c_context *context, Store *store, StorePath *path,
|
|||
for (auto &[outputName, outputPath] :
|
||||
store->ptr->queryDerivationOutputMap(path->path)) {
|
||||
auto op = store->ptr->printStorePath(outputPath);
|
||||
iter(outputName.c_str(), op.c_str());
|
||||
iter(userdata, outputName.c_str(), op.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue