From df2284ebbc5ae55b34379dd1cc35ec989f59380f Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 18 May 2022 20:47:11 +0200 Subject: [PATCH 1/3] =?UTF-8?q?webkitgtk:=202.36.1=20=E2=86=92=202.36.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://webkitgtk.org/2022/05/18/webkitgtk2.36.2-released.html (cherry picked from commit 191443a545ad2439dde1ef36767a5bb112f28da7) --- pkgs/development/libraries/webkitgtk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index d5a804963585..05989257db6e 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -64,7 +64,7 @@ assert enableGeoLocation -> geoclue2 != null; stdenv.mkDerivation rec { pname = "webkitgtk"; - version = "2.36.1"; + version = "2.36.2"; outputs = [ "out" "dev" ]; @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://webkitgtk.org/releases/${pname}-${version}.tar.xz"; - sha256 = "sha256-AUnqX7HSDyqZgWd9RclSoEczAAHqJKjcKQNSOfEsDI8="; + sha256 = "/pO920oCwONvkm77boHSiv0oi4gk9sXPanXPQCKOAI4="; }; patches = lib.optionals stdenv.isLinux [ From 5c26aa860ae517c0781b0af8a1b973ca03249a37 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 19 May 2022 03:20:04 +0200 Subject: [PATCH 2/3] webkitgtk: re-enable WPE_RENDERER 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: https://github.com/NixOS/nixpkgs/issues/169201 Previously it was disabled in c0d053ea0ee2a1ff35f3251376fbca44e33a37c3. (cherry picked from commit 303f80a9b4748439729e590b36585f9c14555420) --- pkgs/development/libraries/webkitgtk/default.nix | 13 ++++++++++++- .../libraries/webkitgtk/fdo-backend-path.patch | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/webkitgtk/fdo-backend-path.patch diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 05989257db6e..c4991417b71d 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -18,6 +18,8 @@ , gtk3 , wayland , libwebp +, libwpe +, libwpe-fdo , enchant2 , xorg , libxkbcommon @@ -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) '' @@ -163,6 +173,8 @@ stdenv.mkDerivation rec { libseccomp systemd wayland + libwpe + libwpe-fdo xdg-dbus-proxy ] ++ lib.optional enableGeoLocation geoclue2; @@ -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" 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 000000000000..9ddef67f1c1d --- /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())); From 49a807d14f3c268c712e7f0e2f4872a6194e2802 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 19 May 2022 03:25:15 +0200 Subject: [PATCH 3/3] libwpe: inherit maintainers from webkitgtk (cherry picked from commit 26d7d7b5b2a21091f506507e0bf9f79c523433c4) --- pkgs/development/libraries/libwpe/default.nix | 6 ++++-- pkgs/development/libraries/libwpe/fdo.nix | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libwpe/default.nix b/pkgs/development/libraries/libwpe/default.nix index 66de5847d78e..18134f18d992 100644 --- a/pkgs/development/libraries/libwpe/default.nix +++ b/pkgs/development/libraries/libwpe/default.nix @@ -6,7 +6,9 @@ , libxkbcommon , libGL , ninja -, libX11 }: +, libX11 +, webkitgtk +}: stdenv.mkDerivation rec { pname = "libwpe"; @@ -33,7 +35,7 @@ stdenv.mkDerivation rec { description = "General-purpose library for WPE WebKit"; license = licenses.bsd2; homepage = "https://wpewebkit.org"; - maintainers = with maintainers; [ matthewbauer ]; + maintainers = webkitgtk.meta.maintainers ++ (with maintainers; [ matthewbauer ]); platforms = platforms.linux; }; } diff --git a/pkgs/development/libraries/libwpe/fdo.nix b/pkgs/development/libraries/libwpe/fdo.nix index a711fab63143..df6a57d2d7f7 100644 --- a/pkgs/development/libraries/libwpe/fdo.nix +++ b/pkgs/development/libraries/libwpe/fdo.nix @@ -10,7 +10,9 @@ , libwpe , libxkbcommon , libGL -, libX11 }: +, libX11 +, webkitgtk + }: stdenv.mkDerivation rec { pname = "wpebackend-fdo"; @@ -46,7 +48,7 @@ stdenv.mkDerivation rec { description = "Freedesktop.org backend for WPE WebKit"; license = licenses.bsd2; homepage = "https://wpewebkit.org"; - maintainers = with maintainers; [ matthewbauer ]; + maintainers = webkitgtk.meta.maintainers ++ (with maintainers; [ matthewbauer ]); platforms = platforms.linux; }; }