Skip to content

Commit

Permalink
webkitgtk: re-enable WPE_RENDERER
Browse files Browse the repository at this point in the history
Build with WPE renderer is no longer tested upstream
https://bugs.webkit.org/show_bug.cgi?id=238513#c10
and that configuration is extremely buggy since 2.36.0:
#169201

Previously it was disabled in c0d053e.

(cherry picked from commit 303f80a)
  • Loading branch information
jtojnar committed May 19, 2022
1 parent df2284e commit 5c26aa8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkgs/development/libraries/webkitgtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
, gtk3
, wayland
, libwebp
, libwpe
, libwpe-fdo
, enchant2
, xorg
, libxkbcommon
Expand Down Expand Up @@ -81,7 +83,15 @@ stdenv.mkDerivation rec {
inherit (builtins) storeDir;
inherit (addOpenGLRunpath) driverLink;
})

./libglvnd-headers.patch

# Hardcode path to WPE backend
# https://github.com/NixOS/nixpkgs/issues/110468
(substituteAll {
src = ./fdo-backend-path.patch;
wpebackend_fdo = libwpe-fdo;
})
];

preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
Expand Down Expand Up @@ -163,6 +173,8 @@ stdenv.mkDerivation rec {
libseccomp
systemd
wayland
libwpe
libwpe-fdo
xdg-dbus-proxy
] ++ lib.optional enableGeoLocation geoclue2;

Expand All @@ -175,7 +187,6 @@ stdenv.mkDerivation rec {
"-DENABLE_INTROSPECTION=ON"
"-DPORT=GTK"
"-DUSE_LIBHYPHEN=OFF"
"-DUSE_WPE_RENDERER=OFF"
"-DUSE_SOUP2=${if lib.versions.major libsoup.version == "2" then "ON" else "OFF"}"
] ++ lib.optionals stdenv.isDarwin [
"-DENABLE_GAMEPAD=OFF"
Expand Down
11 changes: 11 additions & 0 deletions pkgs/development/libraries/webkitgtk/fdo-backend-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
+++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
@@ -89,7 +89,7 @@
#if PLATFORM(WAYLAND)
if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) {
#if USE(WPE_RENDERER)
- wpe_loader_init("libWPEBackend-fdo-1.0.so.1");
+ wpe_loader_init("@wpebackend_fdo@/lib/libWPEBackend-fdo-1.0.so.1");
if (AcceleratedBackingStoreWayland::checkRequirements()) {
parameters.hostClientFileDescriptor = IPC::Attachment(UnixFileDescriptor(wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt));
parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));

0 comments on commit 5c26aa8

Please sign in to comment.