Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
Abstract representation of a "package", analogous to a Nix ‘derivation’. More...
#include <package.hh>
Public Member Functions | |
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. | |
Abstract representation of a "package", analogous to a Nix ‘derivation’.
This abstraction provides a common base for various backends that store, evaluate, and communicate package definitions.
|
pure virtual |
meta.description
field if defined, otherwise std::nullopt
. Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
name
field. Implemented in flox::FlakePackage, and flox::RawPackage.
|
virtual |
Serialize notable package metadata as a JSON object.
This may only contains a subset of all available information.
withDescription | Whether to include description strings. |
|
pure virtual |
meta.license.spdxId
field if defined, otherwise std::nullopt
Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
outputs
list. Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
meta.outputsToInstall
field if defined, otherwise the derivation outputs
members to the left of and including out
. Implemented in flox::FlakePackage, and flox::RawPackage.
|
inlinevirtual |
name
field. Reimplemented in flox::FlakePackage.
|
pure virtual |
Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
pname
is defined then pname
, otherwise the name
field stripped of is version part as recognized by nix::DrvName
parsing rules. Implemented in flox::FlakePackage, and flox::RawPackage.
|
inlinevirtual |
std::nullopt
iff this package does not use semantic versioning, otherwise a normalized semantic version number coerces from this package's version
information. Reimplemented in flox::FlakePackage, and flox::RawPackage.
|
inlinevirtual |
outputs
subtree the package resides in, being one of legacyPackages
or packages
. Reimplemented in flox::FlakePackage.
|
pure virtual |
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
. Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
meta.broken
field if defined, otherwise std::nullopt
. Implemented in flox::FlakePackage, and flox::RawPackage.
|
pure virtual |
meta.unfree
field if defined, otherwise std::nullopt
. Implemented in flox::FlakePackage, and flox::RawPackage.
|
virtual |
Create an installable URI string associated with this package using ref as its input part.
ref | Input flake reference associated with this package. This is used to construct the URI on the left side of # . |