diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-16 09:37:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-22 09:59:51 +0200 |
commit | e9848beca704d27a13e28b4403251725bd485bb2 (patch) | |
tree | 560b21607427e1a4c8af5a06f5391f7dfb7bf15d /src/nix-build | |
parent | 2ff3035cf4d5167d180878d69cb47b31890a24c4 (diff) |
nix-build: Copy drv closure between eval store and build store
Diffstat (limited to 'src/nix-build')
-rwxr-xr-x | src/nix-build/nix-build.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 4305c0ac1..4ee471520 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -532,6 +532,7 @@ static void main_nix_build(int argc, char * * argv) std::vector<StorePathWithOutputs> pathsToBuild; std::vector<std::pair<StorePath, std::string>> pathsToBuildOrdered; + RealisedPath::Set drvsToCopy; std::map<StorePath, std::pair<size_t, StringSet>> drvMap; @@ -544,15 +545,17 @@ static void main_nix_build(int argc, char * * argv) pathsToBuild.push_back({drvPath, {outputName}}); pathsToBuildOrdered.push_back({drvPath, {outputName}}); + drvsToCopy.insert(drvPath); auto i = drvMap.find(drvPath); if (i != drvMap.end()) i->second.second.insert(outputName); - else { + else drvMap[drvPath] = {drvMap.size(), {outputName}}; - } } + copyClosure(state->store, state->buildStore, drvsToCopy); + buildPaths(pathsToBuild); if (dryRun) return; |