1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00
nix/src/libexpr/paths.cc
John Ericson de22f58dfc Introduce EvalStore::storePath
This abstracts over a common case. Good for brevity, and enabling
further experiments.
2025-02-19 21:24:26 -05:00

21 lines
373 B
C++

#include "store-api.hh"
#include "eval.hh"
namespace nix {
SourcePath EvalState::rootPath(CanonPath path)
{
return {rootFS, std::move(path)};
}
SourcePath EvalState::rootPath(PathView path)
{
return {rootFS, CanonPath(absPath(path))};
}
SourcePath EvalState::storePath(const StorePath & path)
{
return {rootFS, CanonPath{store->printStorePath(path)}};
}
}