diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index 8810cc91cff4..d21d7f572c96 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -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`