Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
derivation-goal.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/parsed-derivations.hh
"
5
#include "
nix/store/derivations.hh
"
6
#include "
nix/store/derivation-options.hh
"
7
#include "nix/store/build/derivation-building-misc.hh"
8
#include "
nix/store/outputs-spec.hh
"
9
#include "
nix/store/store-api.hh
"
10
#include "
nix/store/pathlocks.hh
"
11
#include "
nix/store/build/goal.hh
"
12
13
namespace
nix {
14
15
using
std::map;
16
33
struct
DerivationGoal
:
public
Goal
34
{
36
StorePath
drvPath
;
37
41
OutputName
wantedOutput
;
42
46
DerivationGoal
(
47
const
StorePath
&
drvPath
,
48
ref<const Derivation>
drv,
49
const
OutputName
&
wantedOutput
,
50
Worker
&
worker
,
51
BuildMode buildMode,
52
bool
storeDerivation);
53
~DerivationGoal
() =
default
;
54
55
std::string
key
()
override
;
56
57
JobCategory
jobCategory
()
const override
58
{
59
return
JobCategory::Administration
;
60
};
61
62
private
:
63
67
ref<const Derivation>
drv;
68
69
const
BuildMode buildMode;
70
74
75
std::unique_ptr<MaintainCount<uint64_t>> mcExpectedBuilds;
76
80
Co<ExitCode> init(
bool
storeDerivation);
81
Co<BuildResult> haveDerivation(
bool
storeDerivation);
82
90
std::optional<std::pair<UnkeyedRealisation, PathStatus>> checkPathValidity();
91
96
UnkeyedRealisation
assertPathValidity();
97
98
Co<BuildResult> repairClosure();
99
100
BuildResult
success(BuildResult::Success::Status status,
UnkeyedRealisation
builtOutput);
101
102
BuildResult
failure(
BuildError
ex);
103
};
104
105
}
// namespace nix
nix::BuildError
Definition
build-result.hh:62
nix::StorePath
Definition
path.hh:33
nix::Worker
Definition
worker.hh:110
nix::ref
Definition
ref.hh:58
derivation-options.hh
derivations.hh
goal.hh
nix::JobCategory
JobCategory
Definition
goal.hh:57
nix::JobCategory::Administration
@ Administration
Definition
goal.hh:75
outputs-spec.hh
nix::OutputName
std::string OutputName
Definition
outputs-spec.hh:18
parsed-derivations.hh
pathlocks.hh
store-api.hh
nix::BuildResult
Definition
build-result.hh:123
nix::DerivationGoal::jobCategory
JobCategory jobCategory() const override
Hint for the scheduler, which concurrency limit applies.
Definition
derivation-goal.hh:57
nix::DerivationGoal::key
std::string key() override
Definition
derivation-goal.cc:41
nix::DerivationGoal::DerivationGoal
DerivationGoal(const StorePath &drvPath, ref< const Derivation > drv, const OutputName &wantedOutput, Worker &worker, BuildMode buildMode, bool storeDerivation)
Definition
derivation-goal.cc:20
nix::DerivationGoal::wantedOutput
OutputName wantedOutput
Definition
derivation-goal.hh:41
nix::DerivationGoal::drvPath
StorePath drvPath
Definition
derivation-goal.hh:36
nix::Goal::worker
Worker & worker
Definition
goal.hh:140
nix::UnkeyedRealisation
Definition
realisation.hh:62
libstore
include
nix
store
build
derivation-goal.hh
Generated by
1.18.0