First attempt used builtins.currentTime at flake-evaluation time -- this broke the plain, documented `nix build .#xcecore_debug` command entirely (pure-eval strips builtins.currentTime, requiring --impure) and produced a raw epoch-seconds string instead of UTC ISO-8601. Caught by task-local review (REJECTED, round 1) before merge. Fixed by moving the computation into each derivation's own build phase: a preConfigure hook in xce.nix/xcecli.nix runs `date -u` (stdenv's bundled coreutils, unaffected by pure-eval) and appends -Dbuild_time= to mesonFlagsArray, with a fail-loud guard against empty output. commit_id's existing self.shortRev/self.dirtyShortRev eval-time mechanism is untouched. Verified via nix eval (no --impure) and nix build reaching configure with real values on both xcecore_debug and xcecli (round 2, APPROVED). Task 2.2/13 of build-time-versioning. Also corrects design.md/research.md, which described the now-superseded builtins.currentTime approach. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| settings | ||
| specs | ||
| steering | ||