From cfcb02214efccc1c4bdc5730b2b69f1b2953d395 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 26 Oct 2017 23:52:37 +0200 Subject: [PATCH] webkitgtk218x: make gtk2 optional --- pkgs/development/libraries/webkitgtk/2.18.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/2.18.nix b/pkgs/development/libraries/webkitgtk/2.18.nix index bc9bdb223ab..946f032f0f7 100644 --- a/pkgs/development/libraries/webkitgtk/2.18.nix +++ b/pkgs/development/libraries/webkitgtk/2.18.nix @@ -1,13 +1,16 @@ { stdenv, fetchurl, perl, python2, ruby, bison, gperf, cmake , pkgconfig, gettext, gobjectIntrospection, libnotify, gnutls -, gtk2, gtk3, wayland, libwebp, enchant, xlibs, libxkbcommon, epoxy, at_spi2_core +, gtk3, wayland, libwebp, enchant, xlibs, libxkbcommon, epoxy, at_spi2_core , libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs, pcre, nettle, libtasn1, p11_kit , libidn, libedit, readline, mesa, libintlOrEmpty , enableGeoLocation ? true, geoclue2, sqlite +, enableGtk2Plugins ? false, gtk2 ? null , gst-plugins-base, gst-plugins-bad }: assert enableGeoLocation -> geoclue2 != null; +assert enableGtk2Plugins -> gtk2 != null; +assert stdenv.isDarwin -> !enableGtk2Plugins; with stdenv.lib; stdenv.mkDerivation rec { @@ -16,7 +19,7 @@ stdenv.mkDerivation rec { meta = { description = "Web content rendering engine, GTK+ port"; - homepage = http://webkitgtk.org/; + homepage = https://webkitgtk.org/; license = licenses.bsd2; platforms = with platforms; linux ++ darwin; hydraPlatforms = []; @@ -59,14 +62,13 @@ stdenv.mkDerivation rec { "-DPORT=GTK" "-DUSE_LIBHYPHEN=0" ] + ++ optional (!enableGtk2Plugins) "-DENABLE_PLUGIN_PROCESS_GTK2=OFF" ++ optional stdenv.isLinux "-DENABLE_GLES2=ON" ++ optionals stdenv.isDarwin [ "-DUSE_SYSTEM_MALLOC=ON" "-DUSE_ACCELERATE=0" "-DENABLE_INTROSPECTION=ON" "-DENABLE_MINIBROWSER=OFF" - "-DENABLE_PLUGIN_PROCESS_GTK2=OFF" - "-DENABLE_MINIBROWSER=OFF" "-DENABLE_VIDEO=ON" "-DENABLE_QUARTZ_TARGET=ON" "-DENABLE_X11_TARGET=OFF" @@ -85,10 +87,11 @@ stdenv.mkDerivation rec { ]; buildInputs = libintlOrEmpty ++ [ - gtk2 libwebp enchant libnotify gnutls pcre nettle libidn + libwebp enchant libnotify gnutls pcre nettle libidn libxml2 libsecret libxslt harfbuzz libpthreadstubs libtasn1 p11_kit sqlite gst-plugins-base gst-plugins-bad libxkbcommon epoxy at_spi2_core ] ++ optional enableGeoLocation geoclue2 + ++ optional enableGtk2Plugins gtk2 ++ (with xlibs; [ libXdmcp libXt libXtst ]) ++ optionals stdenv.isDarwin [ libedit readline mesa ] ++ optional stdenv.isLinux wayland;