aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-17 19:45:21 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-01-18 14:08:49 +0100
commit4dda1f92aae05dd9d633152458d65a3815bcd03c (patch)
tree84260b953cb80933b0a10a6db52dd2c9dfde5668 /src/libstore/remote-store.cc
parent6448ea84ab537600d3f350867063bc305b3bb910 (diff)
Add command 'nix store copy-log'
Fixes #5222.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 6886103e1..aac2965e0 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -908,6 +908,18 @@ void RemoteStore::queryMissing(const std::vector<DerivedPath> & targets,
}
+void RemoteStore::addBuildLog(const StorePath & drvPath, std::string_view log)
+{
+ auto conn(getConnection());
+ conn->to << wopAddBuildLog << drvPath.to_string();
+ StringSource source(log);
+ conn.withFramedSink([&](Sink & sink) {
+ source.drainInto(sink);
+ });
+ readInt(conn->from);
+}
+
+
void RemoteStore::connect()
{
auto conn(getConnection());