Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::PathSubstitutionGoal Struct Reference
Inheritance diagram for nix::PathSubstitutionGoal:
nix::Goal

Public Member Functions

Done done (ExitCode result, BuildResult::Status status, std::optional< std::string > errorMsg={})
 
 PathSubstitutionGoal (const StorePath &storePath, Worker &worker, RepairFlag repair=NoRepair, std::optional< ContentAddress > ca=std::nullopt)
 
void timedOut (Error &&ex) override
 
std::string key () override
 
Co init () override
 
Co gotInfo ()
 
Co tryToRun (StorePath subPath, nix::ref< Store > sub, std::shared_ptr< const ValidPathInfo > info, bool &substituterFailed)
 
Co finished ()
 
void handleChildOutput (Descriptor fd, std::string_view data) override
 
void handleEOF (Descriptor fd) override
 
void cleanup () override final
 
JobCategory jobCategory () const override
 Hint for the scheduler, which concurrency limit applies.
 
- Public Member Functions inherited from nix::Goal
Co init_wrapper ()
 
Done amDone (ExitCode result, std::optional< Error > ex={})
 
BuildResult getBuildResult (const DerivedPath &) const
 
 Goal (Worker &worker, DerivedPath path)
 
void work ()
 
void addWaitee (GoalPtr waitee)
 
virtual void waiteeDone (GoalPtr waitee, ExitCode result)
 
void trace (std::string_view s)
 
std::string getName () const
 

Public Attributes

StorePath storePath
 
RepairFlag repair
 
MuxablePipe outPipe
 
std::thread thr
 
std::unique_ptr< MaintainCount< uint64_t > > maintainExpectedSubstitutions
 
std::unique_ptr< MaintainCount< uint64_t > > maintainRunningSubstitutions
 
std::unique_ptr< MaintainCount< uint64_t > > maintainExpectedNar
 
std::unique_ptr< MaintainCount< uint64_t > > maintainExpectedDownload
 
std::optional< ContentAddressca
 
- Public Attributes inherited from nix::Goal
Workerworker
 
Goals waitees
 
WeakGoals waiters
 
size_t nrFailed = 0
 
size_t nrNoSubstituters = 0
 
size_t nrIncompleteClosure = 0
 
std::string name
 
ExitCode exitCode = ecBusy
 
std::optional< Cotop_co
 
std::optional< Error > ex
 

Additional Inherited Members

- Public Types inherited from nix::Goal
enum  ExitCode {
  ecBusy , ecSuccess , ecFailed , ecNoSubstituters ,
  ecIncompleteClosure
}
 
using handle_type = std::coroutine_handle<promise_type>
 
- Protected Attributes inherited from nix::Goal
BuildResult buildResult
 

Member Function Documentation

◆ cleanup()

void nix::PathSubstitutionGoal::cleanup ( )
finaloverridevirtual

Reimplemented from nix::Goal.

◆ handleChildOutput()

void nix::PathSubstitutionGoal::handleChildOutput ( Descriptor fd,
std::string_view data )
inlineoverridevirtual

Callback used by the worker to write to the log.

Reimplemented from nix::Goal.

◆ handleEOF()

void nix::PathSubstitutionGoal::handleEOF ( Descriptor fd)
overridevirtual

Reimplemented from nix::Goal.

◆ init()

Goal::Co nix::PathSubstitutionGoal::init ( )
overridevirtual

The states.

Implements nix::Goal.

◆ jobCategory()

JobCategory nix::PathSubstitutionGoal::jobCategory ( ) const
inlineoverridevirtual

Hint for the scheduler, which concurrency limit applies.

See also
JobCategory

Implements nix::Goal.

◆ key()

std::string nix::PathSubstitutionGoal::key ( )
inlineoverridevirtual

We prepend "a$" to the key name to ensure substitution goals happen before derivation goals.

Implements nix::Goal.

◆ timedOut()

void nix::PathSubstitutionGoal::timedOut ( Error && ex)
inlineoverridevirtual

Callback in case of a timeout. It should wake up its waiters, get rid of any running child processes that are being monitored by the worker (important!), etc.

Implements nix::Goal.

Member Data Documentation

◆ ca

std::optional<ContentAddress> nix::PathSubstitutionGoal::ca

Content address for recomputing store path

◆ outPipe

MuxablePipe nix::PathSubstitutionGoal::outPipe

Pipe for the substituter's standard output.

◆ repair

RepairFlag nix::PathSubstitutionGoal::repair

Whether to try to repair a valid path.

◆ storePath

StorePath nix::PathSubstitutionGoal::storePath

The store path that should be realised through a substitute.

◆ thr

std::thread nix::PathSubstitutionGoal::thr

The substituter thread.


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