Add Nix flake and nixpkgs overlay for the CLI - #257
Closed
Matt (matt-evervault) wants to merge 2 commits into
Closed
Add Nix flake and nixpkgs overlay for the CLI#257Matt (matt-evervault) wants to merge 2 commits into
Matt (matt-evervault) wants to merge 2 commits into
Conversation
Adds a Nix package definition for the Evervault CLI so it can be built from source with Nix, either via the flake (`nix run github:evervault/evervault-cli`) or by adding the overlay to a local nixpkgs config, which makes `nix-shell -p evervault-cli` work. The package pins a released tag rather than tracking the checkout, and mirrors the release workflow's version injection so `ev --version` reports the real version instead of `1.0.0-dev`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Vaultkeeper Commands Mention
You can also request |
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 Nix package definition for the Evervault CLI:
nix/evervault-cli.nix—rustPlatform.buildRustPackageforev, pinned to thev4.5.1tag on GitHubnix/overlay.nix— nixpkgs overlay exposing it aspkgs.evervault-cliflake.nix/flake.lock— exposespackages.<system>.evervault-cli(anddefault) plusoverlays.defaultWhy
So the CLI can be installed with Nix instead of
curl | sh. Two ways to use it:or, after dropping the overlay in
~/.config/nixpkgs/overlays/(see README):This isn't in nixpkgs upstream, so the overlay has to be added per-machine — that's deliberate, no packaging-submission work implied.
Notes
nix/evervault-cli.nixneeds itsversion+srcHashbumped on each release. Deliberate: it keepsnix rungiving you a real release, and avoids the flake breaking whenevermainis mid-flight.postPatchmirrorscrates/ev-cli/scripts/insert-cli-version.shsoev --versionreports4.5.1, not1.0.0-dev.OPENSSL_NO_VENDOR=1—ev-cliturns on openssl'svendoredfeature; this builds against nixpkgs' openssl instead, which is the nixpkgs convention.doCheck = false— the test suite talks to the Evervault API.Verified locally (aarch64-darwin)
nix build .#evervault-cli→./result/bin/ev --versionprintsEvervault CLI 4.5.1<nixpkgs>builds and runs the same binarynix flake showevaluates cleanly for all four darwin/linux systemsNot tested on Linux.
🤖 Generated with Claude Code