diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/libraries/webkitgtk | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/webkitgtk')
3 files changed, 149 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/428774.patch b/nixpkgs/pkgs/development/libraries/webkitgtk/428774.patch new file mode 100644 index 000000000000..85da185dc4e4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/webkitgtk/428774.patch @@ -0,0 +1,86 @@ +diff -aru a/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp b/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp +--- a/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp 2021-05-16 14:45:32.000000000 -0400 +@@ -87,7 +87,7 @@ + if (!m_store.createSharedMemoryHandle(handle)) + return; + +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + uint64_t dataSize = handle.size(); + #else + uint64_t dataSize = 0; +diff -aru a/Source/WebKit/Platform/IPC/IPCSemaphore.cpp b/Source/WebKit/Platform/IPC/IPCSemaphore.cpp +--- a/Source/WebKit/Platform/IPC/IPCSemaphore.cpp 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/IPC/IPCSemaphore.cpp 2021-05-16 15:54:53.000000000 -0400 +@@ -26,8 +26,6 @@ + #include "config.h" + #include "IPCSemaphore.h" + +-#if !OS(DARWIN) +- + namespace IPC { + + Semaphore::Semaphore() = default; +@@ -46,5 +44,3 @@ + } + + } +- +-#endif +diff -aru a/Source/WebKit/Platform/IPC/IPCSemaphore.h b/Source/WebKit/Platform/IPC/IPCSemaphore.h +--- a/Source/WebKit/Platform/IPC/IPCSemaphore.h 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/IPC/IPCSemaphore.h 2021-05-16 14:46:13.000000000 -0400 +@@ -29,7 +29,7 @@ + #include <wtf/Optional.h> + #include <wtf/Seconds.h> + +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + #include <mach/semaphore.h> + #include <wtf/MachSendRight.h> + #endif +@@ -51,7 +51,7 @@ + void encode(Encoder&) const; + static Optional<Semaphore> decode(Decoder&); + +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + explicit Semaphore(MachSendRight&&); + + void signal(); +@@ -64,7 +64,7 @@ + #endif + + private: +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + void destroy(); + MachSendRight m_sendRight; + semaphore_t m_semaphore { SEMAPHORE_NULL }; +Only in b/Source/WebKit/Platform/IPC: IPCSemaphore.h.orig +diff -aru a/Source/WebKit/Platform/SharedMemory.h b/Source/WebKit/Platform/SharedMemory.h +--- a/Source/WebKit/Platform/SharedMemory.h 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/SharedMemory.h 2021-05-16 14:45:32.000000000 -0400 +@@ -75,7 +75,7 @@ + + bool isNull() const; + +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + size_t size() const { return m_size; } + #endif + +diff -aru a/Source/WebKit/UIProcess/VisitedLinkStore.cpp b/Source/WebKit/UIProcess/VisitedLinkStore.cpp +--- a/Source/WebKit/UIProcess/VisitedLinkStore.cpp 2021-02-26 04:57:16.000000000 -0500 ++++ b/Source/WebKit/UIProcess/VisitedLinkStore.cpp 2021-05-16 14:45:32.000000000 -0400 +@@ -119,7 +119,7 @@ + return; + + // FIXME: Get the actual size of data being sent from m_linkHashStore and send it in the SharedMemory::IPCHandle object. +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + uint64_t dataSize = handle.size(); + #else + uint64_t dataSize = 0; +Only in b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics: DrawingAreaCoordinatedGraphics.cpp.orig diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix b/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix index 84a9e2a1db77..40f51d6f48a3 100644 --- a/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix +++ b/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix @@ -1,5 +1,7 @@ { lib, stdenv +, runCommandNoCC , fetchurl +, fetchpatch , perl , python3 , ruby @@ -34,6 +36,7 @@ , libidn , libedit , readline +, sdk , libGL , libGLU , mesa @@ -53,15 +56,14 @@ , xdg-dbus-proxy , substituteAll , glib +, addOpenGLRunpath }: assert enableGeoLocation -> geoclue2 != null; -with lib; - stdenv.mkDerivation rec { pname = "webkitgtk"; - version = "2.32.0"; + version = "2.32.1"; outputs = [ "out" "dev" ]; @@ -69,15 +71,42 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://webkitgtk.org/releases/${pname}-${version}.tar.xz"; - sha256 = "1w3b0w8izp0i070grhv19j631sdcd0mcqnjnax13k8mdx7dg8zcx"; + sha256 = "05v9hgpkc6mi2klrd8nqql1n8xzq8rgdz3hvyy369xkhgwqifq8k"; }; - patches = optionals stdenv.isLinux [ + patches = lib.optionals stdenv.isLinux [ (substituteAll { src = ./fix-bubblewrap-paths.patch; inherit (builtins) storeDir; + inherit (addOpenGLRunpath) driverLink; }) ./libglvnd-headers.patch + ] ++ lib.optionals stdenv.isDarwin [ + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/94cdcd289b993ed4d39c17d4b8b90db7c81a9b10.diff"; + sha256 = "sha256-ywrTEjf3ATqI0Vvs60TeAZ+m58kCibum4DamRWrQfaA="; + excludes = [ "Source/WebKit/ChangeLog" ]; + }) + + # https://bugs.webkit.org/show_bug.cgi?id=225856 + (fetchpatch { + url = "https://bug-225856-attachments.webkit.org/attachment.cgi?id=428797"; + sha256 = "sha256-ffo5p2EyyjXe3DxdrvAcDKqxwnoqHtYBtWod+1fOjMU="; + excludes = [ "Source/WebCore/ChangeLog" ]; + }) + + # https://bugs.webkit.org/show_bug.cgi?id=225850 + ./428774.patch # https://bug-225850-attachments.webkit.org/attachment.cgi?id=428774 + (fetchpatch { + url = "https://bug-225850-attachments.webkit.org/attachment.cgi?id=428776"; + sha256 = "sha256-ryNRYMsk72SL0lNdh6eaAdDV3OT8KEqVq1H0j581jmQ="; + excludes = [ "Source/WTF/ChangeLog" ]; + }) + (fetchpatch { + url = "https://bug-225850-attachments.webkit.org/attachment.cgi?id=428778"; + sha256 = "sha256-78iP+T2vaIufO8TmIPO/tNDgmBgzlDzalklrOPrtUeo="; + excludes = [ "Source/WebKit/ChangeLog" ]; + }) ]; preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' @@ -85,7 +114,7 @@ stdenv.mkDerivation rec { # pick up the wrong gettext. TODO: Find a better solution for # this, maybe make cmake not look up executables in # CMAKE_PREFIX_PATH. - cmakeFlags+=" -DCMAKE_IGNORE_PATH=${getBin gettext}/bin" + cmakeFlags+=" -DCMAKE_IGNORE_PATH=${lib.getBin gettext}/bin" ''; nativeBuildInputs = [ @@ -96,6 +125,7 @@ stdenv.mkDerivation rec { gperf ninja perl + perl.pkgs.FileCopyRecursive # used by copy-user-interface-resources.pl pkg-config python3 ruby @@ -118,7 +148,9 @@ stdenv.mkDerivation rec { libgcrypt libidn libintl + ] ++ lib.optionals stdenv.isLinux [ libmanette + ] ++ [ libnotify libpthreadstubs libsecret @@ -138,16 +170,22 @@ stdenv.mkDerivation rec { libXdmcp libXt libXtst - ]) ++ optionals stdenv.isDarwin [ + ]) ++ lib.optionals stdenv.isDarwin [ libedit readline - ] ++ optionals stdenv.isLinux [ + # Pull a header that contains a definition of proc_pid_rusage(). + # (We pick just that one because using the other headers from `sdk` is not + # compatible with our C++ standard library) + (runCommandNoCC "${pname}_headers" {} '' + install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h + '') + ] ++ lib.optionals stdenv.isLinux [ bubblewrap libseccomp systemd wayland xdg-dbus-proxy - ] ++ optional enableGeoLocation geoclue2; + ] ++ lib.optional enableGeoLocation geoclue2; propagatedBuildInputs = [ gtk3 @@ -159,27 +197,34 @@ stdenv.mkDerivation rec { "-DPORT=GTK" "-DUSE_LIBHYPHEN=OFF" "-DUSE_WPE_RENDERER=OFF" - ] ++ optionals stdenv.isDarwin [ - "-DENABLE_GRAPHICS_CONTEXT_3D=OFF" + ] ++ lib.optionals stdenv.isDarwin [ + "-DENABLE_GAMEPAD=OFF" "-DENABLE_GTKDOC=OFF" "-DENABLE_MINIBROWSER=OFF" - "-DENABLE_OPENGL=OFF" "-DENABLE_QUARTZ_TARGET=ON" "-DENABLE_VIDEO=ON" "-DENABLE_WEBGL=OFF" "-DENABLE_WEB_AUDIO=OFF" "-DENABLE_X11_TARGET=OFF" - "-DUSE_ACCELERATE=0" + "-DUSE_APPLE_ICU=OFF" + "-DUSE_OPENGL_OR_ES=OFF" "-DUSE_SYSTEM_MALLOC=ON" - ] ++ optional (stdenv.isLinux && enableGLES) "-DENABLE_GLES2=ON"; + ] ++ lib.optionals (!stdenv.isLinux) [ + "-DUSE_SYSTEMD=OFF" + ] ++ lib.optional (stdenv.isLinux && enableGLES) "-DENABLE_GLES2=ON"; postPatch = '' patchShebangs . + '' + lib.optionalString stdenv.isDarwin '' + # It needs malloc_good_size. + sed 22i'#include <malloc/malloc.h>' -i Source/WTF/wtf/FastMalloc.h + # <CommonCrypto/CommonRandom.h> needs CCCryptorStatus. + sed 43i'#include <CommonCrypto/CommonCryptor.h>' -i Source/WTF/wtf/RandomDevice.cpp ''; requiredSystemFeatures = [ "big-parallel" ]; - meta = { + meta = with lib; { description = "Web content rendering engine, GTK port"; homepage = "https://webkitgtk.org/"; license = licenses.bsd2; diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch b/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch index 03a6b6903a8a..d502958f4f1a 100644 --- a/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch +++ b/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch @@ -1,16 +1,7 @@ diff -ru old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp --- old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp 2019-09-09 04:47:07.000000000 -0400 +++ webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp 2019-09-20 21:14:10.537921173 -0400 -@@ -585,7 +585,7 @@ - { SCMP_SYS(keyctl), nullptr }, - { SCMP_SYS(request_key), nullptr }, - -- // Scary VM/NUMA ops -+ // Scary VM/NUMA ops - { SCMP_SYS(move_pages), nullptr }, - { SCMP_SYS(mbind), nullptr }, - { SCMP_SYS(get_mempolicy), nullptr }, -@@ -724,6 +724,11 @@ +@@ -724,6 +724,12 @@ "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, @@ -18,7 +9,8 @@ diff -ru old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLa + // Nix Directories + "--ro-bind", "@storeDir@", "@storeDir@", + "--ro-bind", "/run/current-system", "/run/current-system", -+ "--ro-bind", "/run/opengl-driver", "/run/opengl-driver", ++ "--ro-bind-try", "@driverLink@/lib", "@driverLink@/lib", ++ "--ro-bind-try", "@driverLink@/share", "@driverLink@/share", }; // We would have to parse ld config files for more info. bindPathVar(sandboxArgs, "LD_LIBRARY_PATH"); |