@@ -1241,6 +1241,7 @@ public:
1241
1241
{
1242
1242
std::vector<std::string> systems;
1243
1243
Path program;
1244
+ std::optional<std::vector<std::string>> args;
1244
1245
};
1245
1246
1246
1247
using ExternalBuilders = std::vector<ExternalBuilder>;
@@ -1251,6 +1252,68 @@ public:
1251
1252
" external-builders" ,
1252
1253
R"(
1253
1254
Helper programs that execute derivations.
1255
+
1256
+ The program is passed a JSON document that describes the build environment as the final argument.
1257
+ The JSON document looks like this:
1258
+
1259
+ {
1260
+ "args": [
1261
+ "-e",
1262
+ "/nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh",
1263
+ "/nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh"
1264
+ ],
1265
+ "builder": "/nix/store/s1qkj0ph0ma64a6743mvkwnabrbw1hsc-bash-5.2p37/bin/bash",
1266
+ "env": {
1267
+ "HOME": "/homeless-shelter",
1268
+ "NIX_BUILD_CORES": "14",
1269
+ "NIX_BUILD_TOP": "/build",
1270
+ "NIX_LOG_FD": "2",
1271
+ "NIX_STORE": "/nix/store",
1272
+ "PATH": "/path-not-set",
1273
+ "PWD": "/build",
1274
+ "TEMP": "/build",
1275
+ "TEMPDIR": "/build",
1276
+ "TERM": "xterm-256color",
1277
+ "TMP": "/build",
1278
+ "TMPDIR": "/build",
1279
+ "__structuredAttrs": "",
1280
+ "buildInputs": "",
1281
+ "builder": "/nix/store/s1qkj0ph0ma64a6743mvkwnabrbw1hsc-bash-5.2p37/bin/bash",
1282
+ "cmakeFlags": "",
1283
+ "configureFlags": "",
1284
+ "depsBuildBuild": "",
1285
+ "depsBuildBuildPropagated": "",
1286
+ "depsBuildTarget": "",
1287
+ "depsBuildTargetPropagated": "",
1288
+ "depsHostHost": "",
1289
+ "depsHostHostPropagated": "",
1290
+ "depsTargetTarget": "",
1291
+ "depsTargetTargetPropagated": "",
1292
+ "doCheck": "1",
1293
+ "doInstallCheck": "1",
1294
+ "mesonFlags": "",
1295
+ "name": "hello-2.12.2",
1296
+ "nativeBuildInputs": "/nix/store/l31j72f1h33hsa4nq4iyhsmsqjyndq9f-version-check-hook",
1297
+ "out": "/nix/store/2yx2prgxmzbkrnbb4liy6n4zkzb1cqai-hello-2.12.2",
1298
+ "outputs": "out",
1299
+ "patches": "",
1300
+ "pname": "hello",
1301
+ "postInstallCheck": "stat \"${!outputBin}/bin/hello\"\n",
1302
+ "propagatedBuildInputs": "",
1303
+ "propagatedNativeBuildInputs": "",
1304
+ "src": "/nix/store/dw402azxjrgrzrk6j0p66wkqrab5mwgw-hello-2.12.2.tar.gz",
1305
+ "stdenv": "/nix/store/i8bw5nqg1225m281zr6lgsz42bw04z7g-stdenv-linux",
1306
+ "strictDeps": "",
1307
+ "system": "aarch64-linux",
1308
+ "version": "2.12.2"
1309
+ },
1310
+ "realStoreDir": "/nix/store",
1311
+ "storeDir": "/nix/store",
1312
+ "system": "aarch64-linux",
1313
+ "tmpDir": "/private/tmp/nix-build-hello-2.12.2.drv-0/build",
1314
+ "tmpDirInSandbox": "/build",
1315
+ "topTmpDir": "/private/tmp/nix-build-hello-2.12.2.drv-0"
1316
+ }
1254
1317
)"
1255
1318
};
1256
1319
};
0 commit comments