![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <derivation-resolution-goal.hh>
Public Member Functions | |
| DerivationResolutionGoal (const StorePath &drvPath, ref< const Derivation > drv, Worker &worker, BuildMode buildMode) | |
| Public Member Functions inherited from nix::Goal | |
| virtual void | cleanup () |
| Goal (Worker &worker, Co< ExitCode > init) | |
| void | work () |
| void | handleChildOutput (Descriptor fd, std::string_view data) |
| void | handleEOF (Descriptor fd) |
| void | timedOut (TimedOut &&ex) |
| void | trace (std::string_view s) |
| std::string | getName () const |
| std::string_view | keyCached () & |
Public Attributes | |
| std::unique_ptr< std::pair< StorePath, BasicDerivation > > | resolvedDrv |
| Public Attributes inherited from nix::Goal | |
| Worker & | worker |
| WeakGoals | waiters |
| size_t | nrFailed = 0 |
| size_t | nrNoSubstituters = 0 |
| std::string | name |
| std::optional< ExitCode > | exitCode |
| BuildResult | buildResult |
| bool | preserveFailure = false |
Friends | |
| class | Worker |
Additional Inherited Members | |
| Public Types inherited from nix::Goal | |
| enum | ExitCode { ecSuccess , ecFailed , ecNoSubstituters } |
| using | ChildEvent = std::variant<ChildOutput, ChildEOF, std::unique_ptr<TimedOut>> |
| template<typename T> | |
| using | HandleType = std::coroutine_handle<AwaitableFrame<T>> |
| using | HandleTypeBase = std::coroutine_handle<AwaitableFrameBase> |
| Protected Member Functions inherited from nix::Goal | |
| Co< void > | await (Goals waitees) |
| Co< void > | waitForAWhile () |
| Co< void > | waitUntilWoken () |
| Co< void > | waitForBuildSlot () |
| Co< void > | yield () |
| Protected Attributes inherited from nix::Goal | |
| std::optional< CoBase > | top_co |
| std::optional< ExitCode > | finalExitCode |
A goal for resolving a derivation. Resolving a derivation (
Conceptually, we resolve all derivations. For input-addressed derivations (that don't transtively depend on content-addressed derivations), however, we don't actually use the resolved derivation, because the output paths would appear invalid (if we tried to verify them), since they are computed from the original, unresolved inputs.
That said, if we ever made the new flavor of input-addressing as described in issue #9259, then the input-addressing would be based on the resolved inputs, and we like the CA case would use the output of this goal.
(The point of this discussion is not to randomly stuff information on a yet-unimplemented feature (issue #9259) in the codebase, but rather, to illustrate that there is no inherent tension between explicit derivation resolution and input-addressing in general. That tension only exists with the type of input-addressing we've historically used.)
| std::unique_ptr<std::pair<StorePath, BasicDerivation> > nix::DerivationResolutionGoal::resolvedDrv |
If the derivation needed to be resolved, this is resulting resolved derivations and its path.