nixpkgs/pkgs/development/libraries/webkitgtk/default.nix

93 lines
2.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchpatch, perl, python, ruby, bison, gperf, cmake
2015-09-25 09:28:51 +01:00
, pkgconfig, gettext, gobjectIntrospection, libnotify
, gtk2, gtk3, wayland, libwebp, enchant
2014-10-09 11:26:20 +01:00
, libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs
, enableGeoLocation ? false, geoclue2, sqlite, xorg
2016-03-29 17:04:46 +01:00
, enableCredentialStorage ? !stdenv.isDarwin
, gst-plugins-base, readline, libedit
}:
assert enableGeoLocation -> geoclue2 != null;
2016-03-29 17:04:46 +01:00
assert stdenv.isDarwin -> !enableCredentialStorage;
with stdenv.lib;
stdenv.mkDerivation rec {
2014-10-09 11:26:20 +01:00
name = "webkitgtk-${version}";
version = "2.10.4";
meta = {
description = "Web content rendering engine, GTK+ port";
homepage = "http://webkitgtk.org/";
2014-10-09 11:26:20 +01:00
license = licenses.bsd2;
platforms = platforms.linux;
hydraPlatforms = [];
2016-03-13 08:08:15 +00:00
maintainers = with maintainers; [ koral ];
};
2014-11-17 22:40:28 +00:00
preConfigure = "patchShebangs Tools";
src = fetchurl {
url = "http://webkitgtk.org/releases/${name}.tar.xz";
sha256 = "0mghsbfnmmf6nsf7cb3ah76s77aigkzf3k6kw96wgh6all6jdy6v";
};
2016-03-29 17:04:46 +01:00
patches = [
./finding-harfbuzz-icu.patch
(fetchpatch {
name = "glibc-isnan.patch";
url = "http://trac.webkit.org/changeset/194518/trunk/Source/JavaScriptCore"
+ "/runtime/Options.cpp?format=diff&new=194518";
sha256 = "0pzdv1zmlym751n9d310cx3yp752yzsc49cysbvgnrib4dh68nbm";
})
2016-03-29 17:04:46 +01:00
] ++ optional stdenv.isDarwin ./adding-libintl.patch;
2016-03-29 17:04:46 +01:00
cmakeFlags = [
"-DPORT=GTK"
"-DUSE_LIBHYPHEN=OFF"
] ++ optionals (!enableCredentialStorage) [
"-DENABLE_CREDENTIAL_STORAGE=OFF"
] ++ optionals (!enableGeoLocation) [
"-DENABLE_GEOLOCATION=OFF"
] ++ optionals stdenv.isDarwin [
"-DENABLE_WEBKIT=ON"
"-DENABLE_X11_TARGET=OFF"
"-DENABLE_QUARTZ_TARGET=ON"
"-DENABLE_TOOLS=ON"
"-DENABLE_MINIBROWSER=ON"
"-DENABLE_PLUGIN_PROCESS_GTK2=OFF"
"-DENABLE_VIDEO=OFF"
"-DENABLE_WEB_AUDIO=OFF"
"-DENABLE_OPENGL=OFF"
"-DENABLE_INTROSPECTION=OFF"
"-DUSE_LIBNOTIFY=OFF"
"-DCMAKE_SHARED_LINKER_FLAGS=-L/path/to/nonexistent/folder"
];
2015-08-29 23:19:02 +01:00
# XXX: WebKit2 missing include path for gst-plugins-base.
# Filled: https://bugs.webkit.org/show_bug.cgi?id=148894
NIX_CFLAGS_COMPILE = "-I${gst-plugins-base}/include/gstreamer-1.0";
nativeBuildInputs = [
cmake perl python ruby bison gperf sqlite
2014-10-09 11:26:20 +01:00
pkgconfig gettext gobjectIntrospection
];
buildInputs = [
2016-03-29 17:04:46 +01:00
gtk2 libwebp enchant libnotify
libxml2 libxslt harfbuzz libpthreadstubs
gst-plugins-base xorg.libXt
2016-03-29 17:04:46 +01:00
] ++ optionals enableCredentialStorage [
libsecret
] ++ (if stdenv.isDarwin then [
readline libedit
] else [
wayland
]) ++ optional enableGeoLocation geoclue2;
2014-03-27 08:11:56 +00:00
propagatedBuildInputs = [
2014-10-09 11:26:20 +01:00
libsoup gtk3
2014-03-27 08:11:56 +00:00
];
2015-09-25 09:28:51 +01:00
enableParallelBuilding = true;
}