Open
Conversation
This commit introduces a Nix flake to manage the C development environment for AnsiLove. It includes the necessary dependencies like `cmake`, `ninja`, `pkg-config`, `clang`, `libansilove`, `gd`, `zlib`, and `libpng`. The `devShells.default` is configured to set up `CMAKE_PREFIX_PATH` and `PKG_CONFIG_PATH` for proper dependency discovery.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a Nix flake to provide reproducible development environment and distribution for AnsiLove/C. The flake ensures consistent dependencies across platforms and eliminates system-specific build issues.
- Adds a complete Nix flake with development shell, build package, and app entry points
- Creates comprehensive developer documentation in AGENTS.md covering build workflows and coding standards
- Configures direnv integration for automatic environment loading
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| flake.nix | Complete Nix flake definition with development shell, package build, and app configuration |
| AGENTS.md | Comprehensive developer documentation including Nix workflows, coding standards, and testing guidelines |
| CLAUDE.md | Single line file containing "AGENTS.md" |
| .envrc | Direnv configuration to automatically load the Nix flake environment |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
EDIT: also allows running ansilove without installing it first via nix like this:
nix run 'github:effect-native/ansilove?ref=nix-flake' -- -hand if you accept this PR then also:
Summary
nix developshell that carries the right libs and toolchain with zero system deps.nix run/nix buildentry points so downstreams (or CI) can fetch and execute the CLI without cloning or manual CMake steps.AGENTS.mdso future contributors know how to use the flake.Why it matters
nix developreplaces manual brewing of dependencies..cache,.direnv,result, and test PNGs are ignored.nix run github:effect-native/ansilove -hmakes distribution trivial for users and web demos.nix flake check --all-systems) so regressions on Linux/macOS get caught early.Testing
nix flake check --all-systemsnix develop .#default --command bash -lc 'cmake -S . -B build && cmake --build build && ctest --test-dir build --output-on-failure'nix build .#defaultnix run . -- -h