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, enabling one-command install/run via nix run github:clidey/deptrust and nix profile install github:clidey/deptrust. - flake.nix: Prebuilt Tarball Flake with per-platform SHA256 hashes for x86_64/aarch64 Linux and Darwin - devbox.json: Go development environment with build/test/run scripts - .github/workflows/nix-release.yml: scheduled lag-check automation that auto-bumps version + hashes when a new release is detected - .github/workflows/nix.yml: CI validation for flake evaluations - README.md: Nix and Devbox installation subsections - .gitignore: Nix build result symlinks
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:clidey/deptrustalways 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:clidey/deptrustwith 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.flake.lock: pinnednixpkgs-unstableinput..github/workflows/nix-release.yml: scheduled lag-check automation (daily at 06:17 UTC) 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 installation subsection..github/workflows/nix.yml: GitHub Actions CI for Nix validation.Testing
Verified locally:
Builds and runs successfully on
macOS (Apple Silicon & Intel)andLinux.Notes
github:.../vX.Y.Z) is not supported — release tags are cut before the bump workflow updatesflake.nix. Usegithub:clidey/deptrust(tracks default branch) or pin to a commit SHA.nix-release.ymlworkflow uses a scheduled lag-check (daily at 06:17 UTC) because releases are created withGITHUB_TOKEN, which does not triggerrelease: publishedworkflows.Scope
The PR scope is well-contained — additive only, no existing functionality affected.
Related
Resolves #2