aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/local-derivation-goal.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index d523ef51f..a071883bb 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -2150,14 +2150,10 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
if (!rewrites.empty()) {
debug("rewriting hashes in '%1%'; cross fingers", actualPath);
- /* FIXME: Is this actually streaming? */
- auto source = sinkToSource([&](Sink & nextSink) {
- RewritingSink rsink(rewrites, nextSink);
- rsink << dumpPath(actualPath);
- rsink.flush();
- });
+ GeneratorSource dump{dumpPath(actualPath)};
+ RewritingSource rewritten(rewrites, dump);
Path tmpPath = actualPath + ".tmp";
- restorePath(tmpPath, *source);
+ restorePath(tmpPath, rewritten);
deletePath(actualPath);
movePath(tmpPath, actualPath);