|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
Classes | |
| struct | PathResult |
Public Member Functions | |
| EvalPaths (AsyncIoRoot &aio, const ref< Store > &store, SearchPath searchPath, EvalErrorContext &errors) | |
| const SearchPath & | searchPath () const |
| void | allowPath (const Path &path) |
| void | allowPath (const StorePath &storePath) |
| void | allowAndSetStorePathString (const StorePath &storePath, Value &v) |
| CheckedSourcePath | checkSourcePath (const SourcePath &path) |
| CheckedSourcePath | resolveExprPath (SourcePath path) |
| void | checkURI (const std::string &uri) |
| Path | toRealPath (const Path &path, const NixStringContext &context) |
| kj::Promise< Result< PathResult< SourcePath, ThrownError > > > | findFile (const std::string_view path) |
| kj::Promise< Result< PathResult< SourcePath, ThrownError > > > | findFile (const SearchPath &searchPath, const std::string_view path, const PosIdx pos=noPos) |
| kj::Promise< Result< std::optional< std::string > > > | resolveSearchPathPath (const SearchPath::Path &path) |
| kj::Promise< Result< PathResult< StorePath, EvalError > > > | copyPathToStore (NixStringContext &context, const SourcePath &path, RepairFlag repair=NoRepair) |
| void | mkStorePathString (const StorePath &storePath, Value &v) |
Allow access to a store path and return it as a string.
| void nix::EvalPaths::allowPath | ( | const Path & | path | ) |
Allow access to a path.
| void nix::EvalPaths::allowPath | ( | const StorePath & | storePath | ) |
Allow access to a store path. Note that this gets remapped to the real store path if store is a chroot store.
| CheckedSourcePath nix::EvalPaths::checkSourcePath | ( | const SourcePath & | path | ) |
Check whether access to a path is allowed and throw an error if not. Otherwise return the canonicalised path.
| kj::Promise< Result< EvalPaths::PathResult< SourcePath, ThrownError > > > nix::EvalPaths::findFile | ( | const std::string_view | path | ) |
Look up a file in the search path.
Create a string representing a store path.
The string is the printed store path with a context containing a single NixStringContextElem::Opaque element of that store path.
| CheckedSourcePath nix::EvalPaths::resolveExprPath | ( | SourcePath | path | ) |
If path refers to a directory, then append "/default.nix".
| kj::Promise< Result< std::optional< std::string > > > nix::EvalPaths::resolveSearchPathPath | ( | const SearchPath::Path & | path | ) |
Try to resolve a search path value (not the optinal key part)
If the specified search path element is a URI, download it.
If it is not found, return std::nullopt
When using a diverted store and 'path' is in the Nix store, map 'path' to the diverted location (e.g. /nix/store/foo is mapped to /home/alice/my-nix/nix/store/foo). However, this is only done if the context is not empty, since otherwise we're probably trying to read from the actual /nix/store. This is intended to distinguish between import-from-derivation and sources stored in the actual /nix/store.