feat(nix/package): extract package version from Cargo.toml #14

Closed
krauterbaquette wants to merge 1 commit from nix-version into dev

Currently when we update the version of a bot, we have to updste the
version in two places:

  • Cargo.toml
  • nix/package.nix

this will lead to version mismatches (and we currently have one for the
soko-command-bot).
To fix this issue, we stop hardcoding the version inside nix/version.nix
but extract it at built time from the respected Cargo.toml


name: 'PR-Template'
about: 'Standardized PRs'


Checklist

  • The code is well documented
  • I bumped the version if it is necessary

PR Description

...

Currently when we update the version of a bot, we have to updste the version in two places: - Cargo.toml - nix/package.nix this will lead to version mismatches (and we currently have one for the soko-command-bot). To fix this issue, we stop hardcoding the version inside nix/version.nix but extract it at built time from the respected Cargo.toml --- name: 'PR-Template' about: 'Standardized PRs' <!-- title: '[TEST] ' ref: 'main' labels: - bug - 'help needed' --> --- ## Checklist - [ ] The code is well documented - [ ] I bumped the version if it is necessary ## PR Description ...
Currently when we update the version of a bot, we have to updste the
version in two places:
- Cargo.toml
- nix/package.nix

this will lead to version mismatches (and we currently have one for the
soko-command-bot).
To fix this issue, we stop hardcoding the version inside nix/version.nix
but extract it at built time from the respected Cargo.toml
aviac approved these changes 2025-08-09 06:40:43 +00:00
aviac left a comment
Owner

Great idea! Let's merge it

Great idea! Let's merge it
Owner

Let's put it into nix-rust though

Let's put it into [nix-rust](https://git.solarpunk.social/solarpunk-kollektiv-dd/nix-rust/src/branch/main/nix/lib.nix) though
aviac closed this pull request 2025-08-09 06:40:57 +00:00
aviac referenced this pull request from a commit 2025-08-09 07:22:55 +00:00
aviac referenced this pull request from a commit 2025-08-09 07:26:34 +00:00
aviac referenced this pull request from a commit 2025-08-26 17:26:58 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
solarpunk-kollektiv-dd/soko-command-bot!14
No description provided.