mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 13:06:01 +01:00
* It is tough to contribute to a project that doesn't use a formatter, * It is extra hard to contribute to a project which has configured the formatter, but ignores it for some files * Code formatting makes it harder to hide obscure / weird bugs by accident or on purpose, Let's rip the bandaid off? Note that PRs currently in flight should be able to be merged relatively easily by applying `clang-format` to their tip prior to merge.
21 lines
409 B
C++
21 lines
409 B
C++
#include "nix/store/store-api.hh"
|
|
#include "nix/expr/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)}};
|
|
}
|
|
|
|
} // namespace nix
|