feat(nix): make flake read version from makefile

This commit is contained in:
2025-07-05 22:28:02 +02:00
parent 3ad16d3a3c
commit 22c75a37e1

View File

@@ -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 {