nix: Add the commit to the version #25

Merged
dev merged 1 commits from build-version into main 2026-11-29 18:47:33 +00:00

Builds from the flake add the commit they are from to the version, as semver build metadata: 0.3.0+2d59b59, or 0.3.0+2d59b59-dirty from an uncommitted tree (Nix's dirtyShortRev). A plain cargo build still says 0.3.0.

It shows:

  • in the web app's header;
  • in --version, which slop and slop-broker now take;
  • in the broker's error for an old protocol, so a stale client says which broker it reached.

The commit goes into the derivation, so every commit rebuilds the package, including commits that only touch nix/ or docs. For nixfiles that only happens when the pin moves.

🤖 Generated with Claude Code

Builds from the flake add the commit they are from to the version, as semver build metadata: `0.3.0+2d59b59`, or `0.3.0+2d59b59-dirty` from an uncommitted tree (Nix's `dirtyShortRev`). A plain `cargo build` still says `0.3.0`. It shows: - in the web app's header; - in `--version`, which `slop` and `slop-broker` now take; - in the broker's error for an old protocol, so a stale client says which broker it reached. The commit goes into the derivation, so every commit rebuilds the package, including commits that only touch `nix/` or docs. For nixfiles that only happens when the pin moves. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
slop-cannon Bot added 1 commit 2026-11-29 18:29:26 +00:00
nix: Add the commit to the version
CI / Check (pull_request) Successful in 5m45s
CI / Check (push) Successful in 5m42s
70a42f6a21
Builds from the flake show the commit they are from in the version,
like `0.3.0+2d59b59`, or `0.3.0+2d59b59-dirty` with uncommitted
changes. It shows in the web app, in `--version`, which `slop` and
`slop-broker` now take, and in the error for an old protocol.

The commit is part of the build, so every commit rebuilds the package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev merged commit 70a42f6a21 into main 2026-11-29 18:47:33 +00:00
dev deleted branch build-version 2026-11-29 18:47:33 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/slop-broker#25