aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-03-02 03:50:41 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 08:33:00 -0400
commit255d145ba7ac907d1cba8d088da556b591627756 (patch)
tree3fe8f3721b4416699b3a1f9ddf2a5c7d17c4471f /src/nix/flake.cc
parent32f4454b9fa3ac30d58e738ece322eb19a0728ba (diff)
Use `BuildableReq` for `buildPaths` and `ensurePath`
This avoids an ambiguity where the `StorePathWithOutputs { drvPath, {} }` could mean "build `brvPath`" or "substitute `drvPath`" depending on context. It also brings the internals closer in line to the new CLI, by generalizing the `Buildable` type is used there and makes that distinction already. In doing so, relegate `StorePathWithOutputs` to being a type just for backwards compatibility (CLI and RPC).
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r--src/nix/flake.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index a2b6c0303..9d6d22a43 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -7,6 +7,7 @@
#include "get-drvs.hh"
#include "store-api.hh"
#include "derivations.hh"
+#include "path-with-outputs.hh"
#include "attr-path.hh"
#include "fetchers.hh"
#include "registry.hh"
@@ -292,7 +293,7 @@ struct CmdFlakeCheck : FlakeCommand
}
};
- std::vector<StorePathWithOutputs> drvPaths;
+ std::vector<BuildableReq> drvPaths;
auto checkApp = [&](const std::string & attrPath, Value & v, const Pos & pos) {
try {
@@ -461,7 +462,7 @@ struct CmdFlakeCheck : FlakeCommand
fmt("%s.%s.%s", name, attr.name, attr2.name),
*attr2.value, *attr2.pos);
if ((std::string) attr.name == settings.thisSystem.get())
- drvPaths.push_back({drvPath});
+ drvPaths.push_back(BuildableReqFromDrv{drvPath});
}
}
}