fix(nix): make flake checks hermetic#1958
Open
elezar wants to merge 1 commit into
Open
Conversation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
nix flake checkpass on the Darwin builder by removing two host-environment assumptions exposed by hermetic Nix checks.Related Issue
None.
Changes
lsoftoopenshell-coreNix check inputs because the port availability test asserts cross-family listener detection throughlsof./tmp/osd-gvto per-user/tmp/openshell-<uid>/osd-gvwhenXDG_RUNTIME_DIRis absent, preserving ownership checks while avoiding cross-user temp-dir collisions.Context
On this system,
lsofexisted on the host at/usr/sbin/lsof, but it was not present inside the Nix test derivation. The production port check treats missinglsofas no listener data, so the IPv6 wildcard listener test failed untilpkgs.lsofwas declared.The VM driver also fell back to
/tmp/osd-gv. In the Nix sandbox that directory already existed with uid 502, while the builder ran as uid 355. The existing ownership guard correctly rejected it. Using a uid-scoped fallback keeps the safety property and makes the path hermetic for multi-user and Nix builds.Testing
nix build .#checks.aarch64-darwin.openshell-core-test --print-build-logsnix build .#checks.aarch64-darwin.openshell-driver-vm-test --print-build-logsnix build .#checks.aarch64-darwin.rustfmt --print-build-logsnix build .#checks.aarch64-darwin.openshell-driver-vm-clippy --print-build-logsnix flake checkmise run pre-commitpasses:miseis unavailable in this shell (zsh: command not found: mise)Checklist