diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-20 13:13:52 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-20 13:13:52 +0200 |
commit | 539a9c1c5f0e4c9ab2262e7cf48460e02b8b0e12 (patch) | |
tree | 8243d2c134973b285ad197c9554ffbc1d45cccbf /src/nix/installables.hh | |
parent | 0725ab2fd7d0d8b6606bb21fd00a2b0624bb7623 (diff) |
Get rid of the old eval cache
Diffstat (limited to 'src/nix/installables.hh')
-rw-r--r-- | src/nix/installables.hh | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/nix/installables.hh b/src/nix/installables.hh index 8f2d50077..b258fb336 100644 --- a/src/nix/installables.hh +++ b/src/nix/installables.hh @@ -3,7 +3,7 @@ #include "util.hh" #include "path.hh" #include "eval.hh" -#include "flake/eval-cache.hh" +#include "flake/flake.hh" #include <optional> @@ -12,6 +12,8 @@ namespace nix { struct DrvInfo; struct SourceExprCommand; +namespace eval_cache { class EvalCache; } + struct Buildable { std::optional<StorePath> drvPath; @@ -63,7 +65,14 @@ struct InstallableValue : Installable InstallableValue(SourceExprCommand & cmd) : cmd(cmd) { } - virtual std::vector<flake::EvalCache::Derivation> toDerivations(); + struct DerivationInfo + { + StorePath drvPath; + StorePath outPath; + std::string outputName; + }; + + virtual std::vector<DerivationInfo> toDerivations(); Buildables toBuildables() override; }; @@ -86,11 +95,16 @@ struct InstallableFlake : InstallableValue Value * getFlakeOutputs(EvalState & state, const flake::LockedFlake & lockedFlake); - std::tuple<std::string, FlakeRef, flake::EvalCache::Derivation> toDerivation(); + std::tuple<std::string, FlakeRef, DerivationInfo> toDerivation(); - std::vector<flake::EvalCache::Derivation> toDerivations() override; + std::vector<DerivationInfo> toDerivations() override; std::pair<Value *, Pos> toValue(EvalState & state) override; }; +ref<eval_cache::EvalCache> openEvalCache( + EvalState & state, + const flake::LockedFlake & lockedFlake, + bool useEvalCache); + } |