1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

Add command 'nix store copy-log'

Fixes #5222.
This commit is contained in:
Eelco Dolstra 2022-01-17 19:45:21 +01:00
parent 6448ea84ab
commit 4dda1f92aa
13 changed files with 165 additions and 60 deletions

View file

@ -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());