Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
A set of user inputs used to set input preferences and query parameters during resolution. More...
#include <functional>
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
#include "flox/core/types.hh"
#include "flox/pkgdb/pkg-query.hh"
#include "flox/registry.hh"
Go to the source code of this file.
Classes | |
struct | flox::resolver::ManifestDescriptorRaw |
A set of user defined requirements describing a package/dependency. More... | |
struct | flox::resolver::ManifestDescriptor |
A set of user defined requirements describing a package/dependency. More... | |
Namespaces | |
namespace | flox |
Interfaces for use by flox . | |
Typedefs | |
using | flox::resolver::GroupName = std::string |
A named group which a descriptor/package can be a member of. | |
Functions | |
void | flox::resolver::from_json (const nlohmann::json &jfrom, ManifestDescriptorRaw &descriptor) |
Convert a JSON object to an flox::ManifestDescriptorRaw. | |
void | flox::resolver::to_json (nlohmann::json &jto, const ManifestDescriptorRaw &descriptor) |
Convert an flox::resolver::ManifestDescriptorRaw to a JSON object. | |
bool | flox::resolver::globInAttrName (const AttrPathGlob &attrs) |
Validates a single attribute name, pname , etc from a globbed flox::AttrPathGlob, returning the attribute name if it is suitable for appearing as a single attribute in a descriptor. | |
std::vector< std::string > | flox::resolver::validatedRelativePath (const AttrPathGlob &attrs, const std::vector< std::string > &strings) |
Validates a relative attribute path from a globbed flox::AttrPathGlob, returning the string form of the relative path for use in the flox::resolver::ManifestDescriptorRaw. | |
AttrPathGlob | flox::resolver::validatedAbsolutePath (const AttrPathGlob &attrs) |
Validates an absolute path from a globbed flox::AttrPathGlob, returning the attribute path if it is suitable for an absolute path appearing in a descriptor. | |
bool | flox::resolver::isAbsolutePath (const AttrPathGlob &attrs) |
Returns true if the attribute path has enough path components and begins with one of the allowed prefixes (legacyPackages or packages ). | |
void | flox::resolver::to_json (nlohmann::json &jto, const ManifestDescriptor &descriptor) |
Convert an flox::resolver::ManifestDescriptor to a JSON object. | |
A set of user inputs used to set input preferences and query parameters during resolution.
std bool flox::resolver::globInAttrName | ( | const AttrPathGlob & | attrs | ) |
Validates a single attribute name, pname
, etc from a globbed flox::AttrPathGlob, returning the attribute name if it is suitable for appearing as a single attribute in a descriptor.
Returns true if any component in the attribute path contains a glob but is not itself entirely a glob. For example, this would return true
for foo.b*ar.baz
, but not for foo.*.baz
since b*ar
contains a glob, but is not itself entirely a glob.