aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/hook-instance.hh
blob: b8632d2992ae9ca2dc4c5796df4d500589d9bbff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
///@file

#include "logging.hh"
#include "processes.hh"
#include "serialise.hh"

namespace nix {

struct HookInstance
{
    /**
     * Pipe for talking to the build hook.
     */
    AutoCloseFD toHook;

    /**
     * Pipe for the hook's standard output/error.
     */
    AutoCloseFD fromHook;

    /**
     * Pipe for the builder's standard output/error.
     */
    AutoCloseFD builderOut;

    /**
     * The process ID of the hook.
     */
    Pid pid;

    FdSink sink;

    std::map<ActivityId, Activity> activities;

    HookInstance();

    ~HookInstance();
};

}