nanofil/nix/python.nix
CPython 3.12.5 built entirely by nanofil, with filnix's port of it (ports.nix's python312: the Fil-C patch, pymalloc and freelists off, no x87 or x64 inline assembly). nixpkgs pins 3.13, which the port marks broken, so the check builds the port's version. configure runs with filcc; make then runs with CC=nanofil-cc (with configure's -std=gnu23), and every object of the interpreter, its test modules and its 62 extension modules must come from nanofil. The modules that need libraries the sandbox lacks (zlib, bz2, lzma, OpenSSL, ctypes, sqlite, curses, readline, dbm, uuid, tkinter) are not built. Configured out of both builds as well: __uint128_t (nanofil refuses __int128; libmpdec takes its portable path).
The build runs the nanofil-built interpreter itself (deepfreeze.py freezes the bootstrap modules with _bootstrap_python), and its Python/deepfreeze/deepfreeze.c must equal the reference's. One build derivation per configuration (plain and -O) is shared by the checks: nanofil-python runs, on the same builder, both builds' deterministic workload (workloads/python.sh, nanofil's also under FUGC_SCRIBBLE and FUGC_VERIFY), which must match byte for byte, and -O's regrtest on the tests below; nanofil-python-regrtest-plain runs the plain build's, about as long as the rest. Both builds' per-test-case results (from --junit-xml, read by the reference interpreter) and per-file results must be equal: some tests fail or stop with a Fil-C error in filcc's build too. Both builds' interpreters run on a fiber with a 256 MB stack (python-main-stack.patch; Fil-C sizes a thread's stack by RLIMIT_STACK, whatever its attributes ask, which a sandbox may not let a check raise), and Python's other threads on the builder's default: nanofil's frames are larger than clang's (_PyEval_EvalFrameDefault's is 24,880 bytes plain and 9,872 with -O, against clang's 3,640), and Python's recursion tests overflow 8 MB first (Fil-C stops them safely); test_isinstance's test_infinitely_many_bases recurses about 2,400 levels of about 27 KB each in the plain build, past 64 MB.
regrtest on the tests with a fixed seed; the per-case results, then each test file's.
build label opt: the tree nanofil builds with NANOFIL_OPT=opt, its objects deleted once checked to all come from nanofil.
test name label body: a derivation that runs body beside both builds' trees, ref and python, under $NIX_BUILD_TOP.
The workload for both builds, and regrtest for -O's; the plain build's regrtest, about as long as the rest, is its own check.