diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 8181e6982c6..d111ee8ed0b 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -19,6 +19,8 @@ , gtk3 , wayland , libwebp +, libwpe +, libwpe-fdo , enchant2 , xorg , libxkbcommon @@ -82,7 +84,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) '' @@ -160,6 +170,8 @@ stdenv.mkDerivation rec { libseccomp libmanette wayland + libwpe + libwpe-fdo xdg-dbus-proxy ] ++ lib.optionals systemdSupport [ systemd @@ -180,7 +192,6 @@ stdenv.mkDerivation rec { "-DENABLE_INTROSPECTION=ON" "-DPORT=GTK" "-DUSE_LIBHYPHEN=OFF" - "-DUSE_WPE_RENDERER=OFF" "-DUSE_SOUP2=${cmakeBool (lib.versions.major libsoup.version == "2")}" "-DUSE_LIBSECRET=${cmakeBool withLibsecret}" ] ++ lib.optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch new file mode 100644 index 00000000000..9ddef67f1c1 --- /dev/null +++ b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch @@ -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()));