From e9848beca704d27a13e28b4403251725bd485bb2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 Jul 2021 09:37:33 +0200 Subject: nix-build: Copy drv closure between eval store and build store --- src/libcmd/installables.cc | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/libcmd') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index ca4d509c2..124df34ea 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -12,7 +12,6 @@ #include "eval-cache.hh" #include "url.hh" #include "registry.hh" -#include "remote-store.hh" #include #include @@ -393,31 +392,7 @@ DerivedPaths InstallableValue::toDerivedPaths() for (auto & i : drvsToOutputs) res.push_back(DerivedPath::Built { i.first, i.second }); - // FIXME: Temporary hack - if (state->store != state->buildStore) { - RealisedPath::Set closure; - RealisedPath::closure(*state->store, drvsToCopy, closure); - - if (dynamic_cast(&*state->buildStore)) { - StorePathSet closure2; - for (auto & p : closure) - closure2.insert(p.path()); - - auto valid = state->buildStore->queryValidPaths(closure2); - StorePathSet missing; - for (auto & p : closure2) - if (!valid.count(p)) missing.insert(p); - - if (!missing.empty()) { - auto source = sinkToSource([&](Sink & sink) { - state->store->exportPaths(missing, sink); - }); - state->buildStore->importPaths(*source, NoCheckSigs); - } - - } else - copyPaths(state->store, state->buildStore, closure); - } + copyClosure(state->store, state->buildStore, drvsToCopy); return res; } -- cgit v1.2.3