1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00

Introduce EvalStore::storePath

This abstracts over a common case. Good for brevity, and enabling
further experiments.
This commit is contained in:
John Ericson 2025-02-19 21:15:06 -05:00
parent 782c63fc8e
commit de22f58dfc
5 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,4 @@
#include "store-api.hh"
#include "eval.hh"
namespace nix {
@ -12,4 +13,9 @@ SourcePath EvalState::rootPath(PathView path)
return {rootFS, CanonPath(absPath(path))};
}
SourcePath EvalState::storePath(const StorePath & path)
{
return {rootFS, CanonPath{store->printStorePath(path)}};
}
}