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

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

#include <descriptor.hh>

Public Member Functions

 ManifestDescriptor (const std::string_view &descriptor)
 
 ManifestDescriptor (const ManifestDescriptorRaw &raw)
 
 ManifestDescriptor (std::string_view installID, const ManifestDescriptorRaw &raw)
 
void check () const
 Ensure that a descriptor has at least name, path, or absPath fields. Throws an exception if the descriptor is invalid.
 
void clear ()
 Reset to default state.
 
pkgdb::PkgQueryArgs & fillPkgQueryArgs (pkgdb::PkgQueryArgs &pqa) const
 Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages.
 

Public Attributes

std::optional< std::string > name
 
bool optional = false
 
std::optional< GroupNamegroup
 
std::optional< std::string > version
 
std::optional< std::string > semver
 
std::optional< Subtree > subtree
 
std::optional< std::vector< System > > systems
 
std::optional< flox::AttrPathpath
 
std::optional< nix::FlakeRef > input
 
unsigned priority = 5
 

Detailed Description

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

May either be defined as a set of attributes or with a string matching this syntax: [<input>:]((<attr>.)+<attrName>)|(<pname>|<attrName>|<name>)[@(<semver>|=<version>)]

Member Function Documentation

◆ fillPkgQueryArgs()

pkgdb::PkgQueryArgs & flox::resolver::ManifestDescriptor::fillPkgQueryArgs ( pkgdb::PkgQueryArgs &  pqa) const

Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages.

NOTE: This DOES NOT clear pqa before filling it. This is intended to be used after filling pqa with global preferences.

Parameters
pqaA set of query args to fill with preferences.
Returns
A reference to the modified query args.

Member Data Documentation

◆ group

std::optional<GroupName> flox::resolver::ManifestDescriptor::group

Named group that the package is a member of.

◆ input

std::optional<nix::FlakeRef> flox::resolver::ManifestDescriptor::input

Force resolution in a given input, flake reference.

◆ name

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

Match name, pname, or attrName

◆ optional

bool flox::resolver::ManifestDescriptor::optional = false

Whether resolution is allowed to fail without producing errors.

◆ path

std::optional<flox::AttrPath> flox::resolver::ManifestDescriptor::path

Match a relative attribute path.

◆ priority

unsigned flox::resolver::ManifestDescriptor::priority = 5

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.

◆ semver

std::optional<std::string> flox::resolver::ManifestDescriptor::semver

Match a semantic version range.

◆ subtree

std::optional<Subtree> flox::resolver::ManifestDescriptor::subtree

Match a subtree.

◆ systems

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

Only resolve for a given set of systems.

◆ version

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

Match version.


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