hyprland: use substituteInPlace in postPatch

Allows us to be notified in case the `sed` expressions become
irrelevant.
This commit is contained in:
Doron Behar
2026-01-14 18:40:49 +02:00
parent cd2b619033
commit 9712420a2c
+6 -3
View File
@@ -103,11 +103,14 @@ customStdenv.mkDerivation (finalAttrs: {
postPatch = ''
# Fix hardcoded paths to /usr installation
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
substituteInPlace src/render/OpenGL.cpp \
--replace-fail /usr $out
# Remove extra @PREFIX@ to fix pkg-config paths
sed -i "s#@PREFIX@/##g" hyprland.pc.in
sed -i "s#@PREFIX@/##g" example/hyprland.desktop.in
substituteInPlace hyprland.pc.in \
--replace-fail @PREFIX@ ""
substituteInPlace example/hyprland.desktop.in \
--replace-fail @PREFIX@ ""
'';
# variables used by CMake, and shown in `hyprctl version`