nix: add COMMITS var

This commit is contained in:
Mihai Fufezan 2024-07-21 20:54:57 +03:00
parent 4a42c5ed20
commit c80457be02
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
2 changed files with 3 additions and 1 deletions

View file

@ -39,6 +39,7 @@
wrapRuntimeDeps ? true,
version ? "git",
commit,
revCount,
date,
# deprecated flags
enableNvidiaPatches ? false,
@ -73,7 +74,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
sed -i "s#@PREFIX@/##g" hyprland.pc.in
'';
COMMITS = commit;
COMMITS = revCount;
DATE = date;
DIRTY = lib.optionalString (commit == "") "dirty";
HASH = commit;

View file

@ -34,6 +34,7 @@ in {
stdenv = final.gcc14Stdenv;
version = "${version}+date=${date}_${self.shortRev or "dirty"}";
commit = self.rev or "";
revCount = self.sourceInfo.revCount or "";
inherit date;
};
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};