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:
Gerred Dillon
2025-04-18 01:52:54 -04:00
committed by GitHub
parent 393801fd7a
commit 41b8fe08dd
4 changed files with 141 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
- [Funding Opportunity](#funding-opportunity)
- [Contributing](#contributing)
- [Development workflow](#development-workflow)
- [Nix Flake Development](#nix-flake-development)
- [Writing highimpact 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 highimpact 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.