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
|
|
@ -118,6 +118,16 @@ public:
|
|||
bool useDefaultInstallables() override { return !all; }
|
||||
};
|
||||
|
||||
/* A command that operates on exactly one store path. */
|
||||
struct StorePathCommand : public InstallablesCommand
|
||||
{
|
||||
using StoreCommand::run;
|
||||
|
||||
virtual void run(ref<Store> store, const Path & storePath) = 0;
|
||||
|
||||
void run(ref<Store> store) override;
|
||||
};
|
||||
|
||||
typedef std::map<std::string, ref<Command>> Commands;
|
||||
|
||||
/* An argument parser that supports multiple subcommands,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue