mirror of
https://github.com/NixOS/nix
synced 2025-07-04 07:11:47 +02:00
Add nix_store_copy_closure to libstore-c
This commit is contained in:
parent
0bcc83d0e7
commit
5d28a00322
2 changed files with 22 additions and 0 deletions
|
@ -144,3 +144,15 @@ StorePath * nix_store_path_clone(const StorePath * p)
|
|||
{
|
||||
return new StorePath{p->path};
|
||||
}
|
||||
|
||||
nix_err nix_store_copy_closure(nix_c_context * context, Store * srcStore, Store * dstStore, StorePath * path)
|
||||
{
|
||||
if (context)
|
||||
context->last_err_code = NIX_OK;
|
||||
try {
|
||||
nix::RealisedPath::Set paths;
|
||||
paths.insert(path->path);
|
||||
nix::copyClosure(*srcStore->ptr, *dstStore->ptr, paths);
|
||||
}
|
||||
NIXC_CATCH_ERRS
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue