mirror of
https://github.com/NixOS/nix
synced 2025-07-05 16:31:47 +02:00
Make getDstStore() a virtual method in StoreCommand
This commit is contained in:
parent
76f75e7691
commit
43ad8c5eb2
6 changed files with 26 additions and 21 deletions
|
@ -45,7 +45,20 @@ struct StoreCommand : virtual Command
|
|||
{
|
||||
StoreCommand();
|
||||
void run() override;
|
||||
|
||||
/**
|
||||
* Return the default Nix store.
|
||||
*/
|
||||
ref<Store> getStore();
|
||||
|
||||
/**
|
||||
* Return the destination Nix store.
|
||||
*/
|
||||
virtual ref<Store> getDstStore()
|
||||
{
|
||||
return getStore();
|
||||
}
|
||||
|
||||
virtual ref<Store> createStore();
|
||||
/**
|
||||
* Main entry point, with a `Store` provided
|
||||
|
@ -68,7 +81,7 @@ struct CopyCommand : virtual StoreCommand
|
|||
|
||||
ref<Store> createStore() override;
|
||||
|
||||
ref<Store> getDstStore();
|
||||
ref<Store> getDstStore() override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -301,15 +314,11 @@ struct MixProfile : virtual StoreCommand
|
|||
MixProfile();
|
||||
|
||||
/* If 'profile' is set, make it point at 'storePath'. */
|
||||
void updateProfile(
|
||||
const StorePath & storePath,
|
||||
ref<Store> store);
|
||||
void updateProfile(const StorePath & storePath);
|
||||
|
||||
/* If 'profile' is set, make it point at the store path produced
|
||||
by 'buildables'. */
|
||||
void updateProfile(
|
||||
const BuiltPaths & buildables,
|
||||
ref<Store> store);
|
||||
void updateProfile(const BuiltPaths & buildables);
|
||||
};
|
||||
|
||||
struct MixDefaultProfile : MixProfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue