aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/nix-build.yml1
-rw-r--r--flake.nix1
-rw-r--r--nix/default.nix9
-rw-r--r--nix/hm-module.nix9
-rw-r--r--nix/module.nix16
-rw-r--r--nix/overlays.nix7
-rw-r--r--nix/patches/wlroots-nvidia.patch41
-rw-r--r--nix/wlroots.nix10
8 files changed, 22 insertions, 72 deletions
diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml
index fb98f099..a1ea0f24 100644
--- a/.github/workflows/nix-build.yml
+++ b/.github/workflows/nix-build.yml
@@ -10,7 +10,6 @@ jobs:
matrix:
package:
- hyprland
- - hyprland-nvidia
- xdg-desktop-portal-hyprland
runs-on: ubuntu-latest
diff --git a/flake.nix b/flake.nix
index 6c5387c3..58f45c58 100644
--- a/flake.nix
+++ b/flake.nix
@@ -65,7 +65,6 @@
hyprland
hyprland-unwrapped
hyprland-debug
- hyprland-nvidia
# hyprland-extras
xdg-desktop-portal-hyprland
# dependencies
diff --git a/nix/default.nix b/nix/default.nix
index 63ef838e..42808a5f 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -27,7 +27,6 @@
xcbutilwm,
xwayland,
debug ? false,
- enableNvidiaPatches ? false,
enableXWayland ? true,
legacyRenderer ? false,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
@@ -35,13 +34,15 @@
version ? "git",
commit,
# deprecated flags
+ enableNvidiaPatches ? false,
nvidiaPatches ? false,
hidpiXWayland ? false,
}:
-assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been renamed `enableNvidiaPatches`";
+assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
+assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
stdenv.mkDerivation {
- pname = "hyprland${lib.optionalString enableNvidiaPatches "-nvidia"}${lib.optionalString debug "-debug"}";
+ pname = "hyprland${lib.optionalString debug "-debug"}";
inherit version;
src = lib.cleanSourceWith {
@@ -82,7 +83,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
wayland
wayland-protocols
pciutils
- (wlroots.override {inherit enableNvidiaPatches;})
+ wlroots
]
++ lib.optionals enableXWayland [libxcb xcbutilwm xwayland]
++ lib.optionals withSystemd [systemd];
diff --git a/nix/hm-module.nix b/nix/hm-module.nix
index 123bceb3..9b065e6f 100644
--- a/nix/hm-module.nix
+++ b/nix/hm-module.nix
@@ -7,7 +7,6 @@ self: {
cfg = config.wayland.windowManager.hyprland;
defaultHyprlandPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
enableXWayland = cfg.xwayland.enable;
- inherit (cfg) enableNvidiaPatches;
};
in {
disabledModules = ["services/window-managers/hyprland.nix"];
@@ -35,12 +34,10 @@ in {
defaultText = lib.literalExpression ''
hyprland.packages.''${pkgs.stdenv.hostPlatform.system}.default.override {
enableXWayland = config.wayland.windowManager.hyprland.xwayland.enable;
- inherit (config.wayland.windowManager.hyprland) enableNvidiaPatches;
}
'';
description = lib.mdDoc ''
- Hyprland package to use. Will override the 'xwayland' and
- 'enableNvidiaPatches' options.
+ Hyprland package to use. Will override the 'xwayland' option.
Defaults to the one provided by the flake. Set it to
{package}`pkgs.hyprland` to use the one provided by nixpkgs or
@@ -86,8 +83,6 @@ in {
xwayland.enable = lib.mkEnableOption (lib.mdDoc "XWayland") // {default = true;};
- enableNvidiaPatches = lib.mkEnableOption (lib.mdDoc "patching wlroots for better Nvidia support.");
-
extraConfig = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = "";
@@ -173,5 +168,7 @@ in {
imports = [
(lib.mkRemovedOptionModule ["wayland" "windowManager" "hyprland" "xwayland" "hidpi"]
"Support for this option has been removed. Refer to https://wiki.hyprland.org/Configuring/XWayland for more info")
+ (lib.mkRemovedOptionModule ["wayland" "windowManager" "hyprland" "xwayland" "enableNvidiaPatches"]
+ "Nvidia patches are no longer needed for Hyprland")
];
}
diff --git a/nix/module.nix b/nix/module.nix
index fcb29837..1f1d2585 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -37,7 +37,6 @@ in {
readOnly = true;
default = cfg.package.override {
enableXWayland = cfg.xwayland.enable;
- enableNvidiaPatches = cfg.enableNvidiaPatches;
};
defaultText =
literalExpression
@@ -50,12 +49,6 @@ in {
portalPackage = mkPackageOptionMD inputs.xdph.packages.${system} "xdg-desktop-portal-hyprland" {};
xwayland.enable = mkEnableOption (mdDoc "support for XWayland") // {default = true;};
-
- enableNvidiaPatches =
- mkEnableOption null
- // {
- description = mdDoc "Whether to apply patches to wlroots for better Nvidia support.";
- };
};
config = mkIf cfg.enable {
@@ -91,9 +84,14 @@ in {
"XWayland patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland"
)
(
- mkRenamedOptionModule
- ["programs" "hyprland" "nvidiaPatches"]
+ mkRemovedOptionModule
["programs" "hyprland" "enableNvidiaPatches"]
+ "Nvidia patches are no longer needed"
+ )
+ (
+ mkRemovedOptionModule
+ ["programs" "hyprland" "nvidiaPatches"]
+ "Nvidia patches are no longer needed"
)
];
}
diff --git a/nix/overlays.nix b/nix/overlays.nix
index 3c38d740..9ad623fe 100644
--- a/nix/overlays.nix
+++ b/nix/overlays.nix
@@ -38,7 +38,12 @@ in {
};
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
hyprland-debug = final.hyprland.override {debug = true;};
- hyprland-nvidia = final.hyprland.override {enableNvidiaPatches = true;};
+ hyprland-nvidia =
+ builtins.trace ''
+ hyprland-nvidia was removed. Please use the hyprland package.
+ Nvidia patches are no longer needed.
+ ''
+ final.hyprland;
hyprland-hidpi =
builtins.trace ''
hyprland-hidpi was removed. Please use the hyprland package.
diff --git a/nix/patches/wlroots-nvidia.patch b/nix/patches/wlroots-nvidia.patch
deleted file mode 100644
index 01bdd342..00000000
--- a/nix/patches/wlroots-nvidia.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
-index 9fe934f7..9662d4ee 100644
---- a/render/gles2/renderer.c
-+++ b/render/gles2/renderer.c
-@@ -176,7 +176,7 @@ static bool gles2_bind_buffer(struct wlr_renderer *wlr_renderer,
- assert(wlr_egl_is_current(renderer->egl));
-
- push_gles2_debug(renderer);
-- glFlush();
-+ glFinish();
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- pop_gles2_debug(renderer);
-
-diff --git a/types/output/render.c b/types/output/render.c
-index 2e38919a..97f78608 100644
---- a/types/output/render.c
-+++ b/types/output/render.c
-@@ -240,22 +240,7 @@ bool output_pick_format(struct wlr_output *output,
- }
-
- uint32_t wlr_output_preferred_read_format(struct wlr_output *output) {
-- struct wlr_renderer *renderer = output->renderer;
-- assert(renderer != NULL);
--
-- if (!renderer->impl->preferred_read_format || !renderer->impl->read_pixels) {
-- return DRM_FORMAT_INVALID;
-- }
--
-- if (!wlr_output_attach_render(output, NULL)) {
-- return false;
-- }
--
-- uint32_t fmt = renderer->impl->preferred_read_format(renderer);
--
-- output_clear_back_buffer(output);
--
-- return fmt;
-+ return DRM_FORMAT_XRGB8888;
- }
-
- struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
diff --git a/nix/wlroots.nix b/nix/wlroots.nix
index c1aa27de..f48ba35c 100644
--- a/nix/wlroots.nix
+++ b/nix/wlroots.nix
@@ -1,5 +1,4 @@
{
- lib,
version,
src,
wlroots,
@@ -7,18 +6,11 @@
libdisplay-info,
libliftoff,
enableXWayland ? true,
- enableNvidiaPatches ? false,
}:
wlroots.overrideAttrs (old: {
inherit version src enableXWayland;
- pname = "${old.pname}-hyprland${lib.optionalString enableNvidiaPatches "-nvidia"}";
-
- patches =
- (old.patches or [])
- ++ (lib.optionals enableNvidiaPatches [
- ./patches/wlroots-nvidia.patch
- ]);
+ pname = "${old.pname}-hyprland";
buildInputs = old.buildInputs ++ [hwdata libliftoff libdisplay-info];