nanofil/nix/sqlite.nix
SQLite 3.51.2 (the amalgamation and its shell) built entirely by nanofil, single-threaded, with FTS5 and the math functions as nixpkgs enables them. A deterministic workload (tests/sqlite/workload.sql: DDL, inserts, indexes, joins, aggregates and windows, printf and floats, dates, JSON, FTS5, triggers, savepoints, the shell's output modes and a VACUUM) must print the same bytes and leave the same database file as a filcc-built sqlite3, plain and under FUGC_SCRIBBLE and FUGC_VERIFY, for nanofil's reference and its optimized configuration. sqlite3.c alone is 260,000 lines; nanofil's reference configuration compiles it in about 2 minutes, and every configuration fits the default 1 GB Prolog stack.
The nixpkgs source is the canonical tree; generate the amalgamation (sqlite3.c, sqlite3.h) and the single-file shell.c from it.
One derivation per nanofil configuration, so the three compiles of sqlite3.c (each a single long-running process) run in parallel.
The port's own flags (nixpkgs' NIX_CFLAGS_COMPILE: FTS3 and FTS4, R-Tree, Geopoly, sessions, RBU...) compile more of sqlite3.c, as the survey's build does; once the validator overflowed the default stack only there. Compiled as the survey compiles it, without -O. As ports.nix's sqlite, without STMT_SCANSTATUS (rdtsc asm).