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

Provides a registry of PkgDb managers. More...

#include <input.hh>

Inheritance diagram for flox::pkgdb::PkgDbRegistryMixin:
flox::NixStoreMixin

Public Member Functions

nix::ref< Registry< PkgDbInputFactory > > getPkgDbRegistry ()
 Get the set of package databases to resolve in.
 
bool isPkgDbForced () const
 Whether DBs will be regenerated from scratch.
 
void setPkgDbForced (bool force)
 Set whether DBs will be regenerated from scratch.
 

Protected Member Functions

void initRegistry ()
 Initialize registry member from params.registry.
 
void scrapeIfNeeded ()
 Lazily perform scraping on input flakes.
 
virtual RegistryRaw getRegistryRaw ()=0
 
virtual const std::vector< System > & getSystems ()=0
 
- Protected Member Functions inherited from flox::NixStoreMixin
 NixStoreMixin (const NixStoreMixin &)=default
 
 NixStoreMixin (NixStoreMixin &&)=default
 
NixStoreMixinoperator= (const NixStoreMixin &)=default
 
NixStoreMixinoperator= (NixStoreMixin &&)=default
 
 NixStoreMixin (const nix::ref< nix::Store > &store)
 Construct NixStoreMixin from an existing store connection.
 
 NixStoreMixin ()
 Construct NixStoreMixin using the systems default nix store.
 
nix::ref< nix::Store > getStore ()
 Lazily open a nix store connection.
 

Private Attributes

std::shared_ptr< Registry< PkgDbInputFactory > > registry
 
bool force = false
 

Detailed Description

Provides a registry of PkgDb managers.

Derived classes must provide their own getRegistryRaw and getSystems implementations to support initRegistry and scrapeIfNeeded.

Member Function Documentation

◆ getPkgDbRegistry()

nix::ref< Registry< PkgDbInputFactory > > flox::pkgdb::PkgDbRegistryMixin::getPkgDbRegistry ( )

Get the set of package databases to resolve in.

This lazily initializes the registry and scrapes inputs when necessary.

◆ getRegistryRaw()

virtual RegistryRaw flox::pkgdb::PkgDbRegistryMixin::getRegistryRaw ( )
protectedpure virtual
Returns
A raw registry used to initialize.

◆ getSystems()

virtual const std::vector< System > & flox::pkgdb::PkgDbRegistryMixin::getSystems ( )
protectedpure virtual
Returns
A list of systems to be scraped.

◆ scrapeIfNeeded()

void flox::pkgdb::PkgDbRegistryMixin::scrapeIfNeeded ( )
protected

Lazily perform scraping on input flakes.

If scraping is necessary temprorary read/write handles are opened for those flakes and closed before returning from this function.

Member Data Documentation

◆ force

bool flox::pkgdb::PkgDbRegistryMixin::force = false
private

Whether to force re-evaluation of flakes.


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