aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/ssh-store.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-11 11:06:18 +0200
committerregnat <rg@regnat.ovh>2020-09-16 13:53:09 +0200
commit5895184df44e86ae55270390402c8263b0f24ae2 (patch)
tree0866ef276909936e47d67172708563c701ccf47e /src/libstore/ssh-store.cc
parentd184ad1d276006d4d003046710a56a019034a6a1 (diff)
Correctly call all the parent contructors of the stores
Using virtual inheritance means that only the default constructors of the parent classes will be called, which isn't what we want
Diffstat (limited to 'src/libstore/ssh-store.cc')
-rw-r--r--src/libstore/ssh-store.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc
index 2b6e2a298..da201a9c3 100644
--- a/src/libstore/ssh-store.cc
+++ b/src/libstore/ssh-store.cc
@@ -11,20 +11,23 @@ namespace nix {
struct SSHStoreConfig : virtual RemoteStoreConfig
{
using RemoteStoreConfig::RemoteStoreConfig;
+
const Setting<Path> sshKey{(StoreConfig*) this, "", "ssh-key", "path to an SSH private key"};
const Setting<bool> compress{(StoreConfig*) this, false, "compress", "whether to compress the connection"};
const Setting<Path> remoteProgram{(StoreConfig*) this, "nix-daemon", "remote-program", "path to the nix-daemon executable on the remote system"};
const Setting<std::string> remoteStore{(StoreConfig*) this, "", "remote-store", "URI of the store on the remote system"};
};
-class SSHStore : public RemoteStore, public virtual SSHStoreConfig
+class SSHStore : public virtual RemoteStore, public virtual SSHStoreConfig
{
public:
SSHStore(const std::string & host, const Params & params)
- : Store(params)
+ : StoreConfig(params)
+ , Store(params)
, RemoteStoreConfig(params)
, RemoteStore(params)
+ , SSHStoreConfig(params)
, host(host)
, master(
host,