feat: add Nix flake for reproducible development environments (#225)
This PR introduces a Nix flake configuration to enable reproducible development environments: - Adds flake.nix defining a devShell with necessary dependencies. - Updates README.md with usage instructions for `nix develop`. - Ensures CI compatibility with Nix for consistent builds.
This commit is contained in:
26
README.md
26
README.md
@@ -26,6 +26,7 @@
|
||||
- [Funding Opportunity](#funding-opportunity)
|
||||
- [Contributing](#contributing)
|
||||
- [Development workflow](#development-workflow)
|
||||
- [Nix Flake Development](#nix-flake-development)
|
||||
- [Writing high‑impact code changes](#writing-highimpact-code-changes)
|
||||
- [Opening a pull request](#opening-a-pull-request)
|
||||
- [Review process](#review-process)
|
||||
@@ -412,6 +413,31 @@ npm run lint:fix
|
||||
npm run format:fix
|
||||
```
|
||||
|
||||
#### Nix Flake Development
|
||||
|
||||
Prerequisite: Nix >= 2.4 with flakes enabled (`experimental-features = nix-command flakes` in `~/.config/nix/nix.conf`).
|
||||
|
||||
Enter a Nix development shell:
|
||||
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
This shell includes Node.js, installs dependencies, builds the CLI, and provides a `codex` command alias.
|
||||
|
||||
Build and run the CLI directly:
|
||||
|
||||
```bash
|
||||
nix build
|
||||
./result/bin/codex --help
|
||||
```
|
||||
|
||||
Run the CLI via the flake app:
|
||||
|
||||
```bash
|
||||
nix run .#codex
|
||||
```
|
||||
|
||||
### Writing high‑impact code changes
|
||||
|
||||
1. **Start with an issue.** Open a new one or comment on an existing discussion so we can agree on the solution before code is written.
|
||||
|
||||
Reference in New Issue
Block a user