diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-03-02 03:50:41 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-04-05 08:33:00 -0400 |
commit | 255d145ba7ac907d1cba8d088da556b591627756 (patch) | |
tree | 3fe8f3721b4416699b3a1f9ddf2a5c7d17c4471f /src/nix-build | |
parent | 32f4454b9fa3ac30d58e738ece322eb19a0728ba (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-build')
-rwxr-xr-x | src/nix-build/nix-build.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 65b85b304..6f8a61261 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -12,6 +12,7 @@ #include "affinity.hh" #include "util.hh" #include "shared.hh" +#include "path-with-outputs.hh" #include "eval.hh" #include "eval-inline.hh" #include "get-drvs.hh" @@ -321,7 +322,8 @@ static void main_nix_build(int argc, char * * argv) state->printStats(); - auto buildPaths = [&](const std::vector<StorePathWithOutputs> & paths) { + auto buildPaths = [&](const std::vector<StorePathWithOutputs> & paths0) { + auto paths = toBuildableReqs(paths0); /* Note: we do this even when !printMissing to efficiently fetch binary cache data. */ uint64_t downloadSize, narSize; |