mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Create default Store::narFromPath implementation in terms of getFSAccessor
This is a good default (the methods that allow for an arbitrary choice of source accessor are generally preferable both to implement and to use). And it also pays its way by allowing us to delete *both* the `DummyStore` and `LocalStore` implementations.
This commit is contained in:
parent
c5515bb22e
commit
dd716dc9be
8 changed files with 11 additions and 24 deletions
|
|
@ -300,6 +300,13 @@ ValidPathInfo Store::addToStoreSlow(
|
|||
return info;
|
||||
}
|
||||
|
||||
void Store::narFromPath(const StorePath & path, Sink & sink)
|
||||
{
|
||||
auto accessor = requireStoreObjectAccessor(path);
|
||||
SourcePath sourcePath{accessor};
|
||||
dumpPath(sourcePath, sink, FileSerialisationMethod::NixArchive);
|
||||
}
|
||||
|
||||
StringSet Store::Config::getDefaultSystemFeatures()
|
||||
{
|
||||
auto res = settings.systemFeatures.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue