Restructure installables handling in the "nix" command

This commit is contained in:
Eelco Dolstra
2017-04-25 11:20:37 +02:00
parent 1bb87c0487
commit bcecc99007
9 changed files with 265 additions and 132 deletions
+7
View File
@@ -79,6 +79,13 @@ StoreCommand::StoreCommand()
mkFlag(0, "store", "store-uri", "URI of the Nix store to use", &storeUri);
}
ref<Store> StoreCommand::getStore()
{
if (!_store)
_store = createStore();
return ref<Store>(_store);
}
ref<Store> StoreCommand::createStore()
{
return openStore(storeUri);