[RFC] Add Nix Flake for Development and Distribution
Open
Nobody has claimed this yet.
enhancement
priority: low
triage: needs-decision
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
Add a flake.nix to enable building and developing jcode via Nix, following modern best practices.
Motivation
- Provide a reproducible build system for Nix users
- Enable
nix developfor contributors with a ready-made dev environment - Support NixOS distribution via flake inputs
- Alternative to existing installation methods (Homebrew, install scripts)
Existing Work
A community fork (faldor20/jcode#1) already has a working flake implementation that could be referenced:
- Uses
cranefor Rust builds - Includes devShell with rust-analyzer, rustfmt, clippy
- CI checks (clippy + cargo fmt)
- Sets required build env vars for git metadata in build.rs
Proposed Approach
- Add
flake.nixto root of repository - Use
cranefor deterministic builds with dependency caching - Include:
packages.default- build jcode binarydevShells.default- development environmentchecks- clippy + fmt validation
- Document in README under "Installation" section
System Dependencies
- Linux: openssl, libxcb, libX11
- macOS: AppKit, Security, SystemConfiguration (system libs)
Questions for Maintainer
- Should we also pursue adding to official nixpkgs? (requires Cargo.lock in repo)
- Preferred approach for versioning/updates?
References
- faldor20/jcode#1 (draft flake)
- nixpkgs contributing guidelines
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed flake in faldor20/jcode#1 and the repository's existing installation methods, then inspect the README Installation section and Cargo.lock status. The work is done when the root flake.nix provides the default package, devShell, and clippy/format checks, and the README documents Nix development and installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, cli, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100