summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/atk/default.nix12
-rw-r--r--pkgs/development/libraries/atkmm/default.nix6
-rw-r--r--pkgs/development/libraries/cairo/1.12.2.nix86
-rw-r--r--pkgs/development/libraries/clutter/default.nix14
-rw-r--r--pkgs/development/libraries/cogl/default.nix22
-rw-r--r--pkgs/development/libraries/dbus/default.nix4
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix14
-rw-r--r--pkgs/development/libraries/glib/default.nix16
-rw-r--r--pkgs/development/libraries/glibmm/default.nix16
-rw-r--r--pkgs/development/libraries/gobject-introspection/default.nix10
-rw-r--r--pkgs/development/libraries/gtk+/3.x.nix19
-rw-r--r--pkgs/development/libraries/gtkmm/2.x.nix8
-rw-r--r--pkgs/development/libraries/gtkmm/3.x.nix14
-rw-r--r--pkgs/development/libraries/gvfs/default.nix10
-rw-r--r--pkgs/development/libraries/harfbuzz/default.nix25
-rw-r--r--pkgs/development/libraries/icu/default.nix8
-rw-r--r--pkgs/development/libraries/libdrm/default.nix4
-rw-r--r--pkgs/development/libraries/libnotify/default.nix4
-rw-r--r--pkgs/development/libraries/libpng/default.nix10
-rw-r--r--pkgs/development/libraries/librsvg/default.nix2
-rw-r--r--pkgs/development/libraries/libsigcxx/default.nix6
-rw-r--r--pkgs/development/libraries/libsoup/2.44.nix (renamed from pkgs/development/libraries/libsoup/2.40.nix)21
-rw-r--r--pkgs/development/libraries/libssh/default.nix6
-rw-r--r--pkgs/development/libraries/libunique/default.nix1
-rw-r--r--pkgs/development/libraries/libusb1/default.nix7
-rw-r--r--pkgs/development/libraries/libvdpau/default.nix6
-rw-r--r--pkgs/development/libraries/libwnck/3.x.nix2
-rw-r--r--pkgs/development/libraries/libxkbcommon/default.nix10
-rw-r--r--pkgs/development/libraries/mesa/default.nix78
-rw-r--r--pkgs/development/libraries/mesa/fix-rounding.patch357
-rw-r--r--pkgs/development/libraries/pangomm/default.nix (renamed from pkgs/development/libraries/pangomm/2.28.x.nix)10
-rw-r--r--pkgs/development/libraries/pixman/default.nix4
-rw-r--r--pkgs/development/libraries/poppler/default.nix4
-rw-r--r--pkgs/development/libraries/silgraphite/graphite2.nix8
-rw-r--r--pkgs/development/libraries/wayland/default.nix4
-rw-r--r--pkgs/development/libraries/webkitgtk/default.nix54
-rw-r--r--pkgs/development/libraries/webkitgtk/webcore-svg-libxml-cflags.patch8
37 files changed, 306 insertions, 584 deletions
diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix
index b1e8a0080298..a93aaa5a43fc 100644
--- a/pkgs/development/libraries/atk/default.nix
+++ b/pkgs/development/libraries/atk/default.nix
@@ -1,11 +1,15 @@
 { stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty, gobjectIntrospection }:
 
+let
+  ver_maj = "2.10";
+  ver_min = "0";
+in
 stdenv.mkDerivation rec {
-  name = "atk-2.8.0";
+  name = "atk-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/atk/2.8/${name}.tar.xz";
-    sha256 = "1x3dd3hg9l1j9dq70xwph13vxdp6a9wbfcnryryf1wr6c8bij9dj";
+    url = "mirror://gnome/sources/atk/${ver_maj}/${name}.tar.xz";
+    sha256 = "1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3";
   };
 
   buildInputs = libintlOrEmpty;
@@ -14,6 +18,8 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ glib gobjectIntrospection /*ToDo: why propagate*/ ];
 
+  #doCheck = true; # no checks in there (2.10.0)
+
   postInstall = "rm -rf $out/share/gtk-doc";
 
   meta = {
diff --git a/pkgs/development/libraries/atkmm/default.nix b/pkgs/development/libraries/atkmm/default.nix
index b25432491fbc..03f08efca985 100644
--- a/pkgs/development/libraries/atkmm/default.nix
+++ b/pkgs/development/libraries/atkmm/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, atk, glibmm, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "atkmm-2.22.6";
+  name = "atkmm-2.22.7";
 
   src = fetchurl {
-    url = mirror://gnome/sources/atkmm/2.22/atkmm-2.22.6.tar.xz;
-    sha256 = "1dmf72i7jv2a2gavjiah2722bf5qk3hb97hn5dasxqxr0r8jjx0a";
+    url = "mirror://gnome/sources/atkmm/2.22/${name}.tar.xz";
+    sha256 = "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz";
   };
 
   propagatedBuildInputs = [ atk glibmm ];
diff --git a/pkgs/development/libraries/cairo/1.12.2.nix b/pkgs/development/libraries/cairo/1.12.2.nix
deleted file mode 100644
index e60af3a23a80..000000000000
--- a/pkgs/development/libraries/cairo/1.12.2.nix
+++ /dev/null
@@ -1,86 +0,0 @@
-{ postscriptSupport ? true
-, pdfSupport ? true
-, pngSupport ? true
-, xcbSupport ? false
-, gobjectSupport ? true, glib
-, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
-, zlib, libpng, pixman, libxcb ? null, xcbutil ? null
-, libiconvOrEmpty, libintlOrEmpty
-}:
-
-assert postscriptSupport -> zlib != null;
-assert pngSupport -> libpng != null;
-assert xcbSupport -> libxcb != null && xcbutil != null;
-
-stdenv.mkDerivation rec {
-  name = "cairo-1.12.2";
-
-  src = fetchurl {
-    url = "http://cairographics.org/releases/${name}.tar.xz";
-    sha1 = "bc2ee50690575f16dab33af42a2e6cdc6451e3f9";
-  };
-
-  buildInputs =
-    [ pkgconfig x11 fontconfig xlibs.libXrender ]
-    ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
-    ++ libintlOrEmpty
-    ++ libiconvOrEmpty;
-
-  propagatedBuildInputs =
-    [ freetype pixman ] ++
-    stdenv.lib.optional gobjectSupport glib ++
-    stdenv.lib.optional postscriptSupport zlib ++
-    stdenv.lib.optional pngSupport libpng;
-
-  NIX_CFLAGS_COMPILE = ( if stdenv.isDarwin
-                         then "-I${pixman}/include/pixman-1"
-                         else "" );
-
-  configureFlags =
-    [ "--enable-tee" ]
-    ++ stdenv.lib.optional xcbSupport "--enable-xcb"
-    ++ stdenv.lib.optional pdfSupport "--enable-pdf";
-
-  preConfigure = ''
-    # Work around broken `Requires.private' that prevents Freetype
-    # `-I' flags to be propagated.
-    sed -i "src/cairo.pc.in" \
-        -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
-  ''
-
-  # On FreeBSD, `-ldl' doesn't exist.
-  + (stdenv.lib.optionalString stdenv.isFreeBSD
-       '' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in
-          do
-            cat "$i" | sed -es/-ldl//g > t
-            mv t "$i"
-          done
-       '');
-
-  enableParallelBuilding = true;
-
-  # The default `--disable-gtk-doc' is ignored.
-  postInstall = "rm -rf $out/share/gtk-doc";
-
-  meta = {
-    description = "A 2D graphics library with support for multiple output devices";
-
-    longDescription = ''
-      Cairo is a 2D graphics library with support for multiple output
-      devices.  Currently supported output targets include the X
-      Window System, Quartz, Win32, image buffers, PostScript, PDF,
-      and SVG file output.  Experimental backends include OpenGL
-      (through glitz), XCB, BeOS, OS/2, and DirectFB.
-
-      Cairo is designed to produce consistent output on all output
-      media while taking advantage of display hardware acceleration
-      when available (e.g., through the X Render Extension).
-    '';
-
-    homepage = http://cairographics.org/;
-
-    licenses = [ "LGPLv2+" "MPLv1" ];
-
-    platforms = stdenv.lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix
index df3ffc8f60f8..808e67cd852b 100644
--- a/pkgs/development/libraries/clutter/default.nix
+++ b/pkgs/development/libraries/clutter/default.nix
@@ -3,12 +3,16 @@
 gobjectIntrospection 
 }:
 
-stdenv.mkDerivation {
-  name = "clutter-1.8.2";
+let
+  ver_maj = "1.16";
+  ver_min = "2";
+in
+stdenv.mkDerivation rec {
+  name = "clutter-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = mirror://gnome/sources/clutter/1.8/clutter-1.8.2.tar.xz;
-    sha256 = "0bzsvnharawfg525lpavrp55mq4aih5nb01dwwqwnccg8hk9z2fw";
+    url = "mirror://gnome/sources/clutter/${ver_maj}/${name}.tar.xz";
+    sha256 = "0hnz6fnrkc7ixrm2x83sxyha32p9896d7ilzhvxwfgzlh26fidqc";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -19,6 +23,8 @@ stdenv.mkDerivation {
 
   configureFlags = [ "--enable-introspection" ]; # needed by muffin AFAIK
 
+  #doCheck = true; # no tests possible without a display
+
   meta = {
     description = "Clutter, a library for creating fast, dynamic graphical user interfaces";
 
diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix
index b02319fd3e88..9a151e88778b 100644
--- a/pkgs/development/libraries/cogl/default.nix
+++ b/pkgs/development/libraries/cogl/default.nix
@@ -1,22 +1,24 @@
-{ stdenv, fetchurl, pkgconfig, mesa, glib, gdk_pixbuf, libXfixes, libXcomposite
-, libXdamage, libintlOrEmpty
+{ stdenv, fetchurl, pkgconfig, mesa, glib, gdk_pixbuf, xorg, libintlOrEmpty
 , pangoSupport ? true, pango, cairo, gobjectIntrospection }:
 
+let
+  ver_maj = "1.16";
+  ver_min = "0";
+in
 stdenv.mkDerivation rec {
-  name = "cogl-1.8.2";
+  name = "cogl-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = mirror://gnome/sources/cogl/1.8/cogl-1.8.2.tar.xz;
-    sha256 = "1ix87hz3qxqysqwx58wbc46lzchlmfs08fjzbf3l6mmsqj8gs9pc";
+    url = "mirror://gnome/sources/cogl/${ver_maj}/${name}.tar.xz";
+    sha256 = "153014xygwyz9wmvgfwjxncqgc0qqvcy6b3jx1zdl3q5d9iw9hkm";
   };
 
   nativeBuildInputs = [ pkgconfig ];
 
-  configureFlags = " --enable-introspection " ; 
+  configureFlags = " --enable-introspection " ;
 
-  propagatedBuildInputs =
-    [ mesa glib gdk_pixbuf libXfixes libXcomposite libXdamage 
-gobjectIntrospection ]
+  propagatedBuildInputs = with xorg;
+    [ mesa glib gdk_pixbuf libXfixes libXcomposite libXdamage gobjectIntrospection ]
     ++ libintlOrEmpty;
 
   buildInputs = stdenv.lib.optionals pangoSupport [ pango cairo ];
@@ -27,6 +29,8 @@ gobjectIntrospection ]
 
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
 
+  #doCheck = true; # all tests fail (no idea why)
+
   meta = with stdenv.lib; {
     description = "A small open source library for using 3D graphics hardware for rendering";
     maintainers = with maintainers; [ lovek323 ];
diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix
index 8ec47f86e343..794128d054a7 100644
--- a/pkgs/development/libraries/dbus/default.nix
+++ b/pkgs/development/libraries/dbus/default.nix
@@ -3,8 +3,8 @@
 , libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }:
 
 let
-  version = "1.6.14"; # 1.7.* isn't recommended, even for gnome 3.8
-  sha256 = "0v7mcxwfmpjf7vndnvf2kf02al61clrxs36bqii20s0lawfh2xjn";
+  version = "1.6.16"; # 1.7.* isn't recommended, even for gnome 3.8
+  sha256 = "0wrmh5azszb54zpy7d0zjsy456khcv8yc19ivqrygkdg7a3l4gs6";
 
   inherit (stdenv) lib;
 
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index 52d50369dc7d..0daae5fda2e7 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -1,12 +1,16 @@
-{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz
+{ stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11
 , jasper, libintlOrEmpty, gobjectIntrospection }:
 
+let
+  ver_maj = "2.30";
+  ver_min = "1";
+in
 stdenv.mkDerivation rec {
-  name = "gdk-pixbuf-2.28.2";
+  name = "gdk-pixbuf-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gdk-pixbuf/2.28/${name}.tar.xz";
-    sha256 = "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q";
+    url = "mirror://gnome/sources/gdk-pixbuf/${ver_maj}/${name}.tar.xz";
+    sha256 = "0c4dxsnpqc46liqjlh3w2qmrzv0b89ksn15z2f9h13362lg3n9m3";
   };
 
   # !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
@@ -20,6 +24,8 @@ stdenv.mkDerivation rec {
     + stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
     ;
 
+  doCheck = false; # broken animation tester
+
   postInstall = "rm -rf $out/share/gtk-doc";
 
   meta = {
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 119584deb1eb..e7bae0100a4f 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -10,6 +10,13 @@
 #     Possible solution: disable compilation of this example somehow
 #     Reminder: add 'sed -e 's@python2\.[0-9]@python@' -i
 #       $out/bin/gtester-report' to postInstall if this is solved
+/*
+  * Use --enable-installed-tests for GNOME-related packages,
+      and use them as a separately installed tests runned by Hydra
+      (they should test an already installed package)
+      https://wiki.gnome.org/GnomeGoals/InstalledTests
+  * Support org.freedesktop.Application, including D-Bus activation from desktop files
+*/
 
 let
   # Some packages don't get "Cflags" from pkgconfig correctly
@@ -24,15 +31,18 @@ let
     done
     ln -sr -t "$out/include/" "$out"/lib/*/include/* 2>/dev/null || true
   '';
+
+  ver_maj = "2.38";
+  ver_min = "2";
 in
 with { inherit (stdenv.lib) optionalString; };
 
 stdenv.mkDerivation rec {
-  name = "glib-2.36.4";
+  name = "glib-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/glib/2.36/${name}.tar.xz";
-    sha256 = "0zmdbkg2yjyxdl72w34lxvrssbzqzdficskkfn22s0994dad4m7n";
+    url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
+    sha256 = "0d2px8m77603s5pm3md4bcm5d0ksbcsb6ik1w52hjslnq1a9hsh5";
   };
 
   # configure script looks for d-bus but it is (probably) only needed for tests
diff --git a/pkgs/development/libraries/glibmm/default.nix b/pkgs/development/libraries/glibmm/default.nix
index 962b14bc7888..6801012e8553 100644
--- a/pkgs/development/libraries/glibmm/default.nix
+++ b/pkgs/development/libraries/glibmm/default.nix
@@ -1,15 +1,21 @@
-{ stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, libsigcxx }:
+{ stdenv, fetchurl, pkgconfig, glib, libsigcxx }:
 
+let
+  ver_maj = "2.38";
+  ver_min = "1";
+in
 stdenv.mkDerivation rec {
-  name = "glibmm-2.34.1";
+  name = "glibmm-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/glibmm/2.34/${name}.tar.xz";
-    sha256 = "1i4jsvahva2q0mig7kjnpsw0r3fnpybm8b6hzymfm2hpgqnaa9dl";
+    url = "mirror://gnome/sources/glibmm/${ver_maj}/${name}.tar.xz";
+    sha256 = "18n4czi6lh4ncj54apxms18xn9k8pmrp2ba9sxn0sk9w3pp2bja9";
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  propagatedBuildInputs = [ glib gdk_pixbuf libsigcxx ];
+  propagatedBuildInputs = [ glib libsigcxx ];
+
+  #doCheck = true; # some tests need network
 
   meta = {
     description = "C++ interface to the GLib library";
diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix
index 6a2caa281366..da746969ed78 100644
--- a/pkgs/development/libraries/gobject-introspection/default.nix
+++ b/pkgs/development/libraries/gobject-introspection/default.nix
@@ -4,12 +4,16 @@
 # it may be worth thinking about using multiple derivation outputs
 # In that case its about 6MB which could be separated
 
+let
+  ver_maj = "1.38";
+  ver_min = "0";
+in
 stdenv.mkDerivation rec {
-  name = "gobject-introspection-1.36.0";
+  name = "gobject-introspection-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gobject-introspection/1.36/${name}.tar.xz";
-    sha256 = "10v3idh489vra7pjn1g8f844nnl6719zgkgq3dv38xcf8afnvrz3";
+    url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz";
+    sha256 = "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m";
   };
 
   buildInputs = [ flex bison glib pkgconfig python ]
diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index 76424d79d7ad..e3237f83b74b 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, gettext
-, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs, x11, gobjectIntrospection
+{ stdenv, fetchurl, pkgconfig, gettext, perl
+, expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection
+, xlibs, x11, wayland, libxkbcommon
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? stdenv.isLinux, cups ? null
 }:
@@ -7,17 +8,23 @@
 assert xineramaSupport -> xlibs.libXinerama != null;
 assert cupsSupport -> cups != null;
 
+let
+  ver_maj = "3.10";
+  ver_min = "5"; # .6 needs currently unreleased wayland for introspection (wl_proxy_marshal_constructor)
+in
 stdenv.mkDerivation rec {
-  name = "gtk+-3.8.4";
+  name = "gtk+-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gtk+/3.8/${name}.tar.xz";
-    sha256 = "1qlj0qdhkp8j5xiris4l4xnx47g4pbk4qnj3nf8rwa82fwb610xh";
+    url = "mirror://gnome/sources/gtk+/${ver_maj}/${name}.tar.xz";
+    sha256 = "1iyc566r61d3jfdiq5knwbssq5bsqsn8hqzdm30vmw6dx3cgd49i";
   };
 
   enableParallelBuilding = true;
 
-  nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection ];
+  nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
+
+  buildInputs = [ wayland libxkbcommon ];
   propagatedBuildInputs = with xlibs; with stdenv.lib;
     [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk ]
     ++ optionals stdenv.isLinux [ libXrandr libXrender libXcomposite libXi libXcursor ]
diff --git a/pkgs/development/libraries/gtkmm/2.x.nix b/pkgs/development/libraries/gtkmm/2.x.nix
index ec7f01a8be5e..c7ae2ee53126 100644
--- a/pkgs/development/libraries/gtkmm/2.x.nix
+++ b/pkgs/development/libraries/gtkmm/2.x.nix
@@ -5,14 +5,16 @@ stdenv.mkDerivation rec {
 
   src = fetchurl_gnome {
     project = "gtkmm";
-    major = "2"; minor = "24"; patchlevel = "2"; extension = "xz";
-    sha256 = "0gcm91sc1a05c56kzh74l370ggj0zz8nmmjvjaaxgmhdq8lpl369";
+    major = "2"; minor = "24"; patchlevel = "4"; extension = "xz";
+    sha256 = "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4";
   };
 
   nativeBuildInputs = [pkgconfig];
 
   propagatedBuildInputs = [ glibmm gtk atkmm cairomm pangomm ];
 
+  doCheck = true;
+
   meta = {
     description = "C++ interface to the GTK+ graphical user interface library";
 
@@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
 
     license = "LGPLv2+";
 
-    maintainers = [stdenv.lib.maintainers.raskin];
+    maintainers = with stdenv.lib.maintainers; [ raskin vcunat ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/gtkmm/3.x.nix b/pkgs/development/libraries/gtkmm/3.x.nix
index 5c4a13fe507c..8649abec6378 100644
--- a/pkgs/development/libraries/gtkmm/3.x.nix
+++ b/pkgs/development/libraries/gtkmm/3.x.nix
@@ -1,17 +1,23 @@
 { stdenv, fetchurl, pkgconfig, gtk3, glibmm, cairomm, pangomm, atkmm }:
 
+let
+  ver_maj = "3.10";
+  ver_min = "1";
+in
 stdenv.mkDerivation rec {
-  name = "gtkmm-3.7.12"; # gnome 3.8 release; stable 3.6 has problems with our new glibc
+  name = "gtkmm-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gtkmm/3.7/${name}.tar.xz";
-    sha256 = "05nrilm34gid7kqlq09hcdd7942prn2vbr1qgqvdhgy4x8pvz9p9";
+    url = "mirror://gnome/sources/gtkmm/${ver_maj}/${name}.tar.xz";
+    sha256 = "0f1587pc6x8hn268vqj5zr4dvyisj5zd9zpsfxyfm1pkbjmcv9bg";
   };
 
   nativeBuildInputs = [ pkgconfig ];
 
   propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ];
 
+  doCheck = true;
+
   meta = {
     description = "C++ interface to the GTK+ graphical user interface library";
 
@@ -29,7 +35,7 @@ stdenv.mkDerivation rec {
 
     license = "LGPLv2+";
 
-    maintainers = with stdenv.lib.maintainers; [ raskin urkud ];
+    maintainers = with stdenv.lib.maintainers; [ raskin urkud vcunat ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix
index 067d3dc93834..083d0a10cdf8 100644
--- a/pkgs/development/libraries/gvfs/default.nix
+++ b/pkgs/development/libraries/gvfs/default.nix
@@ -4,12 +4,16 @@
 , libxml2, libxslt, docbook_xsl
 , lightWeight ? true, gnome, samba, makeWrapper }:
 
+let
+  ver_maj = "1.18";
+  version = "${ver_maj}.3";
+in
 stdenv.mkDerivation rec {
-  name = "gvfs-1.14.2";
+  name = "gvfs-${version}";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gvfs/1.14/${name}.tar.xz";
-    sha256 = "1g4ghyf45jg2ajdkv2d972hbckyjh3d9jdrppai85pl9pk2dmfy3";
+    url = "mirror://gnome/sources/gvfs/${ver_maj}/${name}.tar.xz";
+    sha256 = "0b27vidnrwh6yb2ga9a1k9qlrz6lrzsaz2hcxqbc1igivhb9g0hx";
   };
 
   nativeBuildInputs = [ pkgconfig intltool libtool ];
diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix
index 78e016c1582e..4cee49bea517 100644
--- a/pkgs/development/libraries/harfbuzz/default.nix
+++ b/pkgs/development/libraries/harfbuzz/default.nix
@@ -1,19 +1,30 @@
-{ stdenv, fetchurl, pkgconfig, glib, freetype,
-  icu ? null, graphite2 ? null, libintlOrEmpty }:
+{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty
+, icu, graphite2
+, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
+, withGraphite2 ? true # it is small and major distros do include it
+}:
+
+# TODO: split non-icu and icu lib into different outputs?
+# (icu is a ~30 MB dependency, the rest is very small in comparison)
 
 stdenv.mkDerivation rec {
-  name = "harfbuzz-0.9.12";
+  name = "harfbuzz-0.9.24";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2";
-    sha256 = "19cx5y2m20rp7z5j7mwqfb4ph2g8lrri69zim44x362y4w5gfly6";
+    sha256 = "08i46xx92hvz2br2d9hdxjgi0g5jglwf5bdfsandxb0qlgc5vwpd";
   };
 
-  buildInputs = [ pkgconfig glib freetype ]
+  configureFlags = [
+    ( "--with-graphite2=" + (if withGraphite2 then "yes" else "no") ) # not auto-detected by default
+    ( "--with-icu=" +       (if withIcu       then "yes" else "no") )
+  ];
+
+  buildInputs = [ pkgconfig glib freetype cairo ] # recommended by upstream
     ++ libintlOrEmpty;
   propagatedBuildInputs = []
-    ++ (stdenv.lib.optionals (icu != null) [icu])
-    ++ (stdenv.lib.optionals (graphite2 != null) [graphite2])
+    ++ stdenv.lib.optional withGraphite2 graphite2
+    ++ stdenv.lib.optional withIcu icu
     ;
 
   meta = {
diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix
index 838d6f7b75fd..4437fc4bad2e 100644
--- a/pkgs/development/libraries/icu/default.nix
+++ b/pkgs/development/libraries/icu/default.nix
@@ -3,15 +3,17 @@
 let
 
   pname = "icu4c";
-  version = "51.1";
+  ver_maj = "52";
+  ver_min = "1";
+  version = "${ver_maj}.${ver_min}";
 in
 
 stdenv.mkDerivation {
   name = pname + "-" + version;
 
   src = fetchurl {
-    url = http://download.icu-project.org/files/icu4c/51.1/icu4c-51_1-src.tgz;
-    sha256 = "0sv6hgkm92pm27zgjxgk284lcxxbsl0syi40ckw2b7yj7d8sxrc7";
+    url = "http://download.icu-project.org/files/icu4c/${version}/icu4c-${ver_maj}_${ver_min}-src.tgz";
+    sha256 = "14l0kl17nirc34frcybzg0snknaks23abhdxkmsqg3k9sil5wk9g";
   };
 
   postUnpack = ''
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index cf3febfc4553..5aa54582fdc7 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev }:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.46";
+  name = "libdrm-2.4.50";
 
   src = fetchurl {
     url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "1wah4qmrrcv0gnx65lhrlxb6gprxch92wy8lhxv6102fml6k5krk";
+    sha256 = "0idh6cwqr2rilig7vygb3gxvivchp0q1iq4md79jq340v96d48rq";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix
index ab8034c781e5..00308bf9471a 100644
--- a/pkgs/development/libraries/libnotify/default.nix
+++ b/pkgs/development/libraries/libnotify/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   ver_maj = "0.7";
-  ver_min = "5";
+  ver_min = "6";
   name = "libnotify-${ver_maj}.${ver_min}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/libnotify/${ver_maj}/${name}.tar.xz";
-    sha256 = "0lmnzy16vdjs9vlgdm0b7wfyi1nh526hv2dpb7vxb92bhx3wny23";
+    sha256 = "0dyq8zgjnnzcah31axnx6afb21kl7bks1gvrg4hjh3nk02j1rxhf";
   };
   src_m4 = fetchurl {
     url = "mirror://gentoo/distfiles/introspection-20110205.m4.tar.bz2";
diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix
index 6702cdec9c1c..adcc120bdfe9 100644
--- a/pkgs/development/libraries/libpng/default.nix
+++ b/pkgs/development/libraries/libpng/default.nix
@@ -3,11 +3,11 @@
 assert zlib != null;
 
 let
-  version = "1.6.4";
-  sha256 = "15pqany43q2hzaxqn84p9dba071xmvqi8h1bhnjxnxdf3g64zayg";
-  patch_src = fetchurl { # not released yet, hopefully OK
-    url = "mirror://sourceforge/libpng-apng/libpng-1.6.3-apng.patch.gz";
-    sha256 = "0fjnb6cgbj2c7ggl0qzcnliml2ylrjxzigp89vw0hxq221k5mlsx";
+  version = "1.6.7";
+  sha256 = "0igrw6xzvljd8ddk2qmqz4pav1glqj6naqcrzy7j2056m59wij8k";
+  patch_src = fetchurl {
+    url = "mirror://sourceforge/libpng-apng/libpng-1.6.7-apng.patch.gz";
+    sha256 = "1g5hmlb9smwl9qv6wb2d7795jqcfrx8g3dhrya5dshrj909jb95k";
   };
   whenPatched = stdenv.lib.optionalString apngSupport;
 
diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix
index 15e07af9f1ed..808407877e9d 100644
--- a/pkgs/development/libraries/librsvg/default.nix
+++ b/pkgs/development/libraries/librsvg/default.nix
@@ -6,7 +6,7 @@
 # no introspection by default, it's too big
 
 stdenv.mkDerivation rec {
-  name = "librsvg-2.36.4";
+  name = "librsvg-2.36.4"; # 2.37 needs pango 1.32.6, 2.40 doesn't support gtk2
 
   src = fetchurl {
     url    = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz";
diff --git a/pkgs/development/libraries/libsigcxx/default.nix b/pkgs/development/libraries/libsigcxx/default.nix
index b1e4f31c567e..a127e7322eb7 100644
--- a/pkgs/development/libraries/libsigcxx/default.nix
+++ b/pkgs/development/libraries/libsigcxx/default.nix
@@ -1,15 +1,17 @@
 { stdenv, fetchurl, pkgconfig, gnum4 }:
 
 stdenv.mkDerivation rec {
-  name = "libsigc++-2.2.10";
+  name = "libsigc++-2.2.11";
 
   src = fetchurl {
     url = "mirror://gnome/sources/libsigc++/2.2/${name}.tar.xz";
-    sha256 = "8ceb6f2732f5399ef50d5b70f433d49945a12e0900b8f9f43c135866a2e5bf47";
+    sha256 = "0ms93q7r8zznsqkfdj1ds9533f0aqfaw3kdkqv154rzmfigh8d4q";
   };
 
   buildInputs = [ pkgconfig gnum4 ];
 
+  doCheck = true;
+
   meta = {
     homepage = http://libsigc.sourceforge.net/;
     description = "A typesafe callback system for standard C++";
diff --git a/pkgs/development/libraries/libsoup/2.40.nix b/pkgs/development/libraries/libsoup/2.44.nix
index c82bb399e5e7..4bef93ff8cd7 100644
--- a/pkgs/development/libraries/libsoup/2.40.nix
+++ b/pkgs/development/libraries/libsoup/2.44.nix
@@ -1,32 +1,35 @@
-{ stdenv, fetchurl, pkgconfig, glib, libxml2, sqlite, intltool, python
-, gnomeSupport ? true, libgnome_keyring, glib_networking
+{ stdenv, fetchurl, pkgconfig, intltool, python, gobjectIntrospection
+, glib, libxml2, sqlite, glib_networking
+, gnomeSupport ? true, libgnome_keyring
 }:
 
 stdenv.mkDerivation {
   name = "libsoup-2.44.2";
 
+  meta = {
+    description = "HTTP client/server library";
+    license = stdenv.lib.licenses.lgpl2Plus;
+  };
+
   src = fetchurl {
     url = mirror://gnome/sources/libsoup/2.44/libsoup-2.44.2.tar.xz;
     sha256 = "1wwqsmi1jvidiqwbdnjl66nmk1yja8w9dxf9cz10zh56fjmvbr77";
   };
 
-
   preConfigure = ''
     substituteInPlace libsoup/tld-parser.py \
       --replace "!/usr/bin/env python" "!${python}/bin/${python.executable}"
   '';
-  buildInputs = [ pkgconfig intltool python ];
-  nativeBuildInputs = [ pkgconfig ];
+
+  nativeBuildInputs = [ pkgconfig intltool python gobjectIntrospection ];
+
   propagatedBuildInputs = [ glib libxml2 sqlite ]
     ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring ];
+
   passthru.propagatedUserEnvPackages = [ glib_networking ];
 
   # glib_networking is a runtime dependency, not a compile-time dependency
   configureFlags = "--disable-tls-check";
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
-
-  meta = {
-#    inherit (glib.meta) maintainers platforms;
-  };
 }
diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix
index c2b812744c9a..0a06452d5d89 100644
--- a/pkgs/development/libraries/libssh/default.nix
+++ b/pkgs/development/libraries/libssh/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, cmake, zlib, libgcrypt }:
 
 stdenv.mkDerivation rec {
-  name = "libssh-0.5.3";
+  name = "libssh-0.5.5";
 
   src = fetchurl {
-    url = "https://red.libssh.org/attachments/download/38/${name}.tar.gz";
-    sha256 = "1w6s217vjq0w3v5i0c5ql6m0ki1yz05g9snah3azxfkl9k4schpd";
+    url = "https://red.libssh.org/attachments/download/51/${name}.tar.gz";
+    sha256 = "17cfdff4hc0ijzrr15biq29fiabafz0bw621zlkbwbc1zh2hzpy0";
   };
 
   buildInputs = [ zlib libgcrypt ];
diff --git a/pkgs/development/libraries/libunique/default.nix b/pkgs/development/libraries/libunique/default.nix
index 603759d47c06..125cb890008d 100644
--- a/pkgs/development/libraries/libunique/default.nix
+++ b/pkgs/development/libraries/libunique/default.nix
@@ -18,7 +18,6 @@ stdenv.mkDerivation rec {
   buildInputs = [ pkgconfig glib gtk dbus_glib ];
 
   # don't make deprecated usages hard errors
-  preBuildPhases = "preBuild";
   preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
 
   doCheck = true;
diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix
index f06eacb67a92..dfb8f1c54a16 100644
--- a/pkgs/development/libraries/libusb1/default.nix
+++ b/pkgs/development/libraries/libusb1/default.nix
@@ -1,10 +1,13 @@
 { stdenv, fetchurl, pkgconfig, udev }:
 
+let
+  version = "1.0.17";
+in
 stdenv.mkDerivation rec {
-  name = "libusb-1.0.17";
+  name = "libusb-${version}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/libusbx/libusbx-1.0.17.tar.bz2";
+    url = "mirror://sourceforge/libusbx/libusbx-${version}.tar.bz2";
     sha256 = "1f25a773x9x5n48a0mcigyk77ay0hkiz6y6bi4588wzf7wn8svw7";
   };
 
diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix
index 835e2711a776..cc8b3f59529f 100644
--- a/pkgs/development/libraries/libvdpau/default.nix
+++ b/pkgs/development/libraries/libvdpau/default.nix
@@ -1,17 +1,17 @@
 { stdenv, fetchurl, pkgconfig, xlibs }:
 
 stdenv.mkDerivation rec {
-  name = "libvdpau-0.6";
+  name = "libvdpau-0.7";
 
   src = fetchurl {
     url = "http://people.freedesktop.org/~aplattner/vdpau/${name}.tar.gz";
-    sha256 = "0x9dwxzw0ilsy88kqlih3170z1zfrrsx1dr9jbwbn0cbkpnbwmcv";
+    sha256 = "1q5wx6fmqg2iiw57wxwh5vv4yszqs4nlvlzhzdn9vig8gi30ip14";
   };
 
   buildInputs = with xlibs; [ pkgconfig dri2proto libXext ];
 
   propagatedBuildInputs = [ xlibs.libX11 ];
-  
+
   configureFlags = stdenv.lib.optional stdenv.isDarwin [ "--build=x86_64" ];
 
   meta = {
diff --git a/pkgs/development/libraries/libwnck/3.x.nix b/pkgs/development/libraries/libwnck/3.x.nix
index 59355f3c37d7..17393fab0745 100644
--- a/pkgs/development/libraries/libwnck/3.x.nix
+++ b/pkgs/development/libraries/libwnck/3.x.nix
@@ -10,4 +10,6 @@ stdenv.mkDerivation {
 
   buildInputs = [ pkgconfig intltool ];
   propagatedBuildInputs = [ libX11 gtk3 ];
+
+  configureFlags = [ "--disable-introspection" ];
 }
diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix
index 4a1327778d47..e7923f3df5bc 100644
--- a/pkgs/development/libraries/libxkbcommon/default.nix
+++ b/pkgs/development/libraries/libxkbcommon/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchurl, yacc, flex, xkeyboard_config }:
+{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config }:
 
 stdenv.mkDerivation rec {
-  name = "libxkbcommon-0.2.0";
+  name = "libxkbcommon-0.3.1";
 
   src = fetchurl {
-    url = "http://xkbcommon.org/download/${name}.tar.bz2";
-    sha256 = "0hpvfa8p4bhvhc1gcb578m354p5idd192xb8zlaq16d33h90msvl";
+    url = "http://xkbcommon.org/download/${name}.tar.xz";
+    sha256 = "13mk335r4dhi9qglzbp46ina1wz4qgcp8r7s06iq7j50pf0kb5ww";
   };
 
-  buildInputs = [ yacc flex xkeyboard_config ];
+  buildInputs = [ pkgconfig yacc flex xkeyboard_config ];
 
   configureFlags = ''
     --with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index b613f4c8964d..f7ff87b34cc6 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -3,8 +3,8 @@
 , libdrm, xorg, wayland, udev, llvm, libffi
 , libvdpau
 , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
-, enableR600LlvmCompiler ? false # current llvm-3.3 + mesa-9.1.6 don't configure
-, enableExtraFeatures ? false # add ~15 MB to mesa_drivers
+, enableR600LlvmCompiler ? true, libelf
+, enableExtraFeatures ? false # not maintained
 }:
 
 if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
@@ -16,23 +16,26 @@ else
     This or the mesa attribute (which also contains GLU) are small (~ 2.2 MB, mostly headers)
     and are designed to be the buildInput of other packages.
   - DRI and EGL drivers are compiled into $drivers output,
-    which is bigger (~13 MB) and depends on LLVM (~40 MB).
-    These should be searched at runtime in /run/current-system/sw/lib/*
+    which is bigger (~13 MB) and depends on LLVM (~44 MB).
+    These should be searched at runtime in "/run/opengl-driver{,-32}/lib/*"
     and so are kind-of impure (given by NixOS).
     (I suppose on non-NixOS one would create the appropriate symlinks from there.)
+  - libOSMesa is in $osmesa (~4.2 MB)
 */
 
 let
-  version = "9.1.7";
+  version = "9.2.5";
   # this is the default search path for DRI drivers (note: X server introduces an overriding env var)
   driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
 in
+with { inherit (stdenv.lib) optional optionals optionalString; };
+
 stdenv.mkDerivation {
   name = "mesa-noglu-${version}";
 
-  src = fetchurl {
+  src =  fetchurl {
     url = "ftp://ftp.freedesktop.org/pub/mesa/${version}/MesaLib-${version}.tar.bz2";
-    sha256 = "1824p185ys7z9bah46xasp7khv44n9wv2c4p38i1dispniwbirih";
+    sha256 = "1w3bxclgwl2hwyxk3za7dbdakb8jsya7afck35cz0v8pxppvjsml";
   };
 
   prePatch = "patchShebangs .";
@@ -40,7 +43,6 @@ stdenv.mkDerivation {
   patches = [
     ./static-gallium.patch
     ./dricore-gallium.patch
-    ./fix-rounding.patch
     ./werror-wundef.patch
   ];
 
@@ -50,11 +52,11 @@ stdenv.mkDerivation {
       -i src/egl/main/Makefile.am
   '';
 
-  outputs = ["out" "drivers"];
+  outputs = ["out" "drivers" "osmesa"];
 
   preConfigure = "./autogen.sh";
 
-  configureFlags = with stdenv.lib; [
+  configureFlags = [
     "--with-dri-driverdir=$(drivers)/lib/dri"
     "--with-egl-driver-dir=$(drivers)/lib/egl"
     "--with-dri-searchpath=${driverLink}/lib/dri"
@@ -65,70 +67,84 @@ stdenv.mkDerivation {
     "--enable-driglx-direct" # seems enabled anyway
     "--enable-gallium-llvm" "--with-llvm-shared-libs"
     "--enable-xa" # used in vmware driver
+    "--enable-gles1" "--enable-gles2"
+    "--enable-vdpau"
+    "--enable-osmesa" # used by wine
 
     "--with-dri-drivers=i965,r200,radeon"
-    "--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" # radeonsi complains about R600 missing in LLVM
+    ("--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast"
+      + optionalString enableR600LlvmCompiler ",radeonsi")
     "--with-egl-platforms=x11,wayland,drm" "--enable-gbm" "--enable-shared-glapi"
   ]
-    ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler" # complains about R600 missing in LLVM
+    ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler"
     ++ optional enableTextureFloats "--enable-texture-float"
     ++ optionals enableExtraFeatures [
-      "--enable-gles1" "--enable-gles2"
-      "--enable-osmesa"
       "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
       #"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
-      "--enable-vdpau"
       #"--enable-opencl" # ToDo: opencl seems to need libclc for clover
     ];
 
   nativeBuildInputs = [ pkgconfig python makedepend file flex bison ];
 
   propagatedBuildInputs = with xorg; [ libXdamage libXxf86vm ]
-  ++
-  stdenv.lib.optionals stdenv.isLinux [libdrm]
-  ;
+    ++ optionals stdenv.isLinux [libdrm]
+    ;
   buildInputs = with xorg; [
     autoconf automake libtool intltool expat libxml2Python llvm
     libXfixes glproto dri2proto libX11 libXext libxcb libXt
-    libffi wayland
-  ] ++ stdenv.lib.optionals enableExtraFeatures [ /*libXvMC*/ libvdpau ]
-  ++ stdenv.lib.optional stdenv.isLinux [udev]
-  ;
+    libffi wayland libvdpau
+  ] ++ optionals enableExtraFeatures [ /*libXvMC*/ ]
+    ++ optional stdenv.isLinux udev
+    ++ optional enableR600LlvmCompiler libelf
+    ;
 
   enableParallelBuilding = true;
-  doCheck = true;
+  #doCheck = true; # https://bugs.freedesktop.org/show_bug.cgi?id=67672
+  # TODO: best fix this before merging >=9.2 to master
 
-  # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
+  # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM;
+  #   also move libOSMesa to $osmesa, as it's relatively big
   # ToDo: probably not all .la files are completely fixed, but it shouldn't matter
   postInstall = with stdenv.lib; ''
     mv -t "$drivers/lib/" \
   '' + optionalString enableExtraFeatures ''
       `#$out/lib/libXvMC*` \
-      $out/lib/vdpau \
-      $out/lib/libOSMesa* \
       $out/lib/gbm $out/lib/libgbm* \
       $out/lib/gallium-pipe \
   '' + ''
       $out/lib/libdricore* \
       $out/lib/libgallium* \
+      $out/lib/vdpau \
       $out/lib/libxatracker*
 
+    mkdir -p {$osmesa,$drivers}/lib/pkgconfig
+    mv -t $osmesa/lib/ \
+      $out/lib/libOSMesa*
+
+    mv -t $drivers/lib/pkgconfig/ \
+      $out/lib/pkgconfig/xatracker.pc
+
+    mv -t $osmesa/lib/pkgconfig/ \
+      $out/lib/pkgconfig/osmesa.pc
+
   '' + /* now fix references in .la files */ ''
     sed "/^libdir=/s,$out,$drivers," -i \
   '' + optionalString enableExtraFeatures ''
       `#$drivers/lib/libXvMC*.la` \
-      $drivers/lib/vdpau/*.la \
-      $drivers/lib/libOSMesa*.la \
       $drivers/lib/gallium-pipe/*.la \
   '' + ''
       $drivers/lib/libgallium.la \
+      $drivers/lib/vdpau/*.la \
       $drivers/lib/libdricore*.la
 
     sed "s,$out\(/lib/\(libdricore[0-9\.]*\|libgallium\).la\),$drivers\1,g" \
       -i $drivers/lib/*.la $drivers/lib/*/*.la
 
+    sed "/^libdir=/s,$out,$osmesa," -i \
+      $osmesa/lib/libOSMesa*.la
+
   '' + /* work around bug #529, but maybe $drivers should also be patchelf-ed */ ''
-    find $drivers/ -type f -executable -print0 | xargs -0 strip -S || true
+    find $drivers/ $osmesa/ -type f -executable -print0 | xargs -0 strip -S || true
 
   '' + /* add RPATH so the drivers can find the moved libgallium and libdricore9 */ ''
     for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
@@ -138,6 +154,8 @@ stdenv.mkDerivation {
     done
   '' + /* set the default search path for DRI drivers; used e.g. by X server */ ''
     substituteInPlace "$out/lib/pkgconfig/dri.pc" --replace '$(drivers)' "${driverLink}"
+  '' + /* move vdpau drivers to $drivers/lib, so they are found */ ''
+    mv "$drivers"/lib/vdpau/* "$drivers"/lib/ && rmdir "$drivers"/lib/vdpau
   '';
   #ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
 
@@ -148,6 +166,6 @@ stdenv.mkDerivation {
     homepage = http://www.mesa3d.org/;
     license = "bsd";
     platforms = stdenv.lib.platforms.mesaPlatforms;
-    maintainers = [ stdenv.lib.maintainers.simons ];
+    maintainers = with stdenv.lib.maintainers; [ simons vcunat ];
   };
 }
diff --git a/pkgs/development/libraries/mesa/fix-rounding.patch b/pkgs/development/libraries/mesa/fix-rounding.patch
deleted file mode 100644
index f81760a6708a..000000000000
--- a/pkgs/development/libraries/mesa/fix-rounding.patch
+++ /dev/null
@@ -1,357 +0,0 @@
-From c25ae5d27b114e23d5734f846002df1a05759658 Mon Sep 17 00:00:00 2001
-From: Roland Scheidegger <sroland@vmware.com>
-Date: Thu, 31 Jan 2013 19:27:49 +0000
-Subject: gallivm: fix issues with trunc/round/floor/ceil with no arch rounding
-
-The emulation of these if there's no rounding instruction available
-is a bit more complicated than what the code did.
-In particular, doing fp-to-int/int-to-fp will not work if the exponent
-is large enough (and with NaNs, Infs). Hence such values need to be filtered
-out and the original value returned in this case (which fortunately should
-always be exact). This comes at the expense of performance (if your cpu
-doesn't support rounding instructions).
-Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for
-values near negative (for floor) or positive (for ceil) zero, fix that as well
-(fixing this issue might not actually be slower except for ceil/iceil if the
-type is not signed which is probably rare - note iceil has no callers left
-in any case).
-
-Also add some new rounding test values in lp_test_arit to actually test
-for that stuff (which previously would have failed without sse41).
-
-This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701.
----
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
-index b4e9f23..ec05026 100644
---- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
-+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
-@@ -1590,12 +1590,37 @@ lp_build_trunc(struct lp_build_context *bld,
-       return lp_build_round_arch(bld, a, LP_BUILD_ROUND_TRUNCATE);
-    }
-    else {
--      LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
--      LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->gallivm, type);
--      LLVMValueRef res;
--      res = LLVMBuildFPToSI(builder, a, int_vec_type, "");
--      res = LLVMBuildSIToFP(builder, res, vec_type, "");
--      return res;
-+      const struct lp_type type = bld->type;
-+      struct lp_type inttype;
-+      struct lp_build_context intbld;
-+      LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
-+      LLVMValueRef trunc, res, anosign, mask;
-+      LLVMTypeRef int_vec_type = bld->int_vec_type;
-+      LLVMTypeRef vec_type = bld->vec_type;
-+
-+      assert(type.width == 32); /* might want to handle doubles at some point */
-+
-+      inttype = type;
-+      inttype.floating = 0;
-+      lp_build_context_init(&intbld, bld->gallivm, inttype);
-+
-+      /* round by truncation */
-+      trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
-+      res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc");
-+
-+      /* mask out sign bit */
-+      anosign = lp_build_abs(bld, a);
-+      /*
-+       * mask out all values if anosign > 2^24
-+       * This should work both for large ints (all rounding is no-op for them
-+       * because such floats are always exact) as well as special cases like
-+       * NaNs, Infs (taking advantage of the fact they use max exponent).
-+       * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
-+       */
-+      anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
-+      cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
-+      mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
-+      return lp_build_select(bld, mask, a, res);
-    }
- }
- 
-@@ -1620,11 +1645,36 @@ lp_build_round(struct lp_build_context *bld,
-       return lp_build_round_arch(bld, a, LP_BUILD_ROUND_NEAREST);
-    }
-    else {
--      LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
--      LLVMValueRef res;
-+      const struct lp_type type = bld->type;
-+      struct lp_type inttype;
-+      struct lp_build_context intbld;
-+      LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
-+      LLVMValueRef res, anosign, mask;
-+      LLVMTypeRef int_vec_type = bld->int_vec_type;
-+      LLVMTypeRef vec_type = bld->vec_type;
-+
-+      assert(type.width == 32); /* might want to handle doubles at some point */
-+
-+      inttype = type;
-+      inttype.floating = 0;
-+      lp_build_context_init(&intbld, bld->gallivm, inttype);
-+
-       res = lp_build_iround(bld, a);
-       res = LLVMBuildSIToFP(builder, res, vec_type, "");
--      return res;
-+
-+      /* mask out sign bit */
-+      anosign = lp_build_abs(bld, a);
-+      /*
-+       * mask out all values if anosign > 2^24
-+       * This should work both for large ints (all rounding is no-op for them
-+       * because such floats are always exact) as well as special cases like
-+       * NaNs, Infs (taking advantage of the fact they use max exponent).
-+       * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
-+       */
-+      anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
-+      cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
-+      mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
-+      return lp_build_select(bld, mask, a, res);
-    }
- }
- 
-@@ -1648,11 +1698,52 @@ lp_build_floor(struct lp_build_context *bld,
-       return lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR);
-    }
-    else {
--      LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
--      LLVMValueRef res;
--      res = lp_build_ifloor(bld, a);
--      res = LLVMBuildSIToFP(builder, res, vec_type, "");
--      return res;
-+      const struct lp_type type = bld->type;
-+      struct lp_type inttype;
-+      struct lp_build_context intbld;
-+      LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
-+      LLVMValueRef trunc, res, anosign, mask;
-+      LLVMTypeRef int_vec_type = bld->int_vec_type;
-+      LLVMTypeRef vec_type = bld->vec_type;
-+
-+      assert(type.width == 32); /* might want to handle doubles at some point */
-+
-+      inttype = type;
-+      inttype.floating = 0;
-+      lp_build_context_init(&intbld, bld->gallivm, inttype);
-+
-+      /* round by truncation */
-+      trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
-+      res = LLVMBuildSIToFP(builder, trunc, vec_type, "floor.trunc");
-+
-+      if (type.sign) {
-+         LLVMValueRef tmp;
-+
-+         /*
-+          * fix values if rounding is wrong (for non-special cases)
-+          * - this is the case if trunc > a
-+          */
-+         mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, res, a);
-+         /* tmp = trunc > a ? 1.0 : 0.0 */
-+         tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, "");
-+         tmp = lp_build_and(&intbld, mask, tmp);
-+         tmp = LLVMBuildBitCast(builder, tmp, vec_type, "");
-+         res = lp_build_sub(bld, res, tmp);
-+      }
-+
-+      /* mask out sign bit */
-+      anosign = lp_build_abs(bld, a);
-+      /*
-+       * mask out all values if anosign > 2^24
-+       * This should work both for large ints (all rounding is no-op for them
-+       * because such floats are always exact) as well as special cases like
-+       * NaNs, Infs (taking advantage of the fact they use max exponent).
-+       * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
-+       */
-+      anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
-+      cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
-+      mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
-+      return lp_build_select(bld, mask, a, res);
-    }
- }
- 
-@@ -1676,11 +1767,48 @@ lp_build_ceil(struct lp_build_context *bld,
-       return lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL);
-    }
-    else {
--      LLVMTypeRef vec_type = lp_build_vec_type(bld->gallivm, type);
--      LLVMValueRef res;
--      res = lp_build_iceil(bld, a);
--      res = LLVMBuildSIToFP(builder, res, vec_type, "");
--      return res;
-+      const struct lp_type type = bld->type;
-+      struct lp_type inttype;
-+      struct lp_build_context intbld;
-+      LLVMValueRef cmpval = lp_build_const_vec(bld->gallivm, type, 2^24);
-+      LLVMValueRef trunc, res, anosign, mask, tmp;
-+      LLVMTypeRef int_vec_type = bld->int_vec_type;
-+      LLVMTypeRef vec_type = bld->vec_type;
-+
-+      assert(type.width == 32); /* might want to handle doubles at some point */
-+
-+      inttype = type;
-+      inttype.floating = 0;
-+      lp_build_context_init(&intbld, bld->gallivm, inttype);
-+
-+      /* round by truncation */
-+      trunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
-+      trunc = LLVMBuildSIToFP(builder, trunc, vec_type, "ceil.trunc");
-+
-+      /*
-+       * fix values if rounding is wrong (for non-special cases)
-+       * - this is the case if trunc < a
-+       */
-+      mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a);
-+      /* tmp = trunc < a ? 1.0 : 0.0 */
-+      tmp = LLVMBuildBitCast(builder, bld->one, int_vec_type, "");
-+      tmp = lp_build_and(&intbld, mask, tmp);
-+      tmp = LLVMBuildBitCast(builder, tmp, vec_type, "");
-+      res = lp_build_add(bld, trunc, tmp);
-+
-+      /* mask out sign bit */
-+      anosign = lp_build_abs(bld, a);
-+      /*
-+       * mask out all values if anosign > 2^24
-+       * This should work both for large ints (all rounding is no-op for them
-+       * because such floats are always exact) as well as special cases like
-+       * NaNs, Infs (taking advantage of the fact they use max exponent).
-+       * (2^24 is arbitrary anything between 2^24 and 2^31 should work.)
-+       */
-+      anosign = LLVMBuildBitCast(builder, anosign, int_vec_type, "");
-+      cmpval = LLVMBuildBitCast(builder, cmpval, int_vec_type, "");
-+      mask = lp_build_cmp(&intbld, PIPE_FUNC_GREATER, anosign, cmpval);
-+      return lp_build_select(bld, mask, a, res);
-    }
- }
- 
-@@ -1826,32 +1954,30 @@ lp_build_ifloor(struct lp_build_context *bld,
-          res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_FLOOR);
-       }
-       else {
--         /* Take the sign bit and add it to 1 constant */
--         LLVMTypeRef vec_type = bld->vec_type;
--         unsigned mantissa = lp_mantissa(type);
--         LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type,
--                                  (unsigned long long)1 << (type.width - 1));
--         LLVMValueRef sign;
--         LLVMValueRef offset;
-+         struct lp_type inttype;
-+         struct lp_build_context intbld;
-+         LLVMValueRef trunc, itrunc, mask;
- 
--         /* sign = a < 0 ? ~0 : 0 */
--         sign = LLVMBuildBitCast(builder, a, int_vec_type, "");
--         sign = LLVMBuildAnd(builder, sign, mask, "");
--         sign = LLVMBuildAShr(builder, sign,
--                              lp_build_const_int_vec(bld->gallivm, type,
--                                                     type.width - 1),
--                              "ifloor.sign");
-+         assert(type.floating);
-+         assert(lp_check_value(type, a));
- 
--         /* offset = -0.99999(9)f */
--         offset = lp_build_const_vec(bld->gallivm, type,
--                                     -(double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa));
--         offset = LLVMConstBitCast(offset, int_vec_type);
-+         inttype = type;
-+         inttype.floating = 0;
-+         lp_build_context_init(&intbld, bld->gallivm, inttype);
- 
--         /* offset = a < 0 ? offset : 0.0f */
--         offset = LLVMBuildAnd(builder, offset, sign, "");
--         offset = LLVMBuildBitCast(builder, offset, vec_type, "ifloor.offset");
-+         /* round by truncation */
-+         itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
-+         trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "ifloor.trunc");
- 
--         res = LLVMBuildFAdd(builder, res, offset, "ifloor.res");
-+         /*
-+          * fix values if rounding is wrong (for non-special cases)
-+          * - this is the case if trunc > a
-+          * The results of doing this with NaNs, very large values etc.
-+          * are undefined but this seems to be the case anyway.
-+          */
-+         mask = lp_build_cmp(bld, PIPE_FUNC_GREATER, trunc, a);
-+         /* cheapie minus one with mask since the mask is minus one / zero */
-+         return lp_build_add(&intbld, itrunc, mask);
-       }
-    }
- 
-@@ -1883,35 +2009,30 @@ lp_build_iceil(struct lp_build_context *bld,
-       res = lp_build_round_arch(bld, a, LP_BUILD_ROUND_CEIL);
-    }
-    else {
--      LLVMTypeRef vec_type = bld->vec_type;
--      unsigned mantissa = lp_mantissa(type);
--      LLVMValueRef offset;
-+      struct lp_type inttype;
-+      struct lp_build_context intbld;
-+      LLVMValueRef trunc, itrunc, mask;
- 
--      /* offset = 0.99999(9)f */
--      offset = lp_build_const_vec(bld->gallivm, type,
--                                  (double)(((unsigned long long)1 << mantissa) - 10)/((unsigned long long)1 << mantissa));
-+      assert(type.floating);
-+      assert(lp_check_value(type, a));
- 
--      if (type.sign) {
--         LLVMValueRef mask = lp_build_const_int_vec(bld->gallivm, type,
--                                (unsigned long long)1 << (type.width - 1));
--         LLVMValueRef sign;
-+      inttype = type;
-+      inttype.floating = 0;
-+      lp_build_context_init(&intbld, bld->gallivm, inttype);
- 
--         /* sign = a < 0 ? 0 : ~0 */
--         sign = LLVMBuildBitCast(builder, a, int_vec_type, "");
--         sign = LLVMBuildAnd(builder, sign, mask, "");
--         sign = LLVMBuildAShr(builder, sign,
--                              lp_build_const_int_vec(bld->gallivm, type,
--                                                     type.width - 1),
--                              "iceil.sign");
--         sign = LLVMBuildNot(builder, sign, "iceil.not");
--
--         /* offset = a < 0 ? 0.0 : offset */
--         offset = LLVMConstBitCast(offset, int_vec_type);
--         offset = LLVMBuildAnd(builder, offset, sign, "");
--         offset = LLVMBuildBitCast(builder, offset, vec_type, "iceil.offset");
--      }
-+      /* round by truncation */
-+      itrunc = LLVMBuildFPToSI(builder, a, int_vec_type, "");
-+      trunc = LLVMBuildSIToFP(builder, itrunc, bld->vec_type, "iceil.trunc");
- 
--      res = LLVMBuildFAdd(builder, a, offset, "iceil.res");
-+      /*
-+       * fix values if rounding is wrong (for non-special cases)
-+       * - this is the case if trunc < a
-+       * The results of doing this with NaNs, very large values etc.
-+       * are undefined but this seems to be the case anyway.
-+       */
-+      mask = lp_build_cmp(bld, PIPE_FUNC_LESS, trunc, a);
-+      /* cheapie plus one with mask since the mask is minus one / zero */
-+      return lp_build_sub(&intbld, itrunc, mask);
-    }
- 
-    /* round to nearest (toward zero) */
-diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
-index 99928b8..f14e4b3 100644
---- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
-+++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
-@@ -207,6 +207,18 @@ const float round_values[] = {
-       -10.0, -1, 0.0, 12.0,
-       -1.49, -0.25, 1.25, 2.51,
-       -0.99, -0.01, 0.01, 0.99,
-+      1.401298464324817e-45f, // smallest denormal
-+      -1.401298464324817e-45f,
-+      1.62981451e-08f,
-+      -1.62981451e-08f,
-+      1.62981451e15f, // large number not representable as 32bit int
-+      -1.62981451e15f,
-+      FLT_EPSILON,
-+      -FLT_EPSILON,
-+      1.0f - 0.5f*FLT_EPSILON,
-+      -1.0f + FLT_EPSILON,
-+      FLT_MAX,
-+      -FLT_MAX
- };
- 
- static float fractf(float x)
---
-cgit v0.9.0.2-2-gbebe
diff --git a/pkgs/development/libraries/pangomm/2.28.x.nix b/pkgs/development/libraries/pangomm/default.nix
index 6843ff7a3072..f71c52e670bf 100644
--- a/pkgs/development/libraries/pangomm/2.28.x.nix
+++ b/pkgs/development/libraries/pangomm/default.nix
@@ -1,11 +1,15 @@
 { stdenv, fetchurl, pkgconfig, pango, glibmm, cairomm, libpng, cairo }:
 
+let
+  ver_maj = "2.34";
+  ver_min = "0";
+in
 stdenv.mkDerivation rec {
-  name = "pangomm-2.28.4";
+  name = "pangomm-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = mirror://gnome/sources/pangomm/2.28/pangomm-2.28.4.tar.xz;
-    sha256 = "10kcdpg080m393f1vz0km41kd3483fkyabprm59gvjwklxkcp3bp";
+    url = "mirror://gnome/sources/pangomm/${ver_maj}/${name}.tar.xz";
+    sha256 = "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix
index 23bfbeeb8088..cb76a1b615fe 100644
--- a/pkgs/development/libraries/pixman/default.nix
+++ b/pkgs/development/libraries/pixman/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, pkgconfig, perl, withPNG ? true, libpng, glib /*just passthru*/ }:
 
 stdenv.mkDerivation rec {
-  name = "pixman-0.30.2";
+  name = "pixman-0.32.4";
 
   src = fetchurl {
     url = "http://cairographics.org/releases/${name}.tar.gz";
-    sha256 = "1sgnpx34pj3245a9v8056jddc4cg4xxkqdjvvw6k2hnprhh8k65x";
+    sha256 = "113ycngcssbrps217dyajq96hm9xghsfch82h14yffla1r1fviw0";
   };
 
   nativeBuildInputs = [ pkgconfig perl ];
diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix
index c438849e0cdb..0db3722e6aaa 100644
--- a/pkgs/development/libraries/poppler/default.nix
+++ b/pkgs/development/libraries/poppler/default.nix
@@ -4,8 +4,8 @@
 }:
 
 let
-  version = "0.24.3"; # even major numbers are stable
-  sha256 = "0kip6mxp4lscr3wvgfashqk7ymhx2w1hgdilfpgig0a5kr805kfj";
+  version = "0.24.4"; # even major numbers are stable
+  sha256 = "1qh1gk6hq5cfpkqyxxgkpyl78na8dckmh6zbgsqbpw762yd518y8";
 
   qtcairo_patches =
     let qtcairo = fetchgit { # the version for poppler-0.22
diff --git a/pkgs/development/libraries/silgraphite/graphite2.nix b/pkgs/development/libraries/silgraphite/graphite2.nix
index 1ceb7a050006..3212d13ce352 100644
--- a/pkgs/development/libraries/silgraphite/graphite2.nix
+++ b/pkgs/development/libraries/silgraphite/graphite2.nix
@@ -1,17 +1,15 @@
-{ stdenv, fetchurl, pkgconfig, freetype, libXft, pango, fontconfig, cmake }:
+{ stdenv, fetchurl, pkgconfig, freetype, cmake }:
 
 stdenv.mkDerivation rec {
   version = "1.2.4";
   name = "graphite2-${version}";
-  
+
   src = fetchurl {
     url = "mirror://sourceforge/silgraphite/graphite2/${name}.tgz";
     sha256 = "00xhv1mp640fr3wmdzwn4yz0g56jd4r9fb7b02mc1g19h0bdbhsb";
   };
 
-  buildInputs = [pkgconfig freetype libXft pango fontconfig cmake];
-
-  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
+  buildInputs = [ pkgconfig freetype cmake ];
 
   meta = {
     description = "An advanced font engine";
diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix
index 8854a41210b6..e9ad56bdbf16 100644
--- a/pkgs/development/libraries/wayland/default.nix
+++ b/pkgs/development/libraries/wayland/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, libffi, expat, pkgconfig, libxslt, docbook_xsl, doxygen }:
 
-let version = "1.0.5"; in
+let version = "1.3.0"; in
 
 stdenv.mkDerivation rec {
   name = "wayland-${version}";
 
   src = fetchurl {
     url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
-    sha256 = "130n7v5i7rfsrli2n8vdzfychlgd8v7by7sfgp8vfqdlss5km34w";
+    sha256 = "0vhd8z74r4zmm7hrbb8l450sb6slqkdrvmk4k78sq9lays2pd09f";
   };
 
   buildInputs = [ pkgconfig libffi expat libxslt docbook_xsl doxygen ];
diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix
new file mode 100644
index 000000000000..766bb7154746
--- /dev/null
+++ b/pkgs/development/libraries/webkitgtk/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchurl, perl, python, ruby, bison, gperf, flex
+, pkgconfig, which, gettext, gobjectIntrospection
+, gtk2, gtk3, wayland, libwebp, enchant
+, libxml2, libsoup, libsecret, libxslt, harfbuzz
+}:
+
+stdenv.mkDerivation rec {
+  name = "webkitgtk-2.2.3";
+
+  meta = {
+    description = "Web content rendering engine, GTK+ port";
+    homepage = "http://webkitgtk.org/";
+    license = stdenv.lib.licenses.bsd2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "http://webkitgtk.org/releases/${name}.tar.xz";
+    sha256 = "01a69v0aw3bv2zkx6jzk71r3pjlf2xfhxavjnma89kmd78qb7g4l";
+  };
+
+  patches = [ ./webcore-svg-libxml-cflags.patch ];
+
+  prePatch = ''
+    patchShebangs Tools/gtk
+
+    for i in $(find . -name '*.p[l|m]'); do
+      sed -e 's@/usr/bin/gcc@gcc@' -i $i
+    done
+  '';
+
+  configureFlags = [
+    "--disable-geolocation"
+    "--disable-video"              # TODO: gsteramer-1.0
+    "--enable-introspection"
+  ];
+
+  dontAddDisableDepTrack = true;
+
+  nativeBuildInputs = [
+    perl python ruby bison gperf flex
+    pkgconfig which gettext gobjectIntrospection
+  ];
+
+  buildInputs = [
+    gtk2 wayland libwebp enchant
+    libxml2 libsecret libxslt harfbuzz
+  ];
+
+  propagatedBuildInputs = [ gtk3 libsoup ];
+
+  #enableParallelBuilding = true; # build problems on Hydra
+}
diff --git a/pkgs/development/libraries/webkitgtk/webcore-svg-libxml-cflags.patch b/pkgs/development/libraries/webkitgtk/webcore-svg-libxml-cflags.patch
new file mode 100644
index 000000000000..03fc3f3f97de
--- /dev/null
+++ b/pkgs/development/libraries/webkitgtk/webcore-svg-libxml-cflags.patch
@@ -0,0 +1,8 @@
+--- webkitgtk-2.2.3-orig/GNUmakefile.in	2013-12-04 17:56:28.000000000 +0800
++++ webkitgtk-2.2.3/GNUmakefile.in	2013-12-05 17:32:37.976689248 +0800
+@@ -21911,6 +21911,7 @@
+ @ENABLE_SVG_TRUE@	$(CAIRO_CFLAGS) \
+ @ENABLE_SVG_TRUE@	$(FREETYPE_CFLAGS) \
+ @ENABLE_SVG_TRUE@	$(LIBSOUP_CFLAGS) \
++@ENABLE_SVG_TRUE@	$(LIBXML_CFLAGS) \
+ @ENABLE_SVG_TRUE@	$(UNICODE_CFLAGS)