2023-04-01 03:18:41 +00:00
|
|
|
#pragma once
|
|
|
|
///@file
|
|
|
|
|
2023-02-05 17:16:17 +00:00
|
|
|
#include "installable-value.hh"
|
|
|
|
#include "command.hh"
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
2023-03-27 01:12:25 +00:00
|
|
|
/**
|
|
|
|
* An InstallableCommand where the single positional argument must be an
|
|
|
|
* InstallableValue in particular.
|
|
|
|
*/
|
2023-02-05 17:16:17 +00:00
|
|
|
struct InstallableValueCommand : InstallableCommand
|
|
|
|
{
|
2023-03-27 01:12:25 +00:00
|
|
|
/**
|
|
|
|
* Entry point to this command
|
|
|
|
*/
|
2023-02-05 17:16:17 +00:00
|
|
|
virtual void run(ref<Store> store, ref<InstallableValue> installable) = 0;
|
|
|
|
|
|
|
|
void run(ref<Store> store, ref<Installable> installable) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|