1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

build-remote: Ugly hackery to get build logs to work

The build hook mechanism expects build log output to go to file
descriptor 4, so do that.
This commit is contained in:
Eelco Dolstra 2017-05-02 12:01:46 +02:00
parent 3a5f04f48c
commit feefcb3a98
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 11 additions and 3 deletions

View file

@ -17,6 +17,9 @@ struct LegacySSHStore : public Store
const Setting<Path> sshKey{this, "", "ssh-key", "path to an SSH private key"};
const Setting<bool> compress{this, false, "compress", "whether to compress the connection"};
// Hack for getting remote build log output.
const Setting<int> logFD{this, -1, "log-fd", "file descriptor to which SSH's stderr is connected"};
struct Connection
{
std::unique_ptr<SSHMaster::Connection> sshConn;
@ -44,7 +47,8 @@ struct LegacySSHStore : public Store
sshKey,
// Use SSH master only if using more than 1 connection.
connections->capacity() > 1,
compress)
compress,
logFD)
{
}