1jehuang / 1jehuang/jcode

[RFC] Add Nix Flake for Development and Distribution

Open
#115 2 comments 8 reactions 0 assignees View on GitHub

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 develop for 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 crane for 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

  1. Add flake.nix to root of repository
  2. Use crane for deterministic builds with dependency caching
  3. Include:
    • packages.default - build jcode binary
    • devShells.default - development environment
    • checks - clippy + fmt validation
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.