From 22c75a37e19ec6d01d122a8bee127f4c9e32c82a Mon Sep 17 00:00:00 2001 From: javalsai Date: Sat, 5 Jul 2025 22:28:02 +0200 Subject: [PATCH] feat(nix): make flake read version from makefile --- flake.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ecd90a1..6435871 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,11 @@ { + description = "A ✨fully✨ colorful customizable TUI display manager made in C for simplicity."; + inputs = { flake-utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; }; + outputs = { flake-utils, nixpkgs, ... }: flake-utils.lib.eachDefaultSystem ( @@ -11,7 +14,9 @@ pkgs = import nixpkgs { inherit system; }; name = "lidm"; - version = "0.0.2"; + version = builtins.elemAt ( + builtins.match "VERSION[[:blank:]]*=[[:space:]]*([^\n]*)\n.*" (builtins.readFile ./Makefile) + ) 0; lidm = ( pkgs.stdenv.mkDerivation {