The flake compiled cleanly but always failed in the cargo check phase:
test binaries could not load libdbus at runtime, and a further batch of
sandbox-environment tests failed. Fix the check environment and harness
so `nix build` passes end-to-end.
- preCheck exports LD_LIBRARY_PATH (dbus/gcc libs); nixpkgs no longer
derives it from buildInputs and autoPatchelfHook only runs at fixup
- preCheck points HOME at a writable mktemp dir (sandbox HOME is not
writable, breaking config/secret tests)
- procps is a Linux nativeCheckInput so the fleet ps-based memory/zombie
sampling works on NixOS
- checkPhase builds harnesses with --no-run, patches an explicit RPATH
into the deps executables (fleet/shell tests re-exec the harness with a
scrubbed environment), then runs tests
- RUST_TEST_THREADS=1: tests mutate process-global PATH/HOME/cwd via
EnvVarGuard, and a concurrent shell spawn can fail to resolve the
interpreter; serial execution makes the check deterministic
- skip two tests that cannot run in the Nix sandbox: the git-repo-root
test needs the source tree to be a git repo, and the underwater header
width table is calibrated against checkout git chrome
Verified with `nix build '.#packages.x86_64-linux.default'`: cli 186
passed, tui 9491 passed / 0 failed (2 filtered), auto-patchelf reports 0
unsatisfied dependencies.
(cherry picked from commit f7f5559da3741bbd98adc70a7dfd8816a6d327d0)
Signed-off-by: Hmbown <101357273+Hmbown@users.noreply.github.com>