15#include <nix/flake/flake.hh>
18#include <nlohmann/json.hpp>
38 .recreateLockFile =
false
40 .updateLockFile =
false,
41 .writeLockFile =
false,
42 .useRegistries = std::nullopt
44 .applyNixConfig =
false
48 .commitLockFile =
false
50 .referenceLockFilePath = std::nullopt
52 .outputLockFilePath = std::nullopt
71class FloxFlake :
public std::enable_shared_from_this<FloxFlake>
81 std::shared_ptr<nix::eval_cache::EvalCache>
_cache;
85 nix::ref<nix::EvalState> state;
86 const nix::flake::LockedFlake lockedFlake;
88 FloxFlake(
const nix::ref<nix::EvalState> & state,
89 const nix::FlakeRef & ref );
96 nix::ref<nix::eval_cache::EvalCache>
130 "error locking flake" )
Definition: flox-flake.hh:72
MaybeCursor maybeOpenCursor(const AttrPath &path)
Definition: flox-flake.cc:94
std::shared_ptr< nix::eval_cache::EvalCache > _cache
Definition: flox-flake.hh:81
Cursor openCursor(const AttrPath &path)
Definition: flox-flake.cc:109
nix::ref< nix::eval_cache::EvalCache > openEvalCache()
Definition: flox-flake.cc:64
An exception thrown when locking a flake.
Definitions of various std::exception children used for throwing errors with nice messages and typed ...
#define FLOX_DEFINE_EXCEPTION(NAME, ERROR_CODE, CATEGORY_MSG)
Generate a class definition with an error code and category message.
Definition: exceptions.hh:206
Interfaces for use by flox.
Definition: command.cc:29
std::shared_ptr< nix::eval_cache::AttrCursor > MaybeCursor
A std::shared_ptr<nix::eval_cache::AttrCursor> which may be nullptr.
Definition: types.hh:47
static const nix::flake::LockFlags defaultLockFlags
Definition: flox-flake.hh:37
@ EC_NIX_LOCK_FLAKE
Definition: exceptions.hh:53
nix::ref< nix::eval_cache::AttrCursor > Cursor
A non-nullptr std::shared_ptr<nix::eval_cache::AttrCursor>.
Definition: types.hh:50
std::vector< std::string > AttrPath
A list of key names addressing a location in a nested JSON-like object.
Definition: types.hh:33
Manages a nix runtime state blob with associated helpers.
Miscellaneous typedefs and aliases.