feat: add Nix flake and Devbox support#3
Open
levonk wants to merge 1 commit into
Open
Conversation
Add a Nix flake that wraps the prebuilt release tarball so cliare can be installed and run directly from GitHub with Nix, plus a Devbox environment for reproducible development. - flake.nix: packages.cliare and apps.cliare (plus default) for x86_64/aarch64 linux and darwin, wrapping the prebuilt release binary with autoPatchelfHook on Linux. - .github/workflows/nix-release.yml: scheduled daily lag-check that auto-bumps the pinned version and per-platform SRI hashes and opens a PR when flake.nix falls behind the latest release. Uses the scheduled variant because releases are created with GITHUB_TOKEN, which does not start new workflow runs. - devbox.json: rustc, cargo, rust-analyzer with build/test/check scripts. - .gitignore: ignore Nix build result symlinks. - README.md: add Nix and Devbox install subsections. - CHANGELOG.md: add Unreleased entry.
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.
What
Adds a
flake.nixso the project can be installed and run directly from GitHub at the latest release:The flake tracks the default branch and is auto-bumped to the latest release by a daily workflow, so
github:modiqo/cliarealways serves the current release.Adds a
devbox.jsonfor reproducible development environments:Why
For users who already have Nix installed, a flake provides:
nix run github:modiqo/cliarewith no clone or manual build steps.flake.lock. If it builds today, it builds in ten years.nix profile installtwice is a no-op.nix profile rollbackrestores the previous profile generation instantly.nix profile removeleaves no residue.Changes
flake.nix: Nix flake wrapping the prebuilt release tarball aspackages.<system>.defaultandapps.<system>.default, plus the namedcliareoutput for both.flake.lock: pinnednixpkgs-unstableinput..github/workflows/nix-release.yml: scheduled lag-check automation that auto-bumpsversion+ per-platformsha256hashes and opens a PR whenflake.nixfalls behind the latest release.devbox.json: Devbox configuration for reproducible development environments..gitignore: Added Nix build result symlinks.README.md: Added Nix and Devbox installation subsections.CHANGELOG.md: Added Unreleased changelog entry.Testing
Verified locally:
Builds and runs successfully on
aarch64-darwin.Notes
github:.../vX.Y.Z) is not supported — release tags are cut before the bump workflow updatesflake.nix. Usegithub:.../(tracks default branch) or pin to a commit SHA.GITHUB_TOKEN, which does not start new workflow runs; arelease: publishedtrigger would silently never fire.Scope
The PR scope is well-contained — additive only, no existing functionality affected.
Related
Resolves #2