nixos-configs/packages/libratbag/default.nix
matt1432 c91c8e703e
All checks were successful
Discord / discord commits (push) Has been skipped
fix(pkgs): improve versioning
2024-08-04 13:52:41 -04:00

15 lines
373 B
Nix

{
lib,
libratbag-src,
libratbag,
...
}: let
inherit (lib) elemAt match readFile splitString;
releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version : '" (readFile "${libratbag-src}/meson.build")) 1)) 0;
in
libratbag.overrideAttrs {
pname = "libratbag";
version = "${releaseVer}+${libratbag-src.shortRev}";
src = libratbag-src;
}