aboutsummaryrefslogtreecommitdiff
path: root/src/nix/installables.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-17 13:43:39 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-17 13:43:39 +0200
commit7cdc739ece681128dd4153e53acb85867accdd1b (patch)
treec6c202a7f596f1077a3b6295344367b937963a5d /src/nix/installables.hh
parentbf290c2306d8554b82a9f1d30279b90bf8606fa6 (diff)
parente849b198720c60c186c8f9486c43c495ad436e1b (diff)
Merge remote-tracking branch 'origin/master' into markdown
Diffstat (limited to 'src/nix/installables.hh')
-rw-r--r--src/nix/installables.hh23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/nix/installables.hh b/src/nix/installables.hh
index eb34365d4..26e87ee3a 100644
--- a/src/nix/installables.hh
+++ b/src/nix/installables.hh
@@ -14,12 +14,20 @@ struct SourceExprCommand;
namespace eval_cache { class EvalCache; class AttrCursor; }
-struct Buildable
-{
- std::optional<StorePath> drvPath;
+struct BuildableOpaque {
+ StorePath path;
+};
+
+struct BuildableFromDrv {
+ StorePath drvPath;
std::map<std::string, StorePath> outputs;
};
+typedef std::variant<
+ BuildableOpaque,
+ BuildableFromDrv
+> Buildable;
+
typedef std::vector<Buildable> Buildables;
struct App
@@ -54,10 +62,10 @@ struct Installable
}
virtual std::vector<std::pair<std::shared_ptr<eval_cache::AttrCursor>, std::string>>
- getCursors(EvalState & state, bool useEvalCache);
+ getCursors(EvalState & state);
std::pair<std::shared_ptr<eval_cache::AttrCursor>, std::string>
- getCursor(EvalState & state, bool useEvalCache);
+ getCursor(EvalState & state);
virtual FlakeRef nixpkgsFlakeRef() const
{
@@ -110,7 +118,7 @@ struct InstallableFlake : InstallableValue
std::pair<Value *, Pos> toValue(EvalState & state) override;
std::vector<std::pair<std::shared_ptr<eval_cache::AttrCursor>, std::string>>
- getCursors(EvalState & state, bool useEvalCache) override;
+ getCursors(EvalState & state) override;
std::shared_ptr<flake::LockedFlake> getLockedFlake() const;
@@ -119,7 +127,6 @@ struct InstallableFlake : InstallableValue
ref<eval_cache::EvalCache> openEvalCache(
EvalState & state,
- std::shared_ptr<flake::LockedFlake> lockedFlake,
- bool useEvalCache);
+ std::shared_ptr<flake::LockedFlake> lockedFlake);
}