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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@0xa7f090bdc7816f8f;

using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("nix::build");

struct SetupResponse {
  union {
    logLine @0 :Data;
    fatalError @1 :Data;
  }
}

struct Request {
  struct Credentials {
    uid @0 :UInt32;
    gid @1 :UInt32;
    uidCount @2 :UInt32;
    supplementaryGroups @3 :List(UInt32);
  }

  struct LinuxPlatform {
    struct BoundPath {
      source @0 :Data;
      target @1 :Data;
      optional @2 :Bool;
    }

    struct Sandbox {
      paths @0 :List(BoundPath);
      privateNetwork @1 :Bool;
      chrootRootDir @2 :Data;
      storeDir @3 :Data;
      wantsKvm @4 :Bool;
      sandboxShmFlags @5 :Text;
      useUidRange @6 :Bool;
      uid @7 :UInt32;
      gid @8 :UInt32;
      waitForInterface @9 :Text;
    }

    seccompFilters @0 :Data;
    sandbox @1 :Sandbox;
    platform @2 :Data;
    parentPid @3 :Int32;
  }

  struct DarwinPlatform {
    allowLocalNetworking @0 :Bool;
    sandboxProfile @1 :Text;
    platform @2 :Data;
    tempDir @3 :Text;
    globalTempDir @4 :Text;
  }

  builder @0 :Data;
  args @1 :List(Data);
  environment @2 :List(Data);
  workingDir @3 :Data;
  enableCoreDumps @4 :Bool;
  credentials @5 :Credentials;
  debug @8 :Bool;

  platform :union {
    linux @6 :LinuxPlatform;
    darwin @7 :DarwinPlatform;
  }
}