Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
A flox::Package implementation which are pulled from evaluation of a nix
flake.
More...
#include <flake-package.hh>
Public Member Functions | |
FlakePackage (Cursor cursor, const AttrPath &path, bool checkDrv=true) | |
FlakePackage (Cursor cursor, nix::SymbolTable *symtab, bool checkDrv=true) | |
std::vector< std::string > | getOutputsToInstall () const override |
std::optional< bool > | isBroken () const override |
std::optional< bool > | isUnfree () const override |
AttrPath | getPathStrs () const override |
std::string | getFullName () const override |
std::string | getPname () const override |
Cursor | getCursor () const |
Subtree | getSubtreeType () const override |
nix::DrvName | getParsedDrvName () const override |
std::optional< std::string > | getVersion () const override |
std::optional< std::string > | getSemver () const override |
std::optional< std::string > | getLicense () const override |
std::vector< std::string > | getOutputs () const override |
std::optional< std::string > | getDescription () const override |
![]() | |
Package (const Package &)=default | |
Package (Package &&)=default | |
Package & | operator= (const Package &)=default |
Package & | operator= (Package &&)=default |
virtual AttrPath | getPathStrs () const =0 |
virtual std::string | getFullName () const =0 |
virtual std::string | getPname () const =0 |
virtual std::optional< std::string > | getVersion () const =0 |
virtual std::optional< std::string > | getLicense () const =0 |
virtual std::vector< std::string > | getOutputs () const =0 |
virtual std::vector< std::string > | getOutputsToInstall () const =0 |
virtual std::optional< bool > | isBroken () const =0 |
virtual std::optional< bool > | isUnfree () const =0 |
virtual std::optional< std::string > | getDescription () const =0 |
virtual Subtree | getSubtreeType () const |
virtual nix::DrvName | getParsedDrvName () const |
virtual std::optional< std::string > | getSemver () const |
virtual std::string | toURIString (const nix::FlakeRef &ref) const |
Create an installable URI string associated with this package using ref as its input part. | |
virtual nlohmann::json | getInfo (bool withDescription=false) const |
Serialize notable package metadata as a JSON object. | |
Private Member Functions | |
void | init (bool checkDrv=true) |
Private Attributes | |
Cursor | _cursor |
AttrPath | _pathS |
bool | _hasMetaAttr = false |
bool | _hasPnameAttr = false |
bool | _hasVersionAttr = false |
std::string | _fullName |
std::string | _pname |
std::string | _version |
std::optional< std::string > | _semver |
System | _system |
Subtree | _subtree |
std::optional< std::string > | _license |
Friends | |
class | pkgdb::PkgDb |
A flox::Package implementation which are pulled from evaluation of a nix
flake.
|
inlineoverridevirtual |
meta.description
field if defined, otherwise std::nullopt
. Implements flox::Package.
|
inlineoverridevirtual |
name
field. Implements flox::Package.
|
inlineoverridevirtual |
meta.license.spdxId
field if defined, otherwise std::nullopt
Implements flox::Package.
|
inlineoverridevirtual |
outputs
list. Implements flox::Package.
|
overridevirtual |
meta.outputsToInstall
field if defined, otherwise the derivation outputs
members to the left of and including out
. Implements flox::Package.
|
inlineoverridevirtual |
name
field. Reimplemented from flox::Package.
|
inlineoverridevirtual |
Implements flox::Package.
|
inlineoverridevirtual |
pname
is defined then pname
, otherwise the name
field stripped of is version part as recognized by nix::DrvName
parsing rules. Implements flox::Package.
|
inlineoverridevirtual |
std::nullopt
iff this package does not use semantic versioning, otherwise a normalized semantic version number coerces from this package's version
information. Reimplemented from flox::Package.
|
inlineoverridevirtual |
outputs
subtree the package resides in, being one of legacyPackages
or packages
. Reimplemented from flox::Package.
|
inlineoverridevirtual |
version
is defined then version
, otherwise the name
field stripped of is pname part as recognized by nix::DrvName
parsing rules. If version
is undefined and name
contains no version suffix, then std::nullopt
. Implements flox::Package.
|
overridevirtual |
meta.broken
field if defined, otherwise std::nullopt
. Implements flox::Package.
|
overridevirtual |
meta.unfree
field if defined, otherwise std::nullopt
. Implements flox::Package.