Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
eval.hh
Go to the documentation of this file.
1/* ========================================================================== *
2 *
3 * @file flox/eval.hh
4 *
5 * @brief Executable command helpers, argument parsers, etc.
6 *
7 *
8 * -------------------------------------------------------------------------- */
9
10#pragma once
11
12#include <filesystem>
13
14#include <argparse/argparse.hpp>
15
16#include "flox/core/command.hh"
18
19
20/* -------------------------------------------------------------------------- */
21
22namespace flox {
23
24/* -------------------------------------------------------------------------- */
25
28{
29
30private:
31
33
38 }; /* End enum `output_style' */
40
41 std::optional<std::filesystem::path> file;
42 std::optional<std::string> expr;
43
44
45public:
46
48
49 [[nodiscard]] command::VerboseParser &
50 getParser()
51 {
52 return this->parser;
53 }
54
59 int
60 run();
61
62
63}; /* End class `EvalCommand' */
64
65
66/* -------------------------------------------------------------------------- */
67
68} // namespace flox
69
70
71/* -------------------------------------------------------------------------- *
72 *
73 *
74 *
75 * ========================================================================== */
Evaluate a nix expression with flox extensions.
Definition: eval.hh:28
int run()
Execute the eval routine.
Definition: eval.cc:98
output_style
Definition: eval.hh:34
@ STYLE_RAW
Definition: eval.hh:36
@ STYLE_VALUE
Definition: eval.hh:35
@ STYLE_JSON
Definition: eval.hh:37
Runtime state containing a nix store connection and a nix evaluator.
Definition: nix-state.hh:123
Executable command helpers, argument parsers, etc.
Interfaces for use by flox.
Definition: command.cc:29
Manages a nix runtime state blob with associated helpers.
Add verbosity flags to any parser and modify the global verbosity.
Definition: command.hh:49