Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
flox::resolver::ManifestDescriptorRaw Struct Reference

A set of user defined requirements describing a package/dependency. More...

#include <descriptor.hh>

Public Types

using Path = std::variant< std::string, flox::AttrPath >
 A dot separated attribut path, or list representation.
 
using AbsPath = std::variant< std::string, AttrPathGlob >
 A dot separated attribut path, or list representation. May contain null members to represent globs.
 

Public Member Functions

void check (const std::string iid="*") const
 Ensure that a raw descriptor's fields are valid or throws an exception if the descriptor is invalid.
 
void clear ()
 Reset to default/empty state.
 
 ManifestDescriptorRaw (const std::string_view &descriptor)
 

Public Attributes

std::optional< std::string > name
 
std::optional< std::string > version
 
std::optional< Pathpath
 
std::optional< AbsPathabsPath
 
std::optional< std::vector< System > > systems
 
std::optional< bool > optional
 
std::optional< GroupNamepackageGroup
 
std::optional< std::variant< std::string, nix::fetchers::Attrs > > packageRepository
 
std::optional< unsigned > priority
 

Static Public Attributes

static const auto inputSigil = ':'
 
static const auto versionSigil = '@'
 
static const auto exactVersionSigil = '='
 

Detailed Description

A set of user defined requirements describing a package/dependency.

This raw struct is defined to generate parsers. The real form is flox::resolver::ManifestDescriptor.

Member Typedef Documentation

◆ AbsPath

A dot separated attribut path, or list representation. May contain null members to represent globs.

NOTE: AttrPathGlob is a std::vector<std::optional<std::string>> which represnts an absolute attribute path which may have std::nullopt as its second element to avoid indicating a particular system.

Member Function Documentation

◆ check()

void flox::resolver::ManifestDescriptorRaw::check ( const std::string  iid = "*") const

Ensure that a raw descriptor's fields are valid or throws an exception if the descriptor is invalid.

This requires that the abspath field is valid, and consistent with path and/or systems fields if they are set.

Member Data Documentation

◆ absPath

std::optional<AbsPath> flox::resolver::ManifestDescriptorRaw::absPath

Match an absolute path, allowing globs for system.

◆ exactVersionSigil

const auto flox::resolver::ManifestDescriptorRaw::exactVersionSigil = '='
static

The signifier that the version should be treated exactly i.e. not a semver range

◆ inputSigil

const auto flox::resolver::ManifestDescriptorRaw::inputSigil = ':'
static

The delimiter for providing an input when the descriptor is a string

◆ name

std::optional<std::string> flox::resolver::ManifestDescriptorRaw::name

Match name, pname, or attrName. Maps to flox::pkgdb::PkgQueryArgs::pnameOrAttrName.

◆ optional

std::optional<bool> flox::resolver::ManifestDescriptorRaw::optional

Whether resoution is allowed to fail without producing errors.

◆ packageGroup

std::optional<GroupName> flox::resolver::ManifestDescriptorRaw::packageGroup

Named group that the package is a member of.

◆ packageRepository

std::optional<std::variant<std::string, nix::fetchers::Attrs> > flox::resolver::ManifestDescriptorRaw::packageRepository

Force resolution is the named input or flake reference.

◆ path

std::optional<Path> flox::resolver::ManifestDescriptorRaw::path

Match a relative path.

◆ priority

std::optional<unsigned> flox::resolver::ManifestDescriptorRaw::priority

Rank a package's priority for handling conflicting files. The default value is 5 ( set in flox::resolver::ManifestDescriptor ).

Packages with higher priority values will take precendence over those with lower priority values.

◆ systems

std::optional<std::vector<System> > flox::resolver::ManifestDescriptorRaw::systems

Only resolve for a given set of systems.

◆ version

std::optional<std::string> flox::resolver::ManifestDescriptorRaw::version

Match version or semver if a modifier is present.

Strings beginning with an = will filter by exact match on version. Any string which may be interpreted as a semantic version range will filter on the semver field. All other strings will filter by exact match on version.

◆ versionSigil

const auto flox::resolver::ManifestDescriptorRaw::versionSigil = '@'
static

The delimiter for specifying a version when the descriptor is a string


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