mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 10:45:58 +01:00
build: remove nv patches (#3957)
This commit is contained in:
parent
ad3f688648
commit
cd96ceecc5
8 changed files with 22 additions and 72 deletions
1
.github/workflows/nix-build.yml
vendored
1
.github/workflows/nix-build.yml
vendored
|
@ -10,7 +10,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
package:
|
package:
|
||||||
- hyprland
|
- hyprland
|
||||||
- hyprland-nvidia
|
|
||||||
- xdg-desktop-portal-hyprland
|
- xdg-desktop-portal-hyprland
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
hyprland
|
hyprland
|
||||||
hyprland-unwrapped
|
hyprland-unwrapped
|
||||||
hyprland-debug
|
hyprland-debug
|
||||||
hyprland-nvidia
|
|
||||||
# hyprland-extras
|
# hyprland-extras
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
xcbutilwm,
|
xcbutilwm,
|
||||||
xwayland,
|
xwayland,
|
||||||
debug ? false,
|
debug ? false,
|
||||||
enableNvidiaPatches ? false,
|
|
||||||
enableXWayland ? true,
|
enableXWayland ? true,
|
||||||
legacyRenderer ? false,
|
legacyRenderer ? false,
|
||||||
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
||||||
|
@ -35,13 +34,15 @@
|
||||||
version ? "git",
|
version ? "git",
|
||||||
commit,
|
commit,
|
||||||
# deprecated flags
|
# deprecated flags
|
||||||
|
enableNvidiaPatches ? false,
|
||||||
nvidiaPatches ? false,
|
nvidiaPatches ? false,
|
||||||
hidpiXWayland ? 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";
|
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "hyprland${lib.optionalString enableNvidiaPatches "-nvidia"}${lib.optionalString debug "-debug"}";
|
pname = "hyprland${lib.optionalString debug "-debug"}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
src = lib.cleanSourceWith {
|
src = lib.cleanSourceWith {
|
||||||
|
@ -82,7 +83,7 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
|
||||||
wayland
|
wayland
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
pciutils
|
pciutils
|
||||||
(wlroots.override {inherit enableNvidiaPatches;})
|
wlroots
|
||||||
]
|
]
|
||||||
++ lib.optionals enableXWayland [libxcb xcbutilwm xwayland]
|
++ lib.optionals enableXWayland [libxcb xcbutilwm xwayland]
|
||||||
++ lib.optionals withSystemd [systemd];
|
++ lib.optionals withSystemd [systemd];
|
||||||
|
|
|
@ -7,7 +7,6 @@ self: {
|
||||||
cfg = config.wayland.windowManager.hyprland;
|
cfg = config.wayland.windowManager.hyprland;
|
||||||
defaultHyprlandPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
defaultHyprlandPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||||
enableXWayland = cfg.xwayland.enable;
|
enableXWayland = cfg.xwayland.enable;
|
||||||
inherit (cfg) enableNvidiaPatches;
|
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
disabledModules = ["services/window-managers/hyprland.nix"];
|
disabledModules = ["services/window-managers/hyprland.nix"];
|
||||||
|
@ -35,12 +34,10 @@ in {
|
||||||
defaultText = lib.literalExpression ''
|
defaultText = lib.literalExpression ''
|
||||||
hyprland.packages.''${pkgs.stdenv.hostPlatform.system}.default.override {
|
hyprland.packages.''${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||||
enableXWayland = config.wayland.windowManager.hyprland.xwayland.enable;
|
enableXWayland = config.wayland.windowManager.hyprland.xwayland.enable;
|
||||||
inherit (config.wayland.windowManager.hyprland) enableNvidiaPatches;
|
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Hyprland package to use. Will override the 'xwayland' and
|
Hyprland package to use. Will override the 'xwayland' option.
|
||||||
'enableNvidiaPatches' options.
|
|
||||||
|
|
||||||
Defaults to the one provided by the flake. Set it to
|
Defaults to the one provided by the flake. Set it to
|
||||||
{package}`pkgs.hyprland` to use the one provided by nixpkgs or
|
{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;};
|
xwayland.enable = lib.mkEnableOption (lib.mdDoc "XWayland") // {default = true;};
|
||||||
|
|
||||||
enableNvidiaPatches = lib.mkEnableOption (lib.mdDoc "patching wlroots for better Nvidia support.");
|
|
||||||
|
|
||||||
extraConfig = lib.mkOption {
|
extraConfig = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.lines;
|
type = lib.types.nullOr lib.types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -173,5 +168,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
(lib.mkRemovedOptionModule ["wayland" "windowManager" "hyprland" "xwayland" "hidpi"]
|
(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")
|
"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")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@ in {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = cfg.package.override {
|
default = cfg.package.override {
|
||||||
enableXWayland = cfg.xwayland.enable;
|
enableXWayland = cfg.xwayland.enable;
|
||||||
enableNvidiaPatches = cfg.enableNvidiaPatches;
|
|
||||||
};
|
};
|
||||||
defaultText =
|
defaultText =
|
||||||
literalExpression
|
literalExpression
|
||||||
|
@ -50,12 +49,6 @@ in {
|
||||||
portalPackage = mkPackageOptionMD inputs.xdph.packages.${system} "xdg-desktop-portal-hyprland" {};
|
portalPackage = mkPackageOptionMD inputs.xdph.packages.${system} "xdg-desktop-portal-hyprland" {};
|
||||||
|
|
||||||
xwayland.enable = mkEnableOption (mdDoc "support for XWayland") // {default = true;};
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
@ -91,9 +84,14 @@ in {
|
||||||
"XWayland patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland"
|
"XWayland patches are deprecated. Refer to https://wiki.hyprland.org/Configuring/XWayland"
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
mkRenamedOptionModule
|
mkRemovedOptionModule
|
||||||
["programs" "hyprland" "nvidiaPatches"]
|
|
||||||
["programs" "hyprland" "enableNvidiaPatches"]
|
["programs" "hyprland" "enableNvidiaPatches"]
|
||||||
|
"Nvidia patches are no longer needed"
|
||||||
|
)
|
||||||
|
(
|
||||||
|
mkRemovedOptionModule
|
||||||
|
["programs" "hyprland" "nvidiaPatches"]
|
||||||
|
"Nvidia patches are no longer needed"
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,12 @@ in {
|
||||||
};
|
};
|
||||||
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
||||||
hyprland-debug = final.hyprland.override {debug = true;};
|
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 =
|
hyprland-hidpi =
|
||||||
builtins.trace ''
|
builtins.trace ''
|
||||||
hyprland-hidpi was removed. Please use the hyprland package.
|
hyprland-hidpi was removed. Please use the hyprland package.
|
||||||
|
|
|
@ -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,
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
version,
|
version,
|
||||||
src,
|
src,
|
||||||
wlroots,
|
wlroots,
|
||||||
|
@ -7,18 +6,11 @@
|
||||||
libdisplay-info,
|
libdisplay-info,
|
||||||
libliftoff,
|
libliftoff,
|
||||||
enableXWayland ? true,
|
enableXWayland ? true,
|
||||||
enableNvidiaPatches ? false,
|
|
||||||
}:
|
}:
|
||||||
wlroots.overrideAttrs (old: {
|
wlroots.overrideAttrs (old: {
|
||||||
inherit version src enableXWayland;
|
inherit version src enableXWayland;
|
||||||
|
|
||||||
pname = "${old.pname}-hyprland${lib.optionalString enableNvidiaPatches "-nvidia"}";
|
pname = "${old.pname}-hyprland";
|
||||||
|
|
||||||
patches =
|
|
||||||
(old.patches or [])
|
|
||||||
++ (lib.optionals enableNvidiaPatches [
|
|
||||||
./patches/wlroots-nvidia.patch
|
|
||||||
]);
|
|
||||||
|
|
||||||
buildInputs = old.buildInputs ++ [hwdata libliftoff libdisplay-info];
|
buildInputs = old.buildInputs ++ [hwdata libliftoff libdisplay-info];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue