|
Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
#include <flox-flake.hh>
Public Member Functions | |
| FloxFlake (const nix::ref< nix::EvalState > &state, const nix::FlakeRef &ref) | |
| nix::ref< nix::eval_cache::EvalCache > | openEvalCache () |
| MaybeCursor | maybeOpenCursor (const AttrPath &path) |
| Cursor | openCursor (const AttrPath &path) |
Public Attributes | |
| nix::ref< nix::EvalState > | state |
| const nix::flake::LockedFlake | lockedFlake |
Private Attributes | |
| std::shared_ptr< nix::eval_cache::EvalCache > | _cache |
A convenience wrapper that provides various operations on a flake.
Notably this class is responsible for a nix EvalState and an EvalCache database associated with a flake.
It is recommended that only one FloxFlake be created for a unique flake to avoid synchronization slowdowns with its databases.
| MaybeCursor flox::FloxFlake::maybeOpenCursor | ( | const AttrPath & | path | ) |
Try to open a nix evaluator cursor at a given path. If there is no such attribute this routine will return nullptr.
| path | The attribute path try opening. |
nullptr iff there is no such path, otherwise a nix::eval_cache::AttrCursor at path. Open a nix evaluator cursor at a given path. If there is no such attribute this routine will throw an error.
| path | The attribute path to open. |
| nix::ref< nix::eval_cache::EvalCache > flox::FloxFlake::openEvalCache | ( | ) |
Open a nix evaluator ( with an eval cache when possible ) with the evaluated flake and its outputs in global scope.
nix evaluator, potentially with caching.
|
private |
A handle for a cached nix evaluator associated with this flake. This is opened lazily by openEvalCache and remains open until this object is destroyed.