nix: show commit in hyprctl

This commit is contained in:
Mihai Fufezan 2023-03-04 17:34:15 +02:00
parent fea2031bfe
commit 5184b542b1
No known key found for this signature in database
GPG key ID: 5899325F2F120900
3 changed files with 17 additions and 0 deletions

View file

@ -32,6 +32,7 @@
nvidiaPatches ? false,
withSystemd ? true,
version ? "git",
commit,
}: let
assertXWayland = lib.assertMsg (hidpiXWayland -> enableXWayland) ''
Hyprland: cannot have hidpiXWayland when enableXWayland is false.
@ -102,6 +103,9 @@ in
postPatch = ''
# Fix hardcoded paths to /usr installation
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
substituteInPlace meson.build \
--replace "@GIT_COMMIT_HASH@" '${commit}' \
--replace "@GIT_DIRTY@" '${if commit == "" then "dirty" else ""}'
'';
passthru.providedSessions = ["hyprland"];