From 41ca1fce03f10625feffec2798f97cbe98798236 Mon Sep 17 00:00:00 2001 From: Konstantin Fickel Date: Thu, 2 Apr 2026 22:54:11 +0200 Subject: [PATCH] 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. --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d0c3479..430150f 100644 --- a/flake.nix +++ b/flake.nix @@ -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; };