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

Evaluate a nix expression with flox extensions. More...

#include <eval.hh>

Inheritance diagram for flox::EvalCommand:
flox::NixState

Public Member Functions

command::VerboseParsergetParser ()
 
int run ()
 Execute the eval routine.
 

Private Types

enum  output_style { STYLE_VALUE , STYLE_RAW , STYLE_JSON }
 

Private Attributes

command::VerboseParser parser
 
output_style style = STYLE_VALUE
 
std::optional< std::filesystem::path > file
 
std::optional< std::string > expr
 

Additional Inherited Members

- Private Member Functions inherited from flox::NixState
 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.
 
- Private 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.
 

Detailed Description

Evaluate a nix expression with flox extensions.

Member Enumeration Documentation

◆ output_style

Enumerator
STYLE_VALUE 

Emit nix values.

STYLE_RAW 

Emit strings without quotes.

STYLE_JSON 

Emit JSON.

Member Function Documentation

◆ run()

int flox::EvalCommand::run ( )

Execute the eval routine.

Returns
EXIT_SUCCESS or EXIT_FAILURE.

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