nixos-configs/packages/piper/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

22 lines
453 B
Nix

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