aboutsummaryrefslogtreecommitdiff
path: root/src/nix/installables.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r--src/nix/installables.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 38f37adb1..671cf513a 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -294,7 +294,7 @@ Value * InstallableFlake::getFlakeOutputs(EvalState & state, const flake::Resolv
return (*aOutputs)->value;
}
-std::vector<flake::EvalCache::Derivation> InstallableFlake::toDerivations()
+std::tuple<std::string, FlakeRef, flake::EvalCache::Derivation> InstallableFlake::toDerivation()
{
auto state = cmd.getEvalState();
@@ -312,7 +312,7 @@ std::vector<flake::EvalCache::Derivation> InstallableFlake::toDerivations()
auto drv = evalCache.getDerivation(fingerprint, attrPath);
if (drv) {
if (state->store->isValidPath(drv->drvPath))
- return {*drv};
+ return {attrPath, resFlake.flake.sourceInfo.resolvedRef, *drv};
}
if (!vOutputs)
@@ -334,7 +334,7 @@ std::vector<flake::EvalCache::Derivation> InstallableFlake::toDerivations()
evalCache.addDerivation(fingerprint, attrPath, drv);
- return {drv};
+ return {attrPath, resFlake.flake.sourceInfo.resolvedRef, drv};
} catch (AttrPathNotFound & e) {
}
}
@@ -343,6 +343,11 @@ std::vector<flake::EvalCache::Derivation> InstallableFlake::toDerivations()
flakeRef, concatStringsSep(", ", quoteStrings(attrPaths)));
}
+std::vector<flake::EvalCache::Derivation> InstallableFlake::toDerivations()
+{
+ return {std::get<2>(toDerivation())};
+}
+
Value * InstallableFlake::toValue(EvalState & state)
{
auto resFlake = resolveFlake(state, flakeRef, cmd.getLockFileMode());