aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-17 19:45:21 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-01-18 14:08:49 +0100
commit4dda1f92aae05dd9d633152458d65a3815bcd03c (patch)
tree84260b953cb80933b0a10a6db52dd2c9dfde5668 /src/libcmd/command.hh
parent6448ea84ab537600d3f350867063bc305b3bb910 (diff)
Add command 'nix store copy-log'
Fixes #5222.
Diffstat (limited to 'src/libcmd/command.hh')
-rw-r--r--src/libcmd/command.hh30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh
index 0c3e29e25..bd2a0a7ee 100644
--- a/src/libcmd/command.hh
+++ b/src/libcmd/command.hh
@@ -43,6 +43,19 @@ private:
std::shared_ptr<Store> _store;
};
+/* A command that copies something between `--from` and `--to`
+ stores. */
+struct CopyCommand : virtual StoreCommand
+{
+ std::string srcUri, dstUri;
+
+ CopyCommand();
+
+ ref<Store> createStore() override;
+
+ ref<Store> getDstStore();
+};
+
struct EvalCommand : virtual StoreCommand, MixEvalArgs
{
EvalCommand();
@@ -176,23 +189,6 @@ public:
bool useDefaultInstallables() override { return !all; }
};
-/* A command that copies something between `--from` and `--to`
- stores. */
-struct CopyCommand : virtual BuiltPathsCommand
-{
- std::string srcUri, dstUri;
-
- CopyCommand();
-
- ref<Store> createStore() override;
-
- void run(ref<Store> store) override;
-
- void run(ref<Store> srcStore, BuiltPaths && paths) override;
-
- virtual void run(ref<Store> srcStore, ref<Store> dstStore, BuiltPaths && paths) = 0;
-};
-
struct StorePathsCommand : public BuiltPathsCommand
{
StorePathsCommand(bool recursive = false);