-
-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: move wlroots and add nvidia patches (#608)
- Loading branch information
Showing
4 changed files
with
68 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
version, | ||
src, | ||
# | ||
wlroots, | ||
xwayland, | ||
fetchpatch, | ||
lib, | ||
hidpiXWayland ? true, | ||
enableXWayland ? true, | ||
nvidiaPatches ? false, | ||
}: | ||
assert (lib.assertMsg (hidpiXWayland -> enableXWayland) '' | ||
wlroots-hyprland: cannot have hidpiXWayland when enableXWayland is false. | ||
''); | ||
(wlroots.overrideAttrs | ||
(old: { | ||
inherit version src; | ||
pname = | ||
old.pname | ||
+ "-hyprland" | ||
+ ( | ||
if hidpiXWayland | ||
then "-hidpi" | ||
else "" | ||
) | ||
+ ( | ||
if nvidiaPatches | ||
then "-nvidia" | ||
else "" | ||
); | ||
patches = | ||
(old.patches or []) | ||
++ (lib.optionals (enableXWayland && hidpiXWayland) [ | ||
(fetchpatch { | ||
url = "https://gitlab.freedesktop.org/lilydjwg/wlroots/-/commit/6c5ffcd1fee9e44780a6a8792f74ecfbe24a1ca7.diff"; | ||
sha256 = "sha256-Eo1pTa/PIiJsRZwIUnHGTIFFIedzODVf0ZeuXb0a3TQ="; | ||
}) | ||
(fetchpatch { | ||
url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/18595000f3a21502fd60bf213122859cc348f9af.diff"; | ||
sha256 = "sha256-jvfkAMh3gzkfuoRhB4E9T5X1Hu62wgUjj4tZkJm0mrI="; | ||
revert = true; | ||
}) | ||
]); | ||
postPatch = | ||
(old.postPatch or "") | ||
+ ( | ||
if nvidiaPatches | ||
then '' | ||
substituteInPlace render/gles2/renderer.c --replace "glFlush();" "glFinish();" | ||
'' | ||
else "" | ||
); | ||
})) | ||
.override { | ||
xwayland = xwayland.overrideAttrs (old: { | ||
patches = | ||
(old.patches or []) | ||
++ (lib.optionals hidpiXWayland [ | ||
./xwayland-vsync.patch | ||
./xwayland-hidpi.patch | ||
]); | ||
}); | ||
} |