Unverified Commit 993a4bbf authored by TANIGUCHI Masaya's avatar TANIGUCHI Masaya Committed by GitHub
Browse files

emacs: enable xwidgets support on Darwin (#434941)

parent 7ba47133
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -95,10 +95,11 @@
  withX ? !(stdenv.hostPlatform.isDarwin || noGui || withPgtk),
  withXinput2 ? withX,
  withXwidgets ?
    !stdenv.hostPlatform.isDarwin
    && !noGui
    && (withGTK3 || withPgtk)
    && (lib.versionOlder version "30"), # XXX: upstream bug 66068 precludes newer versions of webkit2gtk (https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-09/msg00695.html)
    !noGui
    && (withGTK3 || withPgtk || withNS || variant == "macport")
    && (stdenv.hostPlatform.isDarwin || lib.versionOlder version "30"),
  # XXX: - upstream bug 66068 precludes newer versions of webkit2gtk (https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-09/msg00695.html)
  # XXX: - Apple_SDK WebKit is compatible with Emacs.
  withSmallJaDic ? false,
  withCompressInstall ? true,

@@ -128,7 +129,8 @@ assert withGpm -> stdenv.hostPlatform.isLinux;
assert withImageMagick -> (withX || withNS);
assert withNS -> stdenv.hostPlatform.isDarwin && !(withX || variant == "macport");
assert withPgtk -> withGTK3 && !withX;
assert withXwidgets -> !noGui && (withGTK3 || withPgtk);
assert withXwidgets -> !noGui && (withGTK3 || withPgtk || withNS || variant == "macport");
# XXX: The upstream --with-xwidgets flag is enabled only when Emacs is built with GTK3 or with Cocoa (including the withNS and macport variant).

let
  libGccJitLibraryPaths = [
@@ -348,7 +350,7 @@ stdenv.mkDerivation (finalAttrs: {
  ++ lib.optionals withXinput2 [
    libXi
  ]
  ++ lib.optionals withXwidgets [
  ++ lib.optionals (withXwidgets && stdenv.hostPlatform.isLinux) [
    webkitgtk_4_0
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [