@@ -2,11 +2,13 @@
22, pkgconfig, gettext, gobjectIntrospection, libnotify
33, gtk2, gtk3, wayland, libwebp, enchant
44, libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs
5−, enableGeoLocation ? true, geoclue2, sqlite
6−, gst-plugins-base
5+, enableGeoLocation ? false, geoclue2, sqlite
6+, enableCredentialStorage ? !stdenv.isDarwin
7+, gst-plugins-base, readline, libedit
78}:
89
910assert enableGeoLocation -> geoclue2 != null;
11+assert stdenv.isDarwin -> !enableCredentialStorage;
1012
1113with stdenv.lib;
1214stdenv.mkDerivation rec {
@@ -29,16 +31,37 @@ stdenv.mkDerivation rec {
2931 sha256 = "0mghsbfnmmf6nsf7cb3ah76s77aigkzf3k6kw96wgh6all6jdy6v";
3032 };
3133
32− patches = [ ./finding-harfbuzz-icu.patch
34+ patches = [
35+ ./finding-harfbuzz-icu.patch
3336 (fetchpatch {
3437 name = "glibc-isnan.patch";
3538 url = "http://trac.webkit.org/changeset/194518/trunk/Source/JavaScriptCore"
3639 + "/runtime/Options.cpp?format=diff&new=194518";
3740 sha256 = "0pzdv1zmlym751n9d310cx3yp752yzsc49cysbvgnrib4dh68nbm";
3841 })
39− ];
42+ ] ++ optional stdenv.isDarwin ./adding-libintl.patch;
4043
41− cmakeFlags = [ "-DPORT=GTK" "-DUSE_LIBHYPHEN=0" ];
44+ cmakeFlags = [
45+ "-DPORT=GTK"
46+ "-DUSE_LIBHYPHEN=OFF"
47+ ] ++ optionals (!enableCredentialStorage) [
48+ "-DENABLE_CREDENTIAL_STORAGE=OFF"
49+ ] ++ optionals (!enableGeoLocation) [
50+ "-DENABLE_GEOLOCATION=OFF"
51+ ] ++ optionals stdenv.isDarwin [
52+ "-DENABLE_WEBKIT=ON"
53+ "-DENABLE_X11_TARGET=OFF"
54+ "-DENABLE_QUARTZ_TARGET=ON"
55+ "-DENABLE_TOOLS=ON"
56+ "-DENABLE_MINIBROWSER=ON"
57+ "-DENABLE_PLUGIN_PROCESS_GTK2=OFF"
58+ "-DENABLE_VIDEO=OFF"
59+ "-DENABLE_WEB_AUDIO=OFF"
60+ "-DENABLE_OPENGL=OFF"
61+ "-DENABLE_INTROSPECTION=OFF"
62+ "-DUSE_LIBNOTIFY=OFF"
63+ "-DCMAKE_SHARED_LINKER_FLAGS=-L/path/to/nonexistent/folder"
64+ ];
4265
4366 # XXX: WebKit2 missing include path for gst-plugins-base.
4467 # Filled: https://bugs.webkit.org/show_bug.cgi?id=148894
@@ -50,10 +73,16 @@ stdenv.mkDerivation rec {
5073 ];
5174
5275 buildInputs = [
53− gtk2 wayland libwebp enchant libnotify
54− libxml2 libsecret libxslt harfbuzz libpthreadstubs
76+ gtk2 libwebp enchant libnotify
77+ libxml2 libxslt harfbuzz libpthreadstubs
5578 gst-plugins-base
56− ] ++ optional enableGeoLocation geoclue2;
79+ ] ++ optionals enableCredentialStorage [
80+ libsecret
81+ ] ++ (if stdenv.isDarwin then [
82+ readline libedit
83+ ] else [
84+ wayland
85+ ]) ++ optional enableGeoLocation geoclue2;
5786
5887 propagatedBuildInputs = [
5988 libsoup gtk3