feat(nix): add Nix flake for building, developing, and containerizing OpenShell#559
Closed
randomizedcoder wants to merge 1 commit intoNVIDIA:mainfrom
Closed
feat(nix): add Nix flake for building, developing, and containerizing OpenShell#559randomizedcoder wants to merge 1 commit intoNVIDIA:mainfrom
randomizedcoder wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
… OpenShell - flake.nix coordinates modular Nix files under ./nix/ - builds all 3 binaries (openshell, openshell-server, openshell-sandbox) - dev shell provides rustc, cargo, clippy, rustfmt, protoc, kubectl, helm - OCI container image via dockerTools (~48 MiB compressed, ~131 MiB uncompressed, non-root) - 15 container smoke tests via nix run .#container-test - source filtering for reproducible builds without .git or target/ - README covers usage, architecture, tested results, and a sandboxing comparison between Nix and OpenShell (honest about both strengths and weaknesses) - .gitignore updated for /result symlink
|
Thank you for your interest in contributing to OpenShell, @randomizedcoder. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
All contributors have signed the DCO ✍️ ✅ |
Author
5 tasks
Author
|
I have read the DCO document and I hereby sign the DCO. |
Author
|
recheck |
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
Hi there! This PR adds Nix flake support so that people on NixOS (and anyone using Nix) can build, develop, and containerize OpenShell directly.
We recently raised NVIDIA/NemoClaw#727 which integrates OpenShell into NemoClaw — but in that repo we had to pull in the OpenShell container image rather than building it more directly. With this PR merged, NemoClaw (and other Nix-based projects) could build and use OpenShell as a native Nix dependency instead.
We'd love for this to be useful to the community. Feedback very welcome!
What's Included
flake.nixcoordinates modular Nix files under./nix/openshell,openshell-server,openshell-sandbox)rustc,cargo,clippy,rustfmt,protoc,kubectl,helmdockerTools(~48 MiB compressed, ~131 MiB uncompressed, non-root)nix run .#container-test.gitortarget/.gitignoreupdated for/resultsymlinkQuick Start
Full details in
nix/README.md.Related
Testing
nix buildproduces all 3 binariesnix run -- --versionoutputsopenshell 0.0.0nix develop -c rustc --versionconfirmsrustc 1.94.0nix build .#containerproduces ~48 MiB compressed / ~131 MiB uncompressed imagenix run .#container-testpasses 15/15 structural checksnix fmt -- --checkpasses on all Nix files