Repository navigation
docs: document local Nix setup and the OpenShell binary cache - #4931
Merged
Merged
Conversation
Recommend Determinate Nix and configuring openshell.cachix.org system-wide so nix develop and nix run substitute the cross toolchains instead of building them from source. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@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
Document how to set up Nix locally so
nix developandnix run .#…substitute fromopenshell.cachix.orginstead of building the cross toolchains from source. A fresh Determinate Nix install ignores the cache declared inflake.nixfor non-trusted users, so the first run built 88 derivations, including cross GCC 15.3, and ran for over an hour.Related Issue
None. Author has write access; this is a small contributor-docs fix found while setting up a fresh machine.
Changes
CONTRIBUTING.md: new short Nix setup section under Prerequisites. It recommends Determinate Nix (matches CI), links to the NixOS wiki for enabling flakes with other installers, shows the twonix.custom.conflines that add the OpenShell cache with Determinate Nix (linking Determinate's configuration docs), and links to theopenshellCachix cache page for other installers.TESTING.mdandnix/test-guest/README.mdlink to that section instead of repeating it. The test-guest requirements mark the cache as optional.Testing
Tested on macOS (Apple Silicon) with Determinate Nix 3.24.1 (Nix 2.35.3):
/etc/nix/nix.custom.confand the daemon was restarted,nix config show substituterslistedhttps://openshell.cachix.org.nix build --dry-run .#devShells.aarch64-darwin.defaultagainst an empty store went from 88 derivations to build without the cache to 1 (nix-shell) with it. The cross GCCs and compiler-rt are now fetched.nix build --dry-run .#devShells.x86_64-linux.defaultthrough the daemon went from 49 derivations to build to 1.mise run markdown:lintpasses.Not verified: the Cachix-page setup path for installers other than Determinate.
Checklist