nix dump-path: Add
This is primarily useful for extracting NARs from other stores (like binary caches), which "nix-store --dump" cannot do.
This commit is contained in:
parent
44309c5067
commit
2da6a42448
3 changed files with 55 additions and 0 deletions
|
|
@ -129,4 +129,14 @@ void StorePathsCommand::run(ref<Store> store)
|
|||
run(store, storePaths);
|
||||
}
|
||||
|
||||
void StorePathCommand::run(ref<Store> store)
|
||||
{
|
||||
auto storePaths = buildInstallables(store, false);
|
||||
|
||||
if (storePaths.size() != 1)
|
||||
throw UsageError("this command requires exactly one store path");
|
||||
|
||||
run(store, *storePaths.begin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue