webkitgtk: fix on darwin

(cherry picked from commit 61e49ba58b487b49832028a1829f50fd2abcab06)
This commit is contained in:
Dmitry Kalinkin
2021-05-29 18:39:16 -04:00
parent fb64e7de78
commit 7198e20169
3 changed files with 123 additions and 0 deletions
@@ -1,5 +1,7 @@
{ lib, stdenv
, runCommandNoCC
, fetchurl
, fetchpatch
, perl
, python3
, ruby
@@ -34,6 +36,7 @@
, libidn
, libedit
, readline
, sdk
, libGL
, libGLU
, mesa
@@ -78,6 +81,32 @@ stdenv.mkDerivation rec {
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) ''
@@ -96,6 +125,7 @@ stdenv.mkDerivation rec {
gperf
ninja
perl
perl.pkgs.FileCopyRecursive # used by copy-user-interface-resources.pl
pkg-config
python3
ruby
@@ -143,6 +173,12 @@ stdenv.mkDerivation rec {
]) ++ lib.optionals stdenv.isDarwin [
libedit
readline
# 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