Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::InstallableValue Struct Referenceabstract

#include <installable-value.hh>

Inheritance diagram for nix::InstallableValue:
nix::Installable nix::InstallableAttrPath nix::InstallableFlake

Public Member Functions

 InstallableValue (ref< EvalState > state)
 
virtual std::pair< Value *, PosIdxtoValue (EvalState &state)=0
 
virtual std::vector< ref< eval_cache::AttrCursor > > getCursors (EvalState &state)
 
virtual ref< eval_cache::AttrCursorgetCursor (EvalState &state)
 
UnresolvedApp toApp (EvalState &state)
 
- Public Member Functions inherited from nix::Installable
virtual std::string what () const =0
 
virtual DerivedPathsWithInfo toDerivedPaths ()=0
 
DerivedPathWithInfo toDerivedPath ()
 
virtual std::optional< StorePathgetStorePath ()
 

Static Public Member Functions

static InstallableValuerequire (Installable &installable)
 
static ref< InstallableValuerequire (ref< Installable > installable)
 
- Static Public Member Functions inherited from nix::Installable
static std::vector< BuiltPathWithResultbuild (ref< Store > evalStore, ref< Store > store, Realise mode, const Installables &installables, BuildMode bMode=bmNormal)
 
static std::vector< std::pair< ref< Installable >, BuiltPathWithResult > > build2 (ref< Store > evalStore, ref< Store > store, Realise mode, const Installables &installables, BuildMode bMode=bmNormal)
 
static std::set< StorePathtoStorePathSet (ref< Store > evalStore, ref< Store > store, Realise mode, OperateOn operateOn, const Installables &installables)
 
static std::vector< StorePathtoStorePaths (ref< Store > evalStore, ref< Store > store, Realise mode, OperateOn operateOn, const Installables &installables)
 
static StorePath toStorePath (ref< Store > evalStore, ref< Store > store, Realise mode, OperateOn operateOn, ref< Installable > installable)
 
static std::set< StorePathtoDerivations (ref< Store > store, const Installables &installables, bool useDeriver=false)
 
static BuiltPaths toBuiltPaths (ref< Store > evalStore, ref< Store > store, Realise mode, OperateOn operateOn, const Installables &installables)
 

Public Attributes

ref< EvalStatestate
 

Protected Member Functions

std::optional< DerivedPathWithInfotrySinglePathToDerivedPaths (Value &v, const PosIdx pos, std::string_view errorCtx)
 

Detailed Description

An Installable which corresponds a Nix language value, in addition to a collection of derived paths.

Member Function Documentation

◆ getCursor()

ref< eval_cache::AttrCursor > nix::InstallableValue::getCursor ( EvalState & state)
virtual

Get the first and most preferred cursor this Installable could refer to, or throw an exception if none exists.

◆ getCursors()

std::vector< ref< eval_cache::AttrCursor > > nix::InstallableValue::getCursors ( EvalState & state)
virtual

Get a cursor to each value this Installable could refer to. However if none exists, throw exception instead of returning empty vector.

Reimplemented in nix::InstallableFlake.

◆ trySinglePathToDerivedPaths()

std::optional< DerivedPathWithInfo > nix::InstallableValue::trySinglePathToDerivedPaths ( Value & v,
const PosIdx pos,
std::string_view errorCtx )
protected

Handles either a plain path, or a string with a single string context elem in the right format. The latter case is handled by EvalState::coerceToDerivedPath(); see it for details.

Parameters
vValue that is hopefully a string or path per the above.
posPosition of value to aid with diagnostics.
errorCtxArbitrary message for use in potential error message when something is wrong with v.
Returns
A derived path (with empty info, for now) if the value matched the above criteria.

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