We’ve launched an API for nixbuild.net!
Authentication is based on the awesome Datalog-powered Biscuit tokens.
Here’s a usage example (API reference docs):
$ curl -s \
-H "Authorization: Bearer $TOKEN" \
"https://api.nixbuild.net/builds?derivation_path=/nix/store/dkrh838n9rkc6xwjd9diimhssihfx5rx-snix-qemu-6.1.0.drv" \
| jq .
[
{
"build_id": 805823,
"create_time": "2022-08-19T07:33:16.069456Z",
"start_time": "2022-08-19T07:33:17.53853Z",
"queue_time_seconds": 1.469074,
"duration_seconds": 459.689893,
"status": "built",
"status_message": "",
"cpu_count": 4,
"allocated_megabytes": 6270,
"cpu_seconds": 1839,
"peak_memory_use_kilobytes": 1648064,
"peak_storage_use_kilobytes": 2157808,
"derivation_path": "/nix/store/dkrh838n9rkc6xwjd9diimhssihfx5rx-snix-qemu-6.1.0.drv",
"outputs": [
{
"name": "out",
"path": "/nix/store/f00405bw7avnd5asafvvq4dgh6y33brc-snix-qemu-6.1.0",
"nar_hash": "sha256-eZHcD/obb1YmCiQ2T3111Zxjpp48bWA5Vw/PVFW9i8s=",
"nar_size_bytes": 256898464
}
],
"system": "x86_64-linux",
"tags": {}
},
{
"build_id": 805810,
"create_time": "2022-08-19T07:31:24.523633Z",
"start_time": "2022-08-19T07:31:25.398907Z",
"queue_time_seconds": 0.875274,
"duration_seconds": 23.74416,
"status": "client_disconnect",
"status_message": "ssh session closed",
"cpu_count": 4,
"allocated_megabytes": 6270,
"cpu_seconds": 95,
"peak_memory_use_kilobytes": 822832,
"peak_storage_use_kilobytes": 248712,
"derivation_path": "/nix/store/dkrh838n9rkc6xwjd9diimhssihfx5rx-snix-qemu-6.1.0.drv",
"outputs": [],
"system": "x86_64-linux",
"tags": {}
}
]