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;
|
inherit (nixpkgs) lib;
|
||||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
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 =
|
mkPkgs =
|
||||||
system:
|
system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
|
|
@ -58,7 +61,7 @@
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
src = craneLib.path ./.;
|
src = craneLib.path ./.;
|
||||||
pname = "streamd";
|
pname = "streamd";
|
||||||
version = "0.1.0";
|
inherit version;
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue