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

A simple flox::RegistryInput that opens a nix evaluator for a flake. More...

#include <registry.hh>

Inheritance diagram for flox::FloxFlakeInput:
flox::RegistryInput flox::InputPreferences flox::pkgdb::PkgDbInput

Public Member Functions

 FloxFlakeInput (const nix::ref< nix::Store > &store, const RegistryInput &input)
 Construct a flox::FloxFlakeInput from a nix store connection and flox::RegistryInput.
 
nix::ref< FloxFlakegetFlake ()
 Get a handle for a flake with a nix evaluator.
 
const std::vector< Subtree > & getSubtrees ()
 Get a list of enabled subtrees.
 
RegistryInput getLockedInput ()
 
- Public Member Functions inherited from flox::RegistryInput
 RegistryInput (const std::optional< std::vector< Subtree > > &subtrees, const nix::FlakeRef &from)
 
 RegistryInput (const nix::FlakeRef &from)
 
nix::ref< nix::FlakeRef > getFlakeRef () const
 Get the flake reference associated with this input.
 
bool operator== (const RegistryInput &other) const
 
bool operator!= (const RegistryInput &other) const
 
- Public Member Functions inherited from flox::InputPreferences
 InputPreferences (const InputPreferences &)=default
 
 InputPreferences (InputPreferences &&)=default
 
InputPreferencesoperator= (const InputPreferences &)=default
 
InputPreferencesoperator= (InputPreferences &&)=default
 
 InputPreferences (const std::optional< std::vector< Subtree > > &subtrees)
 
virtual void clear ()
 Reset to default state.
 
pkgdb::PkgQueryArgs & fillPkgQueryArgs (pkgdb::PkgQueryArgs &pqa) const
 Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages filtered by InputPreferences requirements.
 
void merge (const InputPreferences &overrides)
 Merges this flox::InputPreferences with another InputPreferences, overriding values in this InputPreferences with those from the other InputPreferences.
 
bool operator== (const InputPreferences &other) const
 
bool operator!= (const InputPreferences &other) const
 

Private Attributes

nix::ref< nix::Store > store
 
std::shared_ptr< FloxFlakeflake
 
std::optional< std::vector< Subtree > > enabledSubtrees
 

Additional Inherited Members

- Public Attributes inherited from flox::RegistryInput
std::shared_ptr< nix::FlakeRef > from
 
- Public Attributes inherited from flox::InputPreferences
std::optional< std::vector< Subtree > > subtrees
 

Detailed Description

A simple flox::RegistryInput that opens a nix evaluator for a flake.

Member Function Documentation

◆ getSubtrees()

const std::vector< Subtree > & flox::FloxFlakeInput::getSubtrees ( )

Get a list of enabled subtrees.

If the user has explicitly defined a list of subtrees, then simply use that list. If the list is undefined, pick the first of:

  1. "package"
  2. "legacyPackages"

Member Data Documentation

◆ enabledSubtrees

std::optional<std::vector<Subtree> > flox::FloxFlakeInput::enabledSubtrees
private

List of subtrees allowed by preferences, or defaults. This caches the result of getSubtrees().

◆ flake

std::shared_ptr<FloxFlake> flox::FloxFlakeInput::flake
private

A flake with an evaluator.

◆ store

nix::ref<nix::Store> flox::FloxFlakeInput::store
private

A nix store connection.


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