refactor(flake): read version from Cargo.toml
Extract version from Cargo.toml using builtins.fromTOML as single source of truth instead of hardcoding "0.1.0" in derivations.
This commit is contained in:
parent
02c2310d53
commit
9d1b47d19e
1 changed files with 4 additions and 1 deletions
|
|
@ -30,6 +30,9 @@
|
|||
inherit (nixpkgs) lib;
|
||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
||||
|
||||
# Read version from Cargo.toml as single source of truth
|
||||
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version;
|
||||
|
||||
mkPkgs =
|
||||
system:
|
||||
import nixpkgs {
|
||||
|
|
@ -58,7 +61,7 @@
|
|||
commonArgs = {
|
||||
src = craneLib.path ./.;
|
||||
pname = "streamd";
|
||||
version = "0.1.0";
|
||||
inherit version;
|
||||
strictDeps = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue