nix-super/src/nix/store.cc

27 lines
581 B
C++
Raw Normal View History

2020-12-03 19:06:46 +02:00
#include "command.hh"
using namespace nix;
struct CmdStore : virtual NixMultiCommand
{
CmdStore() : MultiCommand(RegisterCommand::getCommandsFor({"store"}))
{ }
std::string description() override
{
return "manipulate a Nix store";
}
Category category() override { return catUtility; }
void run() override
{
if (!command)
throw UsageError("'nix store' requires a sub-command.");
command->second->prepare();
command->second->run();
}
};
static auto rCmdStore = registerCommand<CmdStore>("store");