mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-28 16:46:16 +02:00
18 lines
417 B
C++
18 lines
417 B
C++
|
#include "store-path-accessor.hh"
|
||
|
#include "store-api.hh"
|
||
|
|
||
|
namespace nix {
|
||
|
|
||
|
ref<SourceAccessor> makeStorePathAccessor(
|
||
|
ref<Store> store,
|
||
|
const StorePath & storePath)
|
||
|
{
|
||
|
// FIXME: should use `store->getFSAccessor()`
|
||
|
auto root = std::filesystem::path { store->toRealPath(storePath) };
|
||
|
auto accessor = makeFSSourceAccessor(root);
|
||
|
accessor->setPathDisplay(root.string());
|
||
|
return accessor;
|
||
|
}
|
||
|
|
||
|
}
|