Open
Conversation
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.
What / Why / How
Add Nix flake packaging for
context-modeso the project can be built and run as a Nix package instead of only via npm-style installation. This adds a minimal flake-based package that wraps the bundled CLI withnodejs_22, includes the runtime assets the CLI expects next to itself, enablesallowUnfreein the flake-local Nixpkgs import for the project's Elastic-2.0 license, and exposes the package as bothpackages.defaultandpackages.context-modeplus anapps.defaultentry fornix run.Affected platforms
Test plan
nix build .#context-mode./result/bin/context-mode --help./result/bin/context-mode doctornix run .# -- --helpnode,tsx, andpython3from the wrappedPATHChecklist
npm testpassesnpm run typecheckpassesnextbranch (unless hotfix)Cross-platform notes
Our CI runs on Ubuntu, macOS, and Windows.
cli.bundle.mjsand installs runtime assets alongside it, matching the existing relative-path expectations in the CLInodejs_22is used so Linux builds can rely on the built-in SQLite path already supported by the projectallowUnfreeis configured in the flake's localnixpkgsimport, so users do not need--impureor external Nix config to build the package