# Native build dependencies and TUI test terminal handling Status: accepted ## Context rquickjs-sys needs a C compiler; rustls may pull aws-lc-sys, which needs cmake; the sandbox needs bubblewrap at runtime on Linux. The TUI smoke test runs under a pty with temp dirs. ## Decision - devenv provides `stdenv.cc` (gcc on Linux, clang on macOS) for rquickjs-sys (QuickJS). - flake.nix adds cmake and perl as native inputs because rustls may build aws-lc-sys depending on features, with cmake configure disabled; it wraps the binary with bubblewrap on PATH (Linux only). - tui_smoke resolves the temp dir with realpath because hx sees the real cwd (macOS /var -> /private/var) and derives the session dir slug from it. Screen text can be split by ratatui's cursor-move diffing, so the test asserts on the OSC window title, which is written whole and carries the old prompt only once the session is resumed. ## Consequences Packaging stays correct on both platforms; tests avoid flaky screen-scraping. Code: devenv.nix:packages, flake.nix:hx (nativeBuildInputs, postInstall), tests/tui_smoke.py