Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
flox::NixState Class Reference

Runtime state containing a nix store connection and a nix evaluator. More...

#include <nix-state.hh>

Inheritance diagram for flox::NixState:
flox::NixStoreMixin flox::EvalCommand flox::ReplCommand flox::command::InlineInputMixin flox::pkgdb::PkgDbMixin< PkgDbReadOnly > flox::pkgdb::PkgDbMixin< T > flox::pkgdb::ScrapeCommand flox::pkgdb::GetCommand

Public Member Functions

 NixState ()=default
 Construct NixState using the systems default nix store.
 
 NixState (nix::ref< nix::Store > &store)
 Construct NixState from an existing store connection.
 
nix::ref< nix::EvalState > getState ()
 Lazily open a nix evaluator.
 
- Public Member Functions inherited from flox::NixStoreMixin
 NixStoreMixin (const NixStoreMixin &)=default
 
 NixStoreMixin (NixStoreMixin &&)=default
 
NixStoreMixinoperator= (const NixStoreMixin &)=default
 
NixStoreMixinoperator= (NixStoreMixin &&)=default
 
 NixStoreMixin (const nix::ref< nix::Store > &store)
 Construct NixStoreMixin from an existing store connection.
 
 NixStoreMixin ()
 Construct NixStoreMixin using the systems default nix store.
 
nix::ref< nix::Store > getStore ()
 Lazily open a nix store connection.
 

Private Attributes

std::shared_ptr< nix::EvalState > state
 

Detailed Description

Runtime state containing a nix store connection and a nix evaluator.

Constructor & Destructor Documentation

◆ NixState()

flox::NixState::NixState ( nix::ref< nix::Store > &  store)
inlineexplicit

Construct NixState from an existing store connection.

This may be useful if you wish to avoid a non-default store.

Parameters
storeAn open nix store connection.

Member Function Documentation

◆ getState()

nix::ref< nix::EvalState > flox::NixState::getState ( )
inline

Lazily open a nix evaluator.

Evaluator remains open for lifetime of object.

Member Data Documentation

◆ state

std::shared_ptr<nix::EvalState> flox::NixState::state
private

nix evaluator instance.


The documentation for this class was generated from the following file: