14#include <nlohmann/json_fwd.hpp>
45 std::optional<std::string>
name;
46 std::optional<std::string>
pname;
91 "error parsing search query" )
116 std::variant<std::filesystem::path, resolver::GlobalManifestRaw>>
123 std::optional<std::variant<std::filesystem::path, resolver::ManifestRaw>>
130 std::optional<std::variant<std::filesystem::path, resolver::LockfileRaw>>
144 [[nodiscard]] std::optional<std::filesystem::path>
145 getGlobalManifestPath();
151 [[nodiscard]] std::optional<flox::resolver::GlobalManifestRaw>
152 getGlobalManifestRaw();
158 [[nodiscard]] std::optional<std::filesystem::path>
173 [[nodiscard]] std::optional<std::filesystem::path>
180 [[nodiscard]] std::optional<flox::resolver::LockfileRaw>
An exception thrown when parsing flox::search::SearchQuery from JSON.
A collection of files associated with an environment.
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
A lockfile representing a resolved environment.
An abstract description of an environment in its unresolved state.
Interfaces used to search for packages in flakes.
Definition: command.cc:38
void to_json(nlohmann::json &jto, const SearchQuery &qry)
Convert a JSON object to a flox::search::SearchQuery.
Definition: params.cc:118
@ EC_PARSE_SEARCH_QUERY
Definition: exceptions.hh:61
void from_json(const nlohmann::json &jfrom, RawPackage &pkg)
Convert a JSON object to a flox::RawPackage.
Definition: raw-package.cc:27
Extension to the ‘nlohmann::json’ serializer to support additional Argument Dependent Lookup (ADL) ty...
Definition: util.hh:54
Interfaces for constructing complex ‘Packages’ queries.
A set of user inputs used to set input preferences during search and resolution.
A raw description of an environment to be read from a file.
Definition: manifest-raw.hh:264
Definition: params.hh:109
std::optional< std::variant< std::filesystem::path, resolver::LockfileRaw > > lockfile
The absolute std::filesystem::path to a lockfile or an inline flox::resolver::LockfileRaw.
Definition: params.hh:131
std::optional< std::variant< std::filesystem::path, resolver::ManifestRaw > > manifest
The absolute std::filesystem::path to a manifest file or an inline flox::resolver::ManifestRaw.
Definition: params.hh:124
std::optional< std::variant< std::filesystem::path, resolver::GlobalManifestRaw > > globalManifest
The absolute std::filesystem::path to a manifest file or an inline flox::resolver::GlobalManifestRaw.
Definition: params.hh:117
SearchQuery query
The flox::search::SearchQuery specifying the package to search for.
Definition: params.hh:137
A set of query parameters.
Definition: params.hh:43
std::optional< std::string > pname
Definition: params.hh:46
std::optional< std::string > partialNameMatch
Definition: params.hh:54
pkgdb::PkgQueryArgs & fillPkgQueryArgs(pkgdb::PkgQueryArgs &pqa) const
Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by SearchQuery r...
Definition: params.cc:132
std::optional< std::string > name
Definition: params.hh:45
void clear()
Reset to default state.
Definition: params.cc:21
std::optional< std::string > semver
Definition: params.hh:48
std::optional< std::string > partialMatch
Definition: params.hh:51
std::optional< std::string > version
Definition: params.hh:47
void check() const
Check validity of fields, throwing an exception if invalid.
Definition: params.cc:35
Miscellaneous typedefs and aliases.
Miscellaneous helper functions.