These methods would previously fail on the other `Installable`s, so moving them to this class is more correct as to where they actually work. Additionally, a `InstallableValueCommand` is created to make it easier (or rather no worse than before) to write commands that just work on `InstallableValue`s. Besides being a cleanup to avoid failing default methods, this gets us closer to https://github.com/NixOS/rfcs/pull/134.
13 lines
283 B
C++
13 lines
283 B
C++
#include "installable-value.hh"
|
|
#include "command.hh"
|
|
|
|
namespace nix {
|
|
|
|
struct InstallableValueCommand : InstallableCommand
|
|
{
|
|
virtual void run(ref<Store> store, ref<InstallableValue> installable) = 0;
|
|
|
|
void run(ref<Store> store, ref<Installable> installable) override;
|
|
};
|
|
|
|
}
|