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/Xaw3d/default.nix4
-rw-r--r--pkgs/development/libraries/atk/default.nix4
-rw-r--r--pkgs/development/libraries/boost/1.65.nix2
-rw-r--r--pkgs/development/libraries/boost/1.66.nix14
-rw-r--r--pkgs/development/libraries/cppdb/default.nix6
-rw-r--r--pkgs/development/libraries/csfml/default.nix31
-rw-r--r--pkgs/development/libraries/dlib/default.nix4
-rw-r--r--pkgs/development/libraries/fastpbkdf2/default.nix31
-rw-r--r--pkgs/development/libraries/gdal/default.nix2
-rw-r--r--pkgs/development/libraries/gdal/gdal-1_11.nix4
-rw-r--r--pkgs/development/libraries/gegl/3.0.nix4
-rw-r--r--pkgs/development/libraries/glibc/2.26-75to115.diff.gzbin0 -> 32865 bytes
-rw-r--r--pkgs/development/libraries/glibc/allow-kernel-2.6.32.patch39
-rw-r--r--pkgs/development/libraries/glibc/common.nix22
-rw-r--r--pkgs/development/libraries/glm/default.nix28
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix4
-rw-r--r--pkgs/development/libraries/kdb/default.nix4
-rw-r--r--pkgs/development/libraries/kerberos/krb5.nix33
-rw-r--r--pkgs/development/libraries/libagar/default.nix5
-rw-r--r--pkgs/development/libraries/libappindicator/default.nix4
-rw-r--r--pkgs/development/libraries/libassuan/default.nix4
-rw-r--r--pkgs/development/libraries/libcollectdclient/default.nix11
-rw-r--r--pkgs/development/libraries/libdbi-drivers/default.nix18
-rw-r--r--pkgs/development/libraries/libdrm/default.nix4
-rw-r--r--pkgs/development/libraries/libgcrypt/default.nix4
-rw-r--r--pkgs/development/libraries/libhttpseverywhere/default.nix15
-rw-r--r--pkgs/development/libraries/libindicate/default.nix6
-rw-r--r--pkgs/development/libraries/liblcf/default.nix23
-rw-r--r--pkgs/development/libraries/liblouis/default.nix57
-rw-r--r--pkgs/development/libraries/libmypaint/default.nix32
-rw-r--r--pkgs/development/libraries/libnftnl/default.nix4
-rw-r--r--pkgs/development/libraries/libosinfo/default.nix40
-rw-r--r--pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch11
-rw-r--r--pkgs/development/libraries/librdf/redland.nix2
-rw-r--r--pkgs/development/libraries/libskk/default.nix14
-rw-r--r--pkgs/development/libraries/libsoundio/default.nix10
-rw-r--r--pkgs/development/libraries/libtoxcore/old-api.nix59
-rw-r--r--pkgs/development/libraries/libunity/default.nix27
-rw-r--r--pkgs/development/libraries/libvirt/default.nix6
-rw-r--r--pkgs/development/libraries/mesa/default.nix4
-rw-r--r--pkgs/development/libraries/mongoc/default.nix6
-rw-r--r--pkgs/development/libraries/opendbx/default.nix6
-rw-r--r--pkgs/development/libraries/openwsman/default.nix37
-rw-r--r--pkgs/development/libraries/pcre/default.nix3
-rw-r--r--pkgs/development/libraries/pcre/stacksize-detection.patch16
-rw-r--r--pkgs/development/libraries/physics/lhapdf/default.nix4
-rw-r--r--pkgs/development/libraries/physics/rivet/default.nix17
-rw-r--r--pkgs/development/libraries/physics/yoda/default.nix7
-rw-r--r--pkgs/development/libraries/poco/default.nix5
-rw-r--r--pkgs/development/libraries/protobuf/2.5.nix10
-rw-r--r--pkgs/development/libraries/qt-3/default.nix2
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.9/default.nix3
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qttools.nix4
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix6
-rw-r--r--pkgs/development/libraries/sblim-sfcc/default.nix34
-rw-r--r--pkgs/development/libraries/science/math/nccl/default.nix41
-rw-r--r--pkgs/development/libraries/science/math/openblas/default.nix8
-rw-r--r--pkgs/development/libraries/serf/default.nix2
-rw-r--r--pkgs/development/libraries/snappy/default.nix13
-rw-r--r--pkgs/development/libraries/snappy/disable-benchmark.patch5
-rw-r--r--pkgs/development/libraries/speechd/default.nix72
-rw-r--r--pkgs/development/libraries/swc/default.nix34
-rw-r--r--pkgs/development/libraries/tntdb/default.nix2
-rw-r--r--pkgs/development/libraries/unixODBCDrivers/default.nix12
-rw-r--r--pkgs/development/libraries/webkitgtk/2.18.nix4
-rw-r--r--pkgs/development/libraries/wld/default.nix30
-rw-r--r--pkgs/development/libraries/wlroots/default.nix26
-rw-r--r--pkgs/development/libraries/wt/default.nix6
-rw-r--r--pkgs/development/libraries/wxwidgets/3.1/default.nix16
71 files changed, 673 insertions, 358 deletions
diff --git a/pkgs/development/libraries/Xaw3d/default.nix b/pkgs/development/libraries/Xaw3d/default.nix
index 8cadc7290aa..07d256f4f57 100644
--- a/pkgs/development/libraries/Xaw3d/default.nix
+++ b/pkgs/development/libraries/Xaw3d/default.nix
@@ -4,9 +4,9 @@ stdenv.mkDerivation {
   name = "Xaw3d-1.6.2";
   src = fetchurl {
     urls = [ 
-      ftp://ftp.x.org/pub/xorg/individual/lib/libXaw3d-1.6.tar.bz2
+      ftp://ftp.x.org/pub/xorg/individual/lib/libXaw3d-1.6.2.tar.bz2
       ];
-    sha256 = "099kx6ni5vkgr3kf40glif8m6r1m1hq6hxqlqrblaj1w5cphh8hi";
+    sha256 = "0awplv1nf53ywv01yxphga3v6dcniwqnxgnb0cn4khb121l12kxp";
   };
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [imake gccmakedep libXpm libXp bison flex];
diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix
index 61c18837782..f7d3887cc18 100644
--- a/pkgs/development/libraries/atk/default.nix
+++ b/pkgs/development/libraries/atk/default.nix
@@ -18,13 +18,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = libintlOrEmpty;
 
-  nativeBuildInputs = [ pkgconfig perl ];
+  nativeBuildInputs = [ pkgconfig perl gobjectIntrospection ];
 
   propagatedBuildInputs = [
     # Required by atk.pc
     glib
-    # TODO: Why propagate?
-    gobjectIntrospection
   ];
 
   doCheck = true;
diff --git a/pkgs/development/libraries/boost/1.65.nix b/pkgs/development/libraries/boost/1.65.nix
index 56b136cd99b..427ef072ffe 100644
--- a/pkgs/development/libraries/boost/1.65.nix
+++ b/pkgs/development/libraries/boost/1.65.nix
@@ -9,6 +9,6 @@ callPackage ./generic.nix (args // rec {
     sha256 = "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81";
   };
 
-  enableNumpy = true;
+  enableNumpy = args.enableNumpy or true;
 
 })
diff --git a/pkgs/development/libraries/boost/1.66.nix b/pkgs/development/libraries/boost/1.66.nix
new file mode 100644
index 00000000000..a89ae84db38
--- /dev/null
+++ b/pkgs/development/libraries/boost/1.66.nix
@@ -0,0 +1,14 @@
+{ stdenv, callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.66_0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/boost/boost_1_66_0.tar.bz2";
+    # SHA256 from http://www.boost.org/users/history/version_1_66_0.html
+    sha256 = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9";
+  };
+
+  enableNumpy = args.enableNumpy or true;
+
+})
diff --git a/pkgs/development/libraries/cppdb/default.nix b/pkgs/development/libraries/cppdb/default.nix
index 72fa309b721..07c6e1490e7 100644
--- a/pkgs/development/libraries/cppdb/default.nix
+++ b/pkgs/development/libraries/cppdb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, sqlite, libmysql, postgresql, unixODBC }:
+{ stdenv, fetchurl, cmake, sqlite, mysql, postgresql, unixODBC }:
 
 stdenv.mkDerivation rec {
   name = "cppdb";
@@ -11,9 +11,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  buildInputs = [ cmake sqlite libmysql postgresql unixODBC ];
+  buildInputs = [ cmake sqlite mysql.connector-c postgresql unixODBC ];
 
   cmakeFlags = [ "--no-warn-unused-cli" ];
+  NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ];
 
   meta = with stdenv.lib; {
     homepage = http://cppcms.com/sql/cppdb/;
@@ -23,4 +24,3 @@ stdenv.mkDerivation rec {
     maintainers = [ maintainers.juliendehos ];
   };
 }
-
diff --git a/pkgs/development/libraries/csfml/default.nix b/pkgs/development/libraries/csfml/default.nix
new file mode 100644
index 00000000000..8f66b65e49a
--- /dev/null
+++ b/pkgs/development/libraries/csfml/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, cmake, sfml }:
+
+let
+  version = "2.4";
+in
+
+stdenv.mkDerivation {
+  name = "csfml-${version}";
+  src = fetchFromGitHub {
+    owner = "SFML";
+    repo  = "CSFML";
+    rev   = "b5facb85d13bff451a5fd2d088a97472a685576c";
+    sha256 = "1q716gd7c7jlxzwpq5z4rjj5lsrn71ql2djphccdf9jannllqizn";
+  };
+  buildInputs = [ cmake sfml ];
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${sfml}/share/SFML/cmake/Modules/" ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.sfml-dev.org/;
+    description = "Simple and fast multimedia library";
+    longDescription = ''
+      SFML is a simple, fast, cross-platform and object-oriented multimedia API.
+      It provides access to windowing, graphics, audio and network.
+      It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
+    '';
+    license = licenses.zlib;
+    maintainers = [ maintainers.jpdoyle ];
+
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix
index 61932b29e62..bb150da6799 100644
--- a/pkgs/development/libraries/dlib/default.nix
+++ b/pkgs/development/libraries/dlib/default.nix
@@ -3,14 +3,14 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "19.6";
+  version = "19.8";
   name = "dlib-${version}";
 
   src = fetchFromGitHub {
     owner = "davisking";
     repo = "dlib";
     rev ="v${version}";
-    sha256 = "1nlx4z53jnk7wysaxrzbyyqb65m45rw4g1fagazl2jvwh1qn49ds";
+    sha256 = "0ras4dl1ws9f9680bi8wg0mnbqvrpn0l2xl5lrvq3jvnijb3cz9i";
   };
 
   postPatch = ''
diff --git a/pkgs/development/libraries/fastpbkdf2/default.nix b/pkgs/development/libraries/fastpbkdf2/default.nix
new file mode 100644
index 00000000000..e781e2aab83
--- /dev/null
+++ b/pkgs/development/libraries/fastpbkdf2/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation {
+  name = "fastpbkdf2-1.0.0";
+  
+  src = fetchFromGitHub {
+    owner = "ctz";
+    repo = "fastpbkdf2";
+    rev = "v1.0.0";
+    sha256 = "09ax0h4ik3vhvp3s98lic93l3g9f4v1jkr5k6z4g1lvm7s3lrha2";
+  };
+  
+  buildInputs = [ openssl ];
+
+  preBuild = ''
+    makeFlagsArray=(CFLAGS="-std=c99 -O3 -g")
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{lib,include/fastpbkdf2}
+    cp *.a $out/lib
+    cp fastpbkdf2.h $out/include/fastpbkdf2
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A fast PBKDF2-HMAC-{SHA1,SHA256,SHA512} implementation in C";
+    homepage = https://github.com/ctz/fastpbkdf2;
+    license = licenses.cc0;
+    maintainers = with maintainers; [ ledif ];
+  };
+}
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index 984d3da8119..0f1637a87e9 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     "--with-poppler=${poppler.dev}" # optional
     "--with-libz=${zlib.dev}"       # optional
     "--with-pg=${postgresql}/bin/pg_config"
-    "--with-mysql=${mysql.lib.dev}/bin/mysql_config"
+    "--with-mysql=${mysql.connector-c or mysql}/bin/mysql_config"
     "--with-geotiff=${libgeotiff}"
     "--with-sqlite3=${sqlite.dev}"
     "--with-spatialite=${libspatialite}"
diff --git a/pkgs/development/libraries/gdal/gdal-1_11.nix b/pkgs/development/libraries/gdal/gdal-1_11.nix
index c9f0c076101..7a80ce7fdb6 100644
--- a/pkgs/development/libraries/gdal/gdal-1_11.nix
+++ b/pkgs/development/libraries/gdal/gdal-1_11.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, unzip, libjpeg, libtiff, zlib
-, postgresql, mysql, libgeotiff, python, pythonPackages, proj, geos, openssl
+, postgresql, mysql57, libgeotiff, python, pythonPackages, proj, geos, openssl
 , libpng }:
 
 stdenv.mkDerivation rec {
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
     "--with-libz=${zlib.dev}"       # optional
 
     "--with-pg=${postgresql}/bin/pg_config"
-    "--with-mysql=${mysql.lib.dev}/bin/mysql_config"
+    "--with-mysql=${mysql57.connector-c}/bin/mysql_config"
     "--with-geotiff=${libgeotiff}"
     "--with-python"               # optional
     "--with-static-proj4=${proj}" # optional
diff --git a/pkgs/development/libraries/gegl/3.0.nix b/pkgs/development/libraries/gegl/3.0.nix
index 60e43f838b7..158707557a5 100644
--- a/pkgs/development/libraries/gegl/3.0.nix
+++ b/pkgs/development/libraries/gegl/3.0.nix
@@ -20,10 +20,12 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   buildInputs = [
-    babl libpng cairo libjpeg librsvg pango gtk bzip2 json_glib
+    libpng cairo libjpeg librsvg pango gtk bzip2
     libraw libwebp gnome3.gexiv2
   ];
 
+  propagatedBuildInputs = [ glib json_glib babl ]; # for gegl-3.0.pc
+
   nativeBuildInputs = [ pkgconfig intltool which autoreconfHook ];
 
   meta = {
diff --git a/pkgs/development/libraries/glibc/2.26-75to115.diff.gz b/pkgs/development/libraries/glibc/2.26-75to115.diff.gz
new file mode 100644
index 00000000000..9bf1a4f7d39
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.26-75to115.diff.gz
Binary files differdiff --git a/pkgs/development/libraries/glibc/allow-kernel-2.6.32.patch b/pkgs/development/libraries/glibc/allow-kernel-2.6.32.patch
new file mode 100644
index 00000000000..ce18b874c42
--- /dev/null
+++ b/pkgs/development/libraries/glibc/allow-kernel-2.6.32.patch
@@ -0,0 +1,39 @@
+diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
+index cace758c01..38fe7fe0b0 100644
+--- a/sysdeps/unix/sysv/linux/configure
++++ b/sysdeps/unix/sysv/linux/configure
+@@ -69,7 +69,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
+ $as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
+ decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
+-abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
++abinum=`echo "2.6.32.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <linux/version.h>
+diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac
+index 13abda0a51..6abc12eaed 100644
+--- a/sysdeps/unix/sysv/linux/configure.ac
++++ b/sysdeps/unix/sysv/linux/configure.ac
+@@ -50,7 +50,7 @@ fi
+ AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
+ changequote(,)dnl
+ decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
+-abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
++abinum=`echo "2.6.32.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
+ changequote([,])dnl
+ AC_TRY_COMPILE([#include <linux/version.h>
+ #if LINUX_VERSION_CODE < $decnum
+diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
+index 823cd8224d..482caaeeec 100644
+--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
++++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
+@@ -39,7 +39,7 @@
+ 	  GLRO(dl_osversion) = version;					      \
+ 									      \
+ 	/* Now we can test with the required version.  */		      \
+-	if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION)   \
++	if (__LINUX_KERNEL_VERSION > 0 && version < __LINUX_KERNEL_VERSION && version != 0x020620)   \
+ 	  /* Not sufficent.  */						      \
+ 	  FATAL ("FATAL: kernel too old\n");				      \
+       }									      \
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index c5d8dbf9bcb..cfec3209b98 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -20,7 +20,7 @@
 
 let
   version = "2.26";
-  patchSuffix = "-75";
+  patchSuffix = "-115";
   sha256 = "1ggnj1hzjym7sn93rbwydcqd562q73lsb7g7kd199g6j9j9hlkp5";
   cross = if buildPlatform != hostPlatform then hostPlatform else null;
 in
@@ -47,6 +47,7 @@ stdenv.mkDerivation ({
           $ git show --reverse glibc-2.25..release/2.25/master | gzip -n -9 --rsyncable - > 2.25-49.patch.gz
       */
       ./2.26-75.patch.gz
+      ./2.26-75to115.diff.gz
 
       /* Have rpcgen(1) look for cpp(1) in $PATH.  */
       ./rpcgen-path.patch
@@ -64,6 +65,25 @@ stdenv.mkDerivation ({
          "/bin:/usr/bin", which is inappropriate on NixOS machines. This
          patch extends the search path by "/run/current-system/sw/bin". */
       ./fix_path_attribute_in_getconf.patch
+
+      /* Allow running with RHEL 6 -like kernels.  The patch adds an exception
+        for glibc to accept 2.6.32 and to tag the ELFs as 2.6.32-compatible
+        (otherwise the loader would refuse libc).
+        Note that glibc will fully work only on their heavily patched kernels
+        and we lose early mismatch detection on 2.6.32.
+
+        On major glibc updates we should check that the patched kernel supports
+        all the required features.  ATM it's verified up to glibc-2.26-115.
+        # HOWTO: check glibc sources for changes in kernel requirements
+        git log -p glibc-2.25.. sysdeps/unix/sysv/linux/x86_64/kernel-features.h sysdeps/unix/sysv/linux/kernel-features.h
+        # get kernel sources (update the URL)
+        mkdir tmp && cd tmp
+        curl http://vault.centos.org/6.9/os/Source/SPackages/kernel-2.6.32-696.el6.src.rpm | rpm2cpio - | cpio -idmv
+        tar xf linux-*.bz2
+        # check syscall presence, for example
+        less linux-*?/arch/x86/kernel/syscall_table_32.S
+       */
+      ./allow-kernel-2.6.32.patch
     ]
     ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch;
 
diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix
index 0841990fa95..904727ceae6 100644
--- a/pkgs/development/libraries/glm/default.nix
+++ b/pkgs/development/libraries/glm/default.nix
@@ -1,23 +1,28 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchzip, cmake }:
 
 stdenv.mkDerivation rec {
-  name = "glm-0.9.6.1";
+  version = "0.9.8.5";
+  name = "glm-${version}";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/project/ogl-math/${name}/${name}.zip";
-    sha256 = "1s1kpf9hpyq6bdf87nhlkxyr2ay0ip9wqicdma9h8yz4vs20r2hs";
+  src = fetchzip {
+    url = "https://github.com/g-truc/glm/releases/download/${version}/${name}.zip";
+    sha256 = "0dkfj4hin3am9fxgcvwr5gj0h9y52x7wa03lfwb3q0bvaj1rsly2";
   };
 
-  buildInputs = [ unzip ];
+  nativeBuildInputs = [ cmake ];
 
   outputs = [ "out" "doc" ];
 
-  installPhase = ''
-    mkdir -p "$out/include"
-    cp -r glm "$out/include"
+  cmakeConfigureFlags = [ "-DGLM_INSTALL_ENABLE=off" ];
 
-    mkdir -p "$doc/share/doc/glm"
-    cp -r doc/* "$doc/share/doc/glm"
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '"''${CMAKE_CURRENT_BINARY_DIR}/''${GLM_INSTALL_CONFIGDIR}' '"''${GLM_INSTALL_CONFIGDIR}'
+  '';
+
+  postInstall = ''
+    mkdir -p $doc/share/doc/glm
+    cp -rv $NIX_BUILD_TOP/$sourceRoot/doc/* $doc/share/doc/glm
   '';
 
   meta = with stdenv.lib; {
@@ -33,3 +38,4 @@ stdenv.mkDerivation rec {
     maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
   };
 }
+
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index 45222b7d7fc..169fd119d51 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg
-, gdk_pixbuf, libintlOrEmpty, xlibsWrapper
+, gdk_pixbuf, libintlOrEmpty, xlibsWrapper, gobjectIntrospection
 , xineramaSupport ? stdenv.isLinux
 , cupsSupport ? true, cups ? null
 , gdktarget ? "x11"
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   setupHook = ./setup-hook.sh;
 
-  nativeBuildInputs = [ setupHook perl pkgconfig gettext ];
+  nativeBuildInputs = [ setupHook perl pkgconfig gettext gobjectIntrospection ];
 
   patches = [ ./2.0-immodules.cache.patch ./gtk2-theme-paths.patch ];
 
diff --git a/pkgs/development/libraries/kdb/default.nix b/pkgs/development/libraries/kdb/default.nix
index 399d5914c2d..e85190cdfce 100644
--- a/pkgs/development/libraries/kdb/default.nix
+++ b/pkgs/development/libraries/kdb/default.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, fetchurl,
   extra-cmake-modules,
-  qtbase, qttranslations, kcoreaddons, python2, sqlite, postgresql, libmysql
+  qtbase, qttranslations, kcoreaddons, python2, sqlite, postgresql, mysql
 }:
 
 mkDerivation rec {
@@ -16,7 +16,7 @@ mkDerivation rec {
 
   nativeBuildInputs = [ extra-cmake-modules ];
 
-  buildInputs = [ qttranslations kcoreaddons python2 sqlite postgresql libmysql ];
+  buildInputs = [ qttranslations kcoreaddons python2 sqlite postgresql mysql.connector-c ];
 
   propagatedBuildInputs = [ qtbase ];
 
diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix
index 1e64a4d6600..101c3aca07d 100644
--- a/pkgs/development/libraries/kerberos/krb5.nix
+++ b/pkgs/development/libraries/kerberos/krb5.nix
@@ -19,10 +19,13 @@ stdenv.mkDerivation rec {
     sha256 = "0zn8s7anb10hw3nzwjz7vg10fgmmgvwnibn2zrn3nppjxn9f6f8n";
   };
 
+  outputs = [ "out" "dev" ];
+
   configureFlags = [ "--with-tcl=no" "--localstatedir=/var/lib"]
     ++ optional stdenv.isFreeBSD ''WARN_CFLAGS=""'';
 
-  nativeBuildInputs = [ pkgconfig perl yacc ]
+  nativeBuildInputs = [ pkgconfig perl ]
+    ++ optional (!libOnly) yacc
     # Provides the mig command used by the build scripts
     ++ optional stdenv.isDarwin bootstrap_cmds;
   buildInputs = [ openssl ]
@@ -31,20 +34,26 @@ stdenv.mkDerivation rec {
   preConfigure = "cd ./src";
 
   buildPhase = optionalString libOnly ''
-    (cd util; make -j $NIX_BUILD_CORES)
-    (cd include; make -j $NIX_BUILD_CORES)
-    (cd lib; make -j $NIX_BUILD_CORES)
-    (cd build-tools; make -j $NIX_BUILD_CORES)
+    MAKE="make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES"
+    (cd util; $MAKE)
+    (cd include; $MAKE)
+    (cd lib; $MAKE)
+    (cd build-tools; $MAKE)
   '';
 
   installPhase = optionalString libOnly ''
-    mkdir -p $out/{bin,include/{gssapi,gssrpc,kadm5,krb5},lib/pkgconfig,sbin,share/{et,man/man1}}
-    (cd util; make -j $NIX_BUILD_CORES install)
-    (cd include; make -j $NIX_BUILD_CORES install)
-    (cd lib; make -j $NIX_BUILD_CORES install)
-    (cd build-tools; make -j $NIX_BUILD_CORES install)
-    rm -rf $out/{sbin,share}
-    find $out/bin -type f | grep -v 'krb5-config' | xargs rm
+    mkdir -p "$out"/{bin,sbin,lib/pkgconfig,share/{et,man/man1}} \
+      "$dev"/include/{gssapi,gssrpc,kadm5,krb5}
+    (cd util; $MAKE install)
+    (cd include; $MAKE install)
+    (cd lib; $MAKE install)
+    (cd build-tools; $MAKE install)
+    ${postInstall}
+  '';
+
+  # not via outputBin, due to reference from libkrb5.so
+  postInstall = ''
+    moveToOutput bin "$dev"
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/libagar/default.nix b/pkgs/development/libraries/libagar/default.nix
index 1c9e8eca0d5..ee984a53b4c 100644
--- a/pkgs/development/libraries/libagar/default.nix
+++ b/pkgs/development/libraries/libagar/default.nix
@@ -20,15 +20,16 @@ stdenv.mkDerivation rec {
     "--with-gettext=${gettext}"
     "--with-jpeg=${libjpeg.dev}"
     "--with-gl=${mesa}"
-    "--with-mysql=yes"
+    "--with-mysql=${mysql.connector-c}"
     "--with-manpages=yes"
   ];
 
   outputs = [ "out" "devdoc" ];
 
   nativeBuildInputs = [ pkgconfig libtool gettext ];
+
   buildInputs = [
-    bsdbuild perl xlibsWrapper libXinerama SDL mesa  mysql.client mandoc
+    bsdbuild perl xlibsWrapper libXinerama SDL mesa mysql.connector-c mandoc
     freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
   ];
 
diff --git a/pkgs/development/libraries/libappindicator/default.nix b/pkgs/development/libraries/libappindicator/default.nix
index 3a26dd407e4..7ebd14b51f5 100644
--- a/pkgs/development/libraries/libappindicator/default.nix
+++ b/pkgs/development/libraries/libappindicator/default.nix
@@ -5,7 +5,7 @@
 , glib, dbus_glib, gtkVersion
 , gtk2 ? null, libindicator-gtk2 ? null, libdbusmenu-gtk2 ? null
 , gtk3 ? null, libindicator-gtk3 ? null, libdbusmenu-gtk3 ? null
-, python2Packages, gobjectIntrospection, vala_0_23
+, python2Packages, gobjectIntrospection, vala
 , monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
  }:
 
@@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
 
   buildInputs = [
     glib dbus_glib
-    python pygobject2 pygtk gobjectIntrospection vala_0_23
+    python pygobject2 pygtk gobjectIntrospection vala
   ] ++ (if gtkVersion == "2"
     then [ libindicator-gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
     else [ libindicator-gtk3 ]);
diff --git a/pkgs/development/libraries/libassuan/default.nix b/pkgs/development/libraries/libassuan/default.nix
index bad2a060cdc..94369449ff3 100644
--- a/pkgs/development/libraries/libassuan/default.nix
+++ b/pkgs/development/libraries/libassuan/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, pth, libgpgerror }:
 
 stdenv.mkDerivation rec {
-  name = "libassuan-2.4.3";
+  name = "libassuan-2.5.1";
 
   src = fetchurl {
     url = "mirror://gnupg/libassuan/${name}.tar.bz2";
-    sha256 = "0w9bmasln4z8mn16s1is55a06w3nv8jbyal496z5jvr5vcxkm112";
+    sha256 = "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7";
   };
 
   outputs = [ "out" "dev" "info" ];
diff --git a/pkgs/development/libraries/libcollectdclient/default.nix b/pkgs/development/libraries/libcollectdclient/default.nix
index f6d9d7ca69b..e4e61c94283 100644
--- a/pkgs/development/libraries/libcollectdclient/default.nix
+++ b/pkgs/development/libraries/libcollectdclient/default.nix
@@ -5,14 +5,17 @@ overrideDerivation collectd (oldAttrs: {
   name = "libcollectdclient-${collectd.version}";
   buildInputs = [ ];
 
-  configureFlags = [
-    "--without-daemon"
+  NIX_CFLAGS_COMPILE = oldAttrs.NIX_CFLAGS_COMPILE ++ [
+    "-Wno-error=unused-function"
   ];
 
-  makeFlags = [
-    "-C src/libcollectdclient/"
+  configureFlags = oldAttrs.configureFlags ++ [
+    "--disable-daemon"
+    "--disable-all-plugins"
   ];
 
+  postInstall = "rm -rf $out/{bin,etc,sbin,share}";
+
 }) // {
   meta = with stdenv.lib; {
     description = "C Library for collectd, a daemon which collects system performance statistics periodically";
diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix
index 77c09f3ed15..2a03efd632f 100644
--- a/pkgs/development/libraries/libdbi-drivers/default.nix
+++ b/pkgs/development/libraries/libdbi-drivers/default.nix
@@ -1,5 +1,7 @@
 { stdenv, fetchurl, libdbi
-, libmysql ? null, sqlite ? null, postgresql ? null
+, mysql ? null
+, sqlite ? null
+, postgresql ? null
 }:
 
 with stdenv.lib;
@@ -11,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3";
   };
 
-  buildInputs = [ libdbi libmysql sqlite postgresql ];
+  buildInputs = [ libdbi sqlite postgresql ] ++ optional (mysql != null) mysql.connector-c;
 
   postPatch = ''
     sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
@@ -24,16 +26,18 @@ stdenv.mkDerivation rec {
     "--enable-libdbi"
     "--with-dbi-incdir=${libdbi}/include"
     "--with-dbi-libdir=${libdbi}/lib"
-  ] ++ optionals (libmysql != null) [
+  ] ++ optionals (mysql != null) [
     "--with-mysql"
-  ] ++ optionals (postgresql != null) [
-    "--with-pgsql"
-    "--with-pgsql_incdir=${postgresql}/include"
-    "--with-pgsql_libdir=${postgresql.lib}/lib"
+    "--with-mysql-incdir=${mysql.connector-c}/include/mysql"
+    "--with-mysql-libdir=${mysql.connector-c}/lib/mysql"
   ] ++ optionals (sqlite != null) [
     "--with-sqlite3"
     "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
     "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
+  ] ++ optionals (postgresql != null) [
+    "--with-pgsql"
+    "--with-pgsql_incdir=${postgresql}/include"
+    "--with-pgsql_libdir=${postgresql.lib}/lib"
   ];
 
   installFlags = [ "DESTDIR=\${out}" ];
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index 533d5d4cac8..e5e1e2e7a39 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind-light }:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.88";
+  name = "libdrm-2.4.89";
 
   src = fetchurl {
     url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "b5e55dbac2124e742e639f5b8553e8b7395863bf73dab4f77e99fe2fc25572b5";
+    sha256 = "629f9782aabbb4809166de5f24d26fe0766055255038f16935602d89f136a02e";
   };
 
   outputs = [ "out" "dev" "bin" ];
diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix
index e32ba050c38..397000fc7d2 100644
--- a/pkgs/development/libraries/libgcrypt/default.nix
+++ b/pkgs/development/libraries/libgcrypt/default.nix
@@ -4,11 +4,11 @@ assert enableCapabilities -> stdenv.isLinux;
 
 stdenv.mkDerivation rec {
   name = "libgcrypt-${version}";
-  version = "1.8.1";
+  version = "1.8.2";
 
   src = fetchurl {
     url = "mirror://gnupg/libgcrypt/${name}.tar.bz2";
-    sha256 = "1cvqd9jk5qshbh48yh3ixw4zyr4n5k50r3475rrh20xfn7w7aa3s";
+    sha256 = "01sca9m8hm6b5v8hmqsfdjhyz013869p1f0fxw9ln52qfnp4q1n8";
   };
 
   outputs = [ "out" "dev" "info" ];
diff --git a/pkgs/development/libraries/libhttpseverywhere/default.nix b/pkgs/development/libraries/libhttpseverywhere/default.nix
index 88a3ebbc4fb..c3405148242 100644
--- a/pkgs/development/libraries/libhttpseverywhere/default.nix
+++ b/pkgs/development/libraries/libhttpseverywhere/default.nix
@@ -1,7 +1,8 @@
-{stdenv, fetchurl, gnome3, glib, json_glib, libxml2, libarchive, libsoup, gobjectIntrospection, meson, ninja, pkgconfig,  valadoc}:
+{ stdenv, fetchurl, pkgconfig, meson, ninja, valadoc
+, gnome3, glib, json_glib, libarchive, libsoup, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
-  major = "0.4";
+  major = "0.6";
   minor = "5";
   version = "${major}.${minor}";
 
@@ -9,16 +10,20 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/libhttpseverywhere/${major}/libhttpseverywhere-${version}.tar.xz";
-    sha256 = "07sgcw285rl9wqr5k7srs3fj7fhgrrw6w780jx8wy8jw2bfwlvj2";
+    sha256 = "0ksf6vqjyjii29dvy5147dmgqlqsq4d70xxai0p2prkx4jrwgj3z";
   };
 
-  nativeBuildInputs = [ gnome3.vala valadoc  gobjectIntrospection meson ninja pkgconfig ];
-  buildInputs = [ glib gnome3.libgee libxml2 json_glib libsoup libarchive ];
+  nativeBuildInputs = [ gnome3.vala gobjectIntrospection meson ninja pkgconfig valadoc ];
+  buildInputs = [ glib gnome3.libgee json_glib libsoup libarchive ];
+
+  mesonFlags = "-Denable_valadoc=true";
 
   doCheck = true;
 
   checkPhase = "./httpseverywhere_test";
 
+  outputs = [ "out" "devdoc" ];
+
   meta = {
     description = "library to use HTTPSEverywhere in desktop applications";
     homepage    = https://git.gnome.org/browse/libhttpseverywhere;
diff --git a/pkgs/development/libraries/libindicate/default.nix b/pkgs/development/libraries/libindicate/default.nix
index 9f75f17caee..9c7e48f8f6a 100644
--- a/pkgs/development/libraries/libindicate/default.nix
+++ b/pkgs/development/libraries/libindicate/default.nix
@@ -4,7 +4,7 @@
 , pkgconfig, autoconf
 , glib, dbus_glib, libdbusmenu-glib
 , gtkVersion, gtk2 ? null, gtk3 ? null
-, pythonPackages, gobjectIntrospection, vala_0_23, gnome_doc_utils
+, pythonPackages, gobjectIntrospection, vala, gnome_doc_utils
 , monoSupport ? false, mono ? null, gtk-sharp-2_0 ? null
  }:
 
@@ -24,11 +24,11 @@ in stdenv.mkDerivation rec {
     sha256 = "10am0ymajx633b33anf6b79j37k61z30v9vaf5f9fwk1x5cw1q21";
   };
 
-  nativeBuildInputs = [ pkgconfig autoconf ];
+  nativeBuildInputs = [ pkgconfig autoconf gobjectIntrospection vala gnome_doc_utils ];
 
   buildInputs = [
     glib dbus_glib libdbusmenu-glib
-    python pygobject2 pygtk gobjectIntrospection vala_0_23 gnome_doc_utils
+    python pygobject2 pygtk
   ] ++ (if gtkVersion == "2"
     then [ gtk2 ] ++ optionals monoSupport [ mono gtk-sharp-2_0 ]
     else [ gtk3 ]);
diff --git a/pkgs/development/libraries/liblcf/default.nix b/pkgs/development/libraries/liblcf/default.nix
new file mode 100644
index 00000000000..95b6b657fa2
--- /dev/null
+++ b/pkgs/development/libraries/liblcf/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, expat, icu }:
+
+stdenv.mkDerivation rec {
+  name = "liblcf-${version}";
+  version = "0.5.3";
+
+  src = fetchFromGitHub {
+    owner = "EasyRPG";
+    repo = "liblcf";
+    rev = version;
+    sha256 = "1y3pbl3jxan9f0cb1rxkibqjc0h23jm3jlwlv0xxn2pgw8l0fk34";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ expat icu ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/EasyRPG/liblcf;
+    license = licenses.mit;
+    maintainers = with maintainers; [ yegortimoshenko ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
new file mode 100644
index 00000000000..d3ddb99adad
--- /dev/null
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -0,0 +1,57 @@
+{ fetchFromGitHub, stdenv, autoreconfHook, pkgconfig, gettext, python3
+, texinfo, help2man, libyaml, perl
+}:
+
+let
+  version = "3.4.0";
+in stdenv.mkDerivation rec {
+  name = "liblouis-${version}";
+
+  src = fetchFromGitHub {
+    owner = "liblouis";
+    repo = "liblouis";
+    rev = "v${version}";
+    sha256 = "1b3vf6sq2iffdvj0r2q5g5k198camy3sq2nwfz391brpwivsnayh";
+  };
+
+  outputs = [ "out" "dev" "man" "info" "doc" ];
+
+  nativeBuildInputs = [
+    autoreconfHook pkgconfig gettext python3
+    # Docs, man, info
+    texinfo help2man
+  ];
+
+  buildInputs = [
+    # lou_checkYaml
+    libyaml
+    # maketable.d
+    perl
+  ];
+
+  configureFlags = [
+    # Required by Python bindings
+    "--enable-ucs4"
+  ];
+
+  postPatch = ''
+    patchShebangs tests
+    substituteInPlace python/louis/__init__.py.in --replace "###LIBLOUIS_SONAME###" "$out/lib/liblouis.so"
+  '';
+
+  postInstall = ''
+    pushd python
+    python setup.py install --prefix="$out" --optimize=1
+    popd
+  '';
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Open-source braille translator and back-translator";
+    homepage = http://liblouis.org/;
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/libraries/libmypaint/default.nix b/pkgs/development/libraries/libmypaint/default.nix
new file mode 100644
index 00000000000..0583d94ef7f
--- /dev/null
+++ b/pkgs/development/libraries/libmypaint/default.nix
@@ -0,0 +1,32 @@
+{stdenv, autoconf, automake, fetchFromGitHub, glib, intltool, json_c, libtool, pkgconfig}:
+
+let
+  version = "1.3.0";
+in stdenv.mkDerivation rec {
+  name = "libmypaint-${version}";
+
+  src = fetchFromGitHub {
+    owner = "mypaint";
+    repo = "libmypaint";
+    rev = "v${version}";
+    sha256 = "0b7aynr6ggigwhjkfzi8x3dwz15blj4grkg9hysbgjh6lvzpy9jc";
+  };
+
+  nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig ];
+
+  buildInputs = [ glib ];
+
+  propagatedBuildInputs = [ json_c ]; # for libmypaint.pc
+
+  doCheck = true;
+
+  preConfigure = "./autogen.sh";
+
+  meta = with stdenv.lib; {
+    homepage = http://mypaint.org/;
+    description = "Library for making brushstrokes which is used by MyPaint and other projects";
+    license = licenses.isc;
+    maintainers = with maintainers; [ goibhniu jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/libraries/libnftnl/default.nix b/pkgs/development/libraries/libnftnl/default.nix
index 074c1a9dfd2..060f5ba4934 100644
--- a/pkgs/development/libraries/libnftnl/default.nix
+++ b/pkgs/development/libraries/libnftnl/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libmnl }:
 
 stdenv.mkDerivation rec {
-  name = "libnftnl-1.0.7";
+  name = "libnftnl-1.0.8";
 
   src = fetchurl {
     url = "http://netfilter.org/projects/libnftnl/files/${name}.tar.bz2";
-    sha256 = "10irjrylcfkbp11617yr19vpfhgl54w0kw02jhj0i1abqv5nxdlv";
+    sha256 = "0f10cfiyl4c0f8k3brxfrw28x7a6qvrakaslg4jgqncwxycxggg6";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/libosinfo/default.nix b/pkgs/development/libraries/libosinfo/default.nix
index db534d20c89..a0924e791e3 100644
--- a/pkgs/development/libraries/libosinfo/default.nix
+++ b/pkgs/development/libraries/libosinfo/default.nix
@@ -1,23 +1,43 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gobjectIntrospection, libsoup
-, libxslt, check, vala_0_23 ? null
+{ stdenv, fetchurl, pkgconfig, intltool, gobjectIntrospection, gtk_doc, docbook_xsl
+, glib, libsoup, libxml2, libxslt, check, curl, perl, hwdata, osinfo-db, vala ? null
 }:
 
 stdenv.mkDerivation rec {
-  name = "libosinfo-0.2.12";
+  name = "libosinfo-1.1.0";
 
   src = fetchurl {
-    url = "https://fedorahosted.org/releases/l/i/libosinfo/${name}.tar.gz";
-    sha256 = "1vcg8ylh7q69s9y6hj94dqfffwfbann3i28yqgfc01navf6yl07s";
+    url = "https://releases.pagure.org/libosinfo/${name}.tar.gz";
+    sha256 = "0diigllgni6m0sc2h8aid6hmyaq9qb54pm5305m0irfsm2j463v0";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [
-    intltool gobjectIntrospection libsoup libxslt check vala_0_23
+  outputs = [ "out" "dev" "devdoc" ];
+
+  nativeBuildInputs = [
+    pkgconfig vala intltool gobjectIntrospection gtk_doc docbook_xsl
+  ] ++ stdenv.lib.optionals doCheck checkInputs;
+  checkInputs = [ check curl perl ];
+  buildInputs = [ glib libsoup libxml2 libxslt ];
+
+  patches = [
+    ./osinfo-db-data-dir.patch
+  ];
+
+  postPatch = ''
+    patchShebangs .
+    substituteInPlace osinfo/osinfo_loader.c --subst-var-by OSINFO_DB_DATA_DIR "${osinfo-db}/share"
+  '';
+
+  configureFlags = [
+    "--with-usb-ids-path=${hwdata}/data/hwdata/usb.ids"
+    "--with-pci-ids-path=${hwdata}/data/hwdata/pci.ids"
+    "--enable-gtk-doc"
   ];
 
+  doCheck = true;
+
   meta = with stdenv.lib; {
-    description = "Info about OSs, hypervisors and (virtual) hardware devices";
-    homepage = http://libosinfo.org/;
+    description = "GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support";
+    homepage = https://libosinfo.org/;
     license = licenses.lgpl2Plus;
     platforms = platforms.linux;
     maintainers = [ maintainers.bjornfor ];
diff --git a/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch b/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch
new file mode 100644
index 00000000000..8d202a92d09
--- /dev/null
+++ b/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch
@@ -0,0 +1,11 @@
+--- a/osinfo/osinfo_loader.c
++++ b/osinfo/osinfo_loader.c
+@@ -2304,7 +2304,7 @@
+     } else {
+         path = g_getenv("OSINFO_SYSTEM_DIR");
+         if (!path)
+-            path = DATA_DIR "/osinfo";
++            path = "@OSINFO_DB_DATA_DIR@/osinfo";
+ 
+         file = g_file_new_for_path(path);
+     }
diff --git a/pkgs/development/libraries/librdf/redland.nix b/pkgs/development/libraries/librdf/redland.nix
index 8e6fa005635..402af5d6f58 100644
--- a/pkgs/development/libraries/librdf/redland.nix
+++ b/pkgs/development/libraries/librdf/redland.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ perl pkgconfig ];
 
   buildInputs = [ openssl libxslt curl pcre libxml2 ]
-    ++ stdenv.lib.optional withMysql mysql
+    ++ stdenv.lib.optional withMysql mysql.connector-c
     ++ stdenv.lib.optional withSqlite sqlite
     ++ stdenv.lib.optional withPostgresql postgresql
     ++ stdenv.lib.optional withBdb db;
diff --git a/pkgs/development/libraries/libskk/default.nix b/pkgs/development/libraries/libskk/default.nix
index fc5b41ac607..5e36d068869 100644
--- a/pkgs/development/libraries/libskk/default.nix
+++ b/pkgs/development/libraries/libskk/default.nix
@@ -1,22 +1,22 @@
 { stdenv, fetchurl, fetchFromGitHub,
-  libtool, intltool, pkgconfig,
+  libtool, gettext, pkgconfig,
   vala, gnome_common, gobjectIntrospection,
-  libgee_0_8, json_glib, skk-dicts }:
+  libgee, json_glib, skk-dicts }:
 
 stdenv.mkDerivation rec {
   name = "libskk-${version}";
-  version = "1.0.2";
+  version = "1.0.3";
 
   src = fetchFromGitHub {
     owner = "ueno";
     repo = "libskk";
-    rev = "6a232e75de6d5dbe543ab17c9b85dc7560093509";
-    sha256 = "1xa9akf95jyi4laiw1llnjdpfq5skhidm7dnkd0i0ds6npzzqnxc";
+    rev = version;
+    sha256 = "092bjir866f350s4prq9q0yg34s91vmr8wbgf2vh3kcax1yj1axm";
   };
 
   buildInputs = [ skk-dicts ];
-  nativeBuildInputs = [ vala gnome_common gobjectIntrospection libtool intltool pkgconfig ];
-  propagatedBuildInputs = [ libgee_0_8 json_glib ];
+  nativeBuildInputs = [ vala gnome_common gobjectIntrospection libtool gettext pkgconfig ];
+  propagatedBuildInputs = [ libgee json_glib ];
 
   preConfigure = ''
     ./autogen.sh
diff --git a/pkgs/development/libraries/libsoundio/default.nix b/pkgs/development/libraries/libsoundio/default.nix
index 18d18941b88..7803b2a5ff1 100644
--- a/pkgs/development/libraries/libsoundio/default.nix
+++ b/pkgs/development/libraries/libsoundio/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, alsaLib, libjack2, libpulseaudio }:
+{ stdenv, fetchFromGitHub, cmake, alsaLib, libjack2, libpulseaudio, AudioUnit }:
 
 stdenv.mkDerivation rec {
   version = "1.1.0";
@@ -11,7 +11,13 @@ stdenv.mkDerivation rec {
     sha256 = "0mw197l4bci1cjc2z877gxwsvk8r43dr7qiwci2hwl2cjlcnqr2p";
   };
 
-  buildInputs = [ cmake alsaLib libjack2 libpulseaudio ];
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libjack2 libpulseaudio ]
+    ++ stdenv.lib.optional stdenv.isLinux alsaLib
+    ++ stdenv.lib.optional stdenv.isDarwin AudioUnit;
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
 
   meta = with stdenv.lib; {
     description = "Cross platform audio input and output";
diff --git a/pkgs/development/libraries/libtoxcore/old-api.nix b/pkgs/development/libraries/libtoxcore/old-api.nix
deleted file mode 100644
index 5757e94559a..00000000000
--- a/pkgs/development/libraries/libtoxcore/old-api.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, libsodium, ncurses, libopus
-, libvpx, check, libconfig, pkgconfig }:
-
-let
-  version = "4c220e336330213b151a0c20307d0a1fce04ac9e";
-  date = "20150126";
-
-in stdenv.mkDerivation rec {
-  name = "tox-core-old-${date}-${builtins.substring 0 7 version}";
-
-  src = fetchFromGitHub {
-    owner  = "irungentoo";
-    repo   = "toxcore";
-    rev    = version;
-    sha256 = "152yamak9ykl8dgkx1qzyrpa3f4xr1s8lgcb5k58r9lb1iwnhvqc";
-  };
-
-  NIX_LDFLAGS = "-lgcc_s";
-
-  postPatch = ''
-    # within Nix chroot builds, localhost is unresolvable
-    sed -i -e '/DEFTESTCASE(addr_resolv_localhost)/d' \
-      auto_tests/network_test.c
-    # takes WAAAY too long (~10 minutes) and would timeout
-    sed -i -e '/DEFTESTCASE[^(]*(many_clients\>/d' \
-      auto_tests/tox_test.c
-  '';
-
-  configureFlags = [
-    "--with-libsodium-headers=${libsodium.dev}/include"
-    "--with-libsodium-libs=${libsodium.out}/lib"
-    "--enable-ntox"
-    "--enable-daemon"
-  ];
-
-  buildInputs = [
-    autoreconfHook libsodium ncurses
-    check libconfig pkgconfig
-  ] ++ stdenv.lib.optionals (!stdenv.isArm) [
-    libopus
-  ];
-
-  propagatedBuildInputs = stdenv.lib.optionals (!stdenv.isArm) [ libvpx ];
-
-  # Some tests fail randomly due to timeout. This kind of problem is well known
-  # by upstream: https://github.com/irungentoo/toxcore/issues/{950,1054}
-  # They don't recommend running tests on 50core machines with other cpu-bound
-  # tests running in parallel.
-  #
-  # NOTE: run the tests locally on your machine before upgrading this package!
-  doCheck = false;
-
-  meta = with stdenv.lib; {
-    description = "P2P FOSS instant messaging application aimed to replace Skype with crypto";
-    license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ viric jgeerds ];
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/libunity/default.nix b/pkgs/development/libraries/libunity/default.nix
deleted file mode 100644
index 66890f08ff3..00000000000
--- a/pkgs/development/libraries/libunity/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, vala_0_23, python, intltool, pkgconfig
-, glib, libgee_0_6, gtk3, dee, libdbusmenu-glib
-}:
-
-stdenv.mkDerivation rec {
-  name = "libunity-${version}";
-  version = "6.12.0";
-
-  src = fetchurl {
-    url = "https://launchpad.net/libunity/6.0/${version}/+download/${name}.tar.gz";
-    sha256 = "1nadapl3390x98q1wv2yarh60hzi7ck0d1s8zz9xsiq3zz6msbjd";
-  };
-
-  buildInputs = [ glib libgee_0_6 gtk3 ];
-  propagatedBuildInputs = [ dee libdbusmenu-glib ];
-  nativeBuildInputs = [ vala_0_23 python intltool pkgconfig ];
-
-  enableParallelBuilding = true;
-
-  meta = with stdenv.lib; {
-    description = "A library for instrumenting- and integrating with all aspects of the Unity shell";
-    homepage = https://launchpad.net/libunity;
-    license = licenses.lgpl3;
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ abbradar ];
-  };
-}
diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix
index 75458850416..2dbf80e71f7 100644
--- a/pkgs/development/libraries/libvirt/default.nix
+++ b/pkgs/development/libraries/libvirt/default.nix
@@ -4,7 +4,7 @@
 , iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext
 , libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor
 , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
-, curl, libiconv, gmp, xen, zfs, parted, qemu
+, curl, libiconv, gmp, xen, zfs, parted
 }:
 
 with stdenv.lib;
@@ -41,8 +41,6 @@ stdenv.mkDerivation rec {
 
     # the path to qemu-kvm will be stored in VM's .xml and .save files
     # do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations
-    substituteInPlace src/qemu/qemu_capabilities.c \
-      --replace '"/usr/libexec/qemu-kvm"' '"/run/libvirt/nix-emulators/${if stdenv.isAarch64 then "qemu-system-aarch64" else "qemu-kvm"}"'
     substituteInPlace src/lxc/lxc_conf.c \
       --replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
   '' + ''
@@ -91,7 +89,7 @@ stdenv.mkDerivation rec {
     substituteInPlace $out/lib/systemd/system/libvirtd.service --replace /bin/kill ${coreutils}/bin/kill
     rm $out/lib/systemd/system/{virtlockd,virtlogd}.*
     wrapProgram $out/sbin/libvirtd \
-      --prefix PATH : ${makeBinPath [ iptables iproute pmutils numad numactl qemu ]}
+      --prefix PATH : /run/libvirt/nix-emulators:${makeBinPath [ iptables iproute pmutils numad numactl ]}
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index fca99550a3c..4c00df4c17d 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -66,7 +66,7 @@ let
 in
 
 let
-  version = "17.2.7";
+  version = "17.2.8";
   branch  = head (splitString "." version);
   driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
 in
@@ -81,7 +81,7 @@ stdenv.mkDerivation {
       "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
       "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
     ];
-    sha256 = "0s3slgjxnx482yw0knn4a6alsy2cq28rah6hnjbmf12mvyldxksh";
+    sha256 = "0pq9kmmyllgd63d936f3x1zsg7sqaswx47khbn0gvbgari2h753f";
   };
 
   prePatch = "patchShebangs .";
diff --git a/pkgs/development/libraries/mongoc/default.nix b/pkgs/development/libraries/mongoc/default.nix
index 4cba89d9206..2a933ef7840 100644
--- a/pkgs/development/libraries/mongoc/default.nix
+++ b/pkgs/development/libraries/mongoc/default.nix
@@ -12,8 +12,10 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig which perl ];
-  buildInputs = [ openssl zlib snappy ];
-  propagatedBuildInputs = [ libbson ];
+  buildInputs = [ openssl zlib ];
+  propagatedBuildInputs = [ libbson snappy ];
+
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     description = "The official C client library for MongoDB";
diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix
index 37afa3fd507..48ec5141e34 100644
--- a/pkgs/development/libraries/opendbx/default.nix
+++ b/pkgs/development/libraries/opendbx/default.nix
@@ -12,10 +12,10 @@ stdenv.mkDerivation rec {
   };
 
   preConfigure = ''
-    export CPPFLAGS="-I${getDev mysql.client}/include/mysql"
-    export LDFLAGS="-L${getLib mysql.client}/lib/mysql -L${getLib postgresql}/lib"
+    export CPPFLAGS="-I${mysql.connector-c}/include/mysql"
+    export LDFLAGS="-L${mysql.connector-c}/lib/mysql -L${postgresql}/lib"
     configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
   '';
 
-  buildInputs = [ readline mysql.client postgresql sqlite ];
+  buildInputs = [ readline mysql.connector-c postgresql sqlite ];
 }
diff --git a/pkgs/development/libraries/openwsman/default.nix b/pkgs/development/libraries/openwsman/default.nix
index b179ca8803c..1aa0f268457 100644
--- a/pkgs/development/libraries/openwsman/default.nix
+++ b/pkgs/development/libraries/openwsman/default.nix
@@ -1,16 +1,20 @@
-{ fetchurl, stdenv, autoconf, automake, libtool, pkgconfig, libxml2, curl, cmake, pam, sblim-sfcc }:
+{ stdenv, fetchFromGitHub, cmake, pkgconfig
+, curl, libxml2, pam, sblim-sfcc }:
 
 stdenv.mkDerivation rec {
-  version = "2.6.0";
   name = "openwsman-${version}";
+  version = "2.6.5";
 
-  src = fetchurl {
-    url = "https://github.com/Openwsman/openwsman/archive/v${version}.tar.gz";
-    sha256 = "0gw2dsjxzpchg3s85kplwgp9xhd9l7q4fh37iy7r203pvir4k6s4";
+  src = fetchFromGitHub {
+    owner  = "Openwsman";
+    repo   = "openwsman";
+    rev    = "v${version}";
+    sha256 = "1r0zslgpcr4m20car4s3hsccy10xcb39qhpw3dhpjv42xsvvs5xv";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf automake libtool libxml2 curl cmake pam sblim-sfcc ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ curl libxml2 pam sblim-sfcc ];
 
   cmakeFlags = [
     "-DCMAKE_BUILD_RUBY_GEM=no"
@@ -22,18 +26,13 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--disable-more-warnings";
 
-  meta = {
-    description = "Openwsman server implementation and client api with bindings";
-
-    homepage = https://github.com/Openwsman/openwsman;
-    downloadPage = "https://github.com/Openwsman/openwsman/releases";
-
-    maintainers = [ stdenv.lib.maintainers.deepfire ];
-
-    license = stdenv.lib.licenses.bsd3;
-
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
-
+  meta = with stdenv.lib; {
+    description  = "Openwsman server implementation and client API with bindings";
+    downloadPage = https://github.com/Openwsman/openwsman/releases;
+    homepage     = https://openwsman.github.io;
+    license      = licenses.bsd3;
+    maintainers  = with maintainers; [ deepfire ];
+    platforms    = platforms.linux; # PAM is not available on Darwin
     inherit version;
   };
 }
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index e6055151301..b34c9ff31f2 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -33,6 +33,9 @@ in stdenv.mkDerivation rec {
 
   buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads;
 
+  # https://bugs.exim.org/show_bug.cgi?id=2173
+  patches = [ ./stacksize-detection.patch ];
+
   doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform;
     # XXX: test failure on Cygwin
     # we are running out of stack on both freeBSDs on Hydra
diff --git a/pkgs/development/libraries/pcre/stacksize-detection.patch b/pkgs/development/libraries/pcre/stacksize-detection.patch
new file mode 100644
index 00000000000..4bc97069b1e
--- /dev/null
+++ b/pkgs/development/libraries/pcre/stacksize-detection.patch
@@ -0,0 +1,16 @@
+diff --git a/pcre_exec.c b/pcre_exec.c
+--- a/pcre_exec.c
++++ b/pcre_exec.c
+@@ -509,6 +509,12 @@
+                  (e.g. stopped by repeated call or recursion limit)
+ */
+ 
++#ifdef __GNUC__
++static int
++match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
++  PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
++  unsigned int rdepth) __attribute__((noinline,noclone));
++#endif
+ static int
+ match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+   PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
diff --git a/pkgs/development/libraries/physics/lhapdf/default.nix b/pkgs/development/libraries/physics/lhapdf/default.nix
index 1a203172d2c..93e0fa99c34 100644
--- a/pkgs/development/libraries/physics/lhapdf/default.nix
+++ b/pkgs/development/libraries/physics/lhapdf/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "lhapdf-${version}";
-  version = "6.2.0";
+  version = "6.2.1";
 
   src = fetchurl {
     url = "http://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
-    sha256 = "0gfjps7v93n0rrdndkhp22d93y892bf76pnzdhqbish0cigkkxph";
+    sha256 = "0bi02xcmq5as0wf0jn6i3hx0qy0hj61m02sbrbzd1gwjhpccwmvd";
   };
 
   buildInputs = [ python2 ];
diff --git a/pkgs/development/libraries/physics/rivet/default.nix b/pkgs/development/libraries/physics/rivet/default.nix
index 3e80e575852..5d533d4250a 100644
--- a/pkgs/development/libraries/physics/rivet/default.nix
+++ b/pkgs/development/libraries/physics/rivet/default.nix
@@ -2,15 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "rivet-${version}";
-  version = "2.5.4";
+  version = "2.6.0";
 
   src = fetchurl {
     url = "http://www.hepforge.org/archive/rivet/Rivet-${version}.tar.bz2";
-    sha256 = "1qi7am60f2l4krd3sbj95mbzfk82lir0wy8z27yr9ncq6qcm48kp";
+    sha256 = "1mvsa3v8d1pl2fj1dcdf8sikzm1yb2jcl0q34fyfsjw2cisxpv5f";
   };
 
-  postPatch = "patchShebangs ./src/Analyses/cat_with_lines";
-
   patches = [
     ./darwin.patch # configure relies on impure sw_vers to -Dunix
   ];
@@ -29,6 +27,13 @@ stdenv.mkDerivation rec {
   buildInputs = [ hepmc imagemagick python2 latex makeWrapper ];
   propagatedBuildInputs = [ fastjet ghostscript gsl yoda ];
 
+  preConfigure = ''
+    substituteInPlace bin/rivet-buildplugin.in \
+      --replace '"which"' '"${which}/bin/which"' \
+      --replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"}  #' \
+      --replace 'mycxxflags="' "mycxxflags=\"-std=c++11 $NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
+  '';
+
   preInstall = ''
     substituteInPlace bin/make-plots \
       --replace '"which"' '"${which}/bin/which"' \
@@ -40,10 +45,6 @@ stdenv.mkDerivation rec {
       --replace '"convert"' '"${imagemagick.out}/bin/convert"'
     substituteInPlace bin/rivet \
       --replace '"less"' '"${less}/bin/less"'
-    substituteInPlace bin/rivet-buildplugin \
-      --replace '"which"' '"${which}/bin/which"' \
-      --replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"}  #' \
-      --replace 'mycxxflags="' "mycxxflags=\"-std=c++11 $NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
     substituteInPlace bin/rivet-mkhtml \
       --replace '"make-plots"' \"$out/bin/make-plots\" \
       --replace '"rivet-cmphistos"' \"$out/bin/rivet-cmphistos\"
diff --git a/pkgs/development/libraries/physics/yoda/default.nix b/pkgs/development/libraries/physics/yoda/default.nix
index dd1b3305646..7519d0da03f 100644
--- a/pkgs/development/libraries/physics/yoda/default.nix
+++ b/pkgs/development/libraries/physics/yoda/default.nix
@@ -1,18 +1,19 @@
-{ stdenv, fetchurl, fetchpatch, python2Packages, root, makeWrapper, withRootSupport ? false }:
+{ stdenv, fetchurl, fetchpatch, python2Packages, root, makeWrapper, zlib, withRootSupport ? false }:
 
 stdenv.mkDerivation rec {
   name = "yoda-${version}";
-  version = "1.6.7";
+  version = "1.7.0";
 
   src = fetchurl {
     url = "http://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
-    sha256 = "05jyv5dypa6d4q1m8wm2qycgq1i0bgzwzzm9qqdj0b43ff2kggra";
+    sha256 = "0fyf6ld1klzlfmr5sl1jxzck4a0h14zfkrff8397rn1fqnqbzmmk";
   };
 
   pythonPath = []; # python wrapper support
 
   buildInputs = with python2Packages; [ python numpy matplotlib makeWrapper ]
     ++ stdenv.lib.optional withRootSupport root;
+  propagatedBuildInputs = [ zlib ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/poco/default.nix b/pkgs/development/libraries/poco/default.nix
index 0f971cff64d..40755913737 100644
--- a/pkgs/development/libraries/poco/default.nix
+++ b/pkgs/development/libraries/poco/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, pkgconfig, zlib, pcre, expat, sqlite, openssl, unixODBC, libmysql }:
+{ stdenv, fetchurl, cmake, pkgconfig, zlib, pcre, expat, sqlite, openssl, unixODBC, mysql }:
 
 stdenv.mkDerivation rec {
   name = "poco-${version}";
@@ -12,10 +12,9 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkgconfig ];
 
-  buildInputs = [ zlib pcre expat sqlite openssl unixODBC libmysql ];
+  buildInputs = [ zlib pcre expat sqlite openssl unixODBC mysql.connector-c ];
 
   cmakeFlags = [
-    "-DMYSQL_INCLUDE_DIR=${libmysql.dev}/include/mysql"
     "-DPOCO_UNBUNDLED=ON"
   ];
 
diff --git a/pkgs/development/libraries/protobuf/2.5.nix b/pkgs/development/libraries/protobuf/2.5.nix
new file mode 100644
index 00000000000..550d0b1bace
--- /dev/null
+++ b/pkgs/development/libraries/protobuf/2.5.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "2.5.0";
+  # make sure you test also -A pythonPackages.protobuf
+  src = fetchurl {
+    url = "http://protobuf.googlecode.com/files/${version}.tar.bz2";
+    sha256 = "0xxn9gxhvsgzz2sgmihzf6pf75clr05mqj6218camwrwajpcbgqk";
+  };
+})
\ No newline at end of file
diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix
index 6d92de001cb..1bc4fd1085e 100644
--- a/pkgs/development/libraries/qt-3/default.nix
+++ b/pkgs/development/libraries/qt-3/default.nix
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
       -I${randrproto}/include" else "-no-xrandr"}
     ${if xineramaSupport then "-xinerama -L${libXinerama.out}/lib -I${libXinerama.dev}/include" else "-no-xinerama"}
     ${if cursorSupport then "-L${libXcursor.out}/lib -I${libXcursor.dev}/include" else ""}
-    ${if mysqlSupport then "-qt-sql-mysql -L${stdenv.lib.getLib mysql.client}/lib/mysql -I${mysql.client}/include/mysql" else ""}
+    ${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql" else ""}
     ${if xftSupport then "-xft
       -L${libXft.out}/lib -I${libXft.dev}/include
       -L${libXft.freetype.out}/lib -I${libXft.freetype.dev}/include
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix
index 32691faa689..488306fc1ce 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix
@@ -160,7 +160,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ cups # Qt dlopen's libcups instead of linking to it
       postgresql sqlite libjpeg libmng libtiff icu ]
-    ++ optionals (mysql != null) [ mysql.lib ]
+    ++ optionals (mysql != null) [ mysql.connector-c ]
     ++ optionals gtkStyle [ gtk2 gdk_pixbuf ]
     ++ optionals stdenv.isDarwin [ cf-private ApplicationServices OpenGL Cocoa AGL libcxx libobjc ];
 
diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix
index 0582a9f3f82..7bf61c98086 100644
--- a/pkgs/development/libraries/qt-5/5.9/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/default.nix
@@ -91,6 +91,7 @@ let
       qtsvg = callPackage ../modules/qtsvg.nix {};
       qttools = callPackage ../modules/qttools.nix {};
       qttranslations = callPackage ../modules/qttranslations.nix {};
+      qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
       qtwayland = callPackage ../modules/qtwayland.nix {};
       qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
       qtwebengine = callPackage ../modules/qtwebengine.nix {};
@@ -104,7 +105,7 @@ let
         qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
         qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
         qtsensors qtserialport qtsvg qttools qttranslations qtwebsockets
-        qtx11extras qtxmlpatterns
+        qtx11extras qtxmlpatterns qtvirtualkeyboard
       ] ++ optional (!stdenv.isDarwin) qtwayland
         ++ optional (stdenv.isDarwin) qtmacextras);
 
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 172b20bc51b..5f65f71bbba 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -80,7 +80,7 @@ stdenv.mkDerivation {
     )
     ++ lib.optional developerBuild gdb
     ++ lib.optional (cups != null) cups
-    ++ lib.optional (mysql != null) mysql.lib
+    ++ lib.optional (mysql != null) mysql.connector-c
     ++ lib.optional (postgresql != null) postgresql;
 
   nativeBuildInputs =
diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix
index ae6bd18cb14..622d841b405 100644
--- a/pkgs/development/libraries/qt-5/modules/qttools.nix
+++ b/pkgs/development/libraries/qt-5/modules/qttools.nix
@@ -1,4 +1,4 @@
-{ qtModule, lib, qtbase }:
+{ qtModule, stdenv, lib, qtbase }:
 
 with lib;
 
@@ -28,6 +28,8 @@ qtModule {
     "bin/qhelpgenerator"
     "bin/qtplugininfo"
     "bin/qthelpconverter"
+  ] ++ optionals stdenv.isDarwin [
+    "bin/macdeployqt"
   ];
 
   setupHook = ../hooks/qttools-setup-hook.sh;
diff --git a/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
new file mode 100644
index 00000000000..2ba720c8eed
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtdeclarative, qtsvg, hunspell  }:
+
+qtModule {
+  name = "qtvirtualkeyboard";
+  qtInputs = [ qtbase qtdeclarative qtsvg hunspell ];
+}
diff --git a/pkgs/development/libraries/sblim-sfcc/default.nix b/pkgs/development/libraries/sblim-sfcc/default.nix
index 016cc6f0472..ba0b8f4e996 100644
--- a/pkgs/development/libraries/sblim-sfcc/default.nix
+++ b/pkgs/development/libraries/sblim-sfcc/default.nix
@@ -1,30 +1,28 @@
-{ fetchgit, stdenv, autoconf, automake, libtool, curl }:
+{ stdenv, fetchFromGitHub, autoreconfHook, curl }:
 
 stdenv.mkDerivation rec {
-  version = "2.2.9";
   name = "sblim-sfcc-${version}";
+  version = "2.2.9"; # this is technically 2.2.9-preview
 
-  src = fetchgit {
-    url = "https://github.com/kkaempf/sblim-sfcc.git";
-    rev = "f70fecb410a53531e4fe99d39cf81b581819cac9";
-    sha256 = "1hsxim284qzldh599gf6khxj80g8q5263xl3lj3hdndxbhbs843v";
+  src = fetchFromGitHub {
+    owner  = "kkaempf";
+    repo   = "sblim-sfcc";
+    rev    = "514a76af2020fd6dc6fc380df76cbe27786a76a2";
+    sha256 = "06c1mskl9ixbf26v88w0lvn6v2xd6n5f0jd5mckqrn9j4vmh70hs";
   };
 
-  preConfigure = "./autoconfiscate.sh";
+  buildInputs = [ curl ];
 
-  buildInputs = [ autoconf automake libtool curl ];
+  nativeBuildInputs = [ autoreconfHook ];
 
-  meta = {
-    description = "Small Footprint CIM Client Library";
-
-    homepage = https://sourceforge.net/projects/sblim/;
-
-    maintainers = [ stdenv.lib.maintainers.deepfire ];
-
-    license = stdenv.lib.licenses.cpl10;
-
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+  enableParallelBuilding = true;
 
+  meta = with stdenv.lib; {
+    description = "Small Footprint CIM Client Library";
+    homepage    = https://sourceforge.net/projects/sblim/;
+    license     = licenses.cpl10;
+    maintainers = with maintainers; [ deepfire ];
+    platforms   = platforms.unix;
     inherit version;
   };
 }
diff --git a/pkgs/development/libraries/science/math/nccl/default.nix b/pkgs/development/libraries/science/math/nccl/default.nix
new file mode 100644
index 00000000000..c4deccff5b7
--- /dev/null
+++ b/pkgs/development/libraries/science/math/nccl/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub
+, gcc5, eject, cudatoolkit
+}:
+
+stdenv.mkDerivation rec {
+  name = "cudatoolkit-${cudatoolkit.majorVersion}-nccl-${version}";
+  version = "1.3.4-1";
+
+  src = fetchFromGitHub {
+    owner = "NVIDIA";
+    repo = "nccl";
+    rev = "v${version}";
+    sha256 = "0fvnrfn572lc6i2a3xyhbifm53ivcrr46z6cqr3b0bwb1iq79m7q";
+  };
+
+  nativeBuildInputs = [
+    gcc5
+    eject
+  ];
+
+  propagatedBuildInputs = [
+    cudatoolkit
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "CUDA_HOME=${cudatoolkit}"
+    "CUDA_LIB=${cudatoolkit.lib}/lib"
+  ];
+
+  meta = with stdenv.lib; {
+    description = ''
+      NVIDIA Collective Communications Library.
+      Multi-GPU and multi-node collective communication primitives.
+    '';
+    homepage = https://developer.nvidia.com/nccl;
+    license = licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ hyphon81 ];
+  };
+}
diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix
index 82f51bffa8e..42eaf71942e 100644
--- a/pkgs/development/libraries/science/math/openblas/default.nix
+++ b/pkgs/development/libraries/science/math/openblas/default.nix
@@ -12,6 +12,14 @@ let blas64_ = blas64; in
 let
   # To add support for a new platform, add an element to this set.
   configs = {
+    armv6l-linux = {
+      BINARY = "32";
+      TARGET = "ARMV6";
+      DYNAMIC_ARCH = "0";
+      CC = "gcc";
+      USE_OPENMP = "1";
+    };
+
     armv7l-linux = {
       BINARY = "32";
       TARGET = "ARMV7";
diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix
index 001199cd821..81dff49571d 100644
--- a/pkgs/development/libraries/serf/default.nix
+++ b/pkgs/development/libraries/serf/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
         APU="$(echo "${aprutil.dev}"/bin/*-config)" CC="${
           if stdenv.cc.isClang then "clang" else "${stdenv.cc}/bin/gcc"
         }" ${
-          if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos}\""
+          if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos.dev}\""
         }
   '';
 
diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix
index 5ce636e6f0c..8f37302cec5 100644
--- a/pkgs/development/libraries/snappy/default.nix
+++ b/pkgs/development/libraries/snappy/default.nix
@@ -11,18 +11,17 @@ stdenv.mkDerivation rec {
     sha256 = "1x7r8sjmdqlqjz0xfiwdyrqpgaj5yrvrgb28ivgpvnxgar5qv6m2";
   };
 
+  patches = [ ./disable-benchmark.patch ];
+
   outputs = [ "out" "dev" ];
 
   nativeBuildInputs = [ cmake ];
 
-  # -DNDEBUG for speed
-  configureFlags = [ "CXXFLAGS=-DNDEBUG" ];
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
+
+  checkTarget = "test";
 
-  # SIGILL on darwin
-  doCheck = !stdenv.isDarwin;
-  checkPhase = ''
-    (cd .. && ./build/snappy_unittest)
-  '';
+  doCheck = true;
 
   meta = with stdenv.lib; {
     homepage = https://google.github.io/snappy/;
diff --git a/pkgs/development/libraries/snappy/disable-benchmark.patch b/pkgs/development/libraries/snappy/disable-benchmark.patch
new file mode 100644
index 00000000000..c891c13fe74
--- /dev/null
+++ b/pkgs/development/libraries/snappy/disable-benchmark.patch
@@ -0,0 +1,5 @@
+--- a/snappy-test.cc
++++ b/snappy-test.cc
+@@ -46 +46 @@
+-DEFINE_bool(run_microbenchmarks, true,
++DEFINE_bool(run_microbenchmarks, false,
diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix
index ee45c0d1c65..b27fd0843bc 100644
--- a/pkgs/development/libraries/speechd/default.nix
+++ b/pkgs/development/libraries/speechd/default.nix
@@ -1,29 +1,70 @@
-{ fetchurl, lib, stdenv, intltool, libtool, pkgconfig, glib, dotconf, libsndfile
-, libao, python3Packages
-, withEspeak ? false, espeak
+{ stdenv, pkgconfig, fetchurl, python3Packages
+, intltool, itstool, libtool, texinfo, autoreconfHook
+, glib, dotconf, libsndfile
+, withLibao ? true, libao
+, withPulse ? false, libpulseaudio
+, withAlsa ? false, alsaLib
+, withOss ? false
+, withFlite ? true, flite
+# , withFestival ? false, festival-freebsoft-utils
+, withEspeak ? true, espeak, sonic, pcaudiolib
 , withPico ? true, svox
+# , withIvona ? false, libdumbtts
 }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (stdenv.lib) optional optionals;
+  inherit (python3Packages) python pyxdg wrapPython;
+
+  # speechd hard-codes espeak, even when built without support for it.
+  selectedDefaultModule =
+    if withEspeak then
+      "espeak-ng"
+    else if withPico then
+      "pico"
+    else if withFlite then
+      "flite"
+    else
+      throw "You need to enable at least one output module.";
+in stdenv.mkDerivation rec {
   name = "speech-dispatcher-${version}";
-  version = "0.8.5";
+  version = "0.8.8";
 
   src = fetchurl {
     url = "http://www.freebsoft.org/pub/projects/speechd/${name}.tar.gz";
-    sha256 = "18jlxnhlahyi6njc6l6576hfvmzivjjgfjyd2n7vvrvx9inphjrb";
+    sha256 = "1wvck00w9ixildaq6hlhnf6wa576y02ac96lp6932h3k1n08jaiw";
   };
 
-  buildInputs = [ intltool libtool glib dotconf libsndfile libao python3Packages.python ]
-             ++ lib.optional withEspeak espeak
-             ++ lib.optional withPico svox;
-  nativeBuildInputs = [ pkgconfig python3Packages.wrapPython ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook intltool libtool itstool texinfo wrapPython ];
+
+  buildInputs = [ glib dotconf libsndfile libao libpulseaudio alsaLib python ]
+    ++ optionals withEspeak [ espeak sonic pcaudiolib ]
+    ++ optional withFlite flite
+    ++ optional withPico svox
+    # TODO: add flint/festival support with festival-freebsoft-utils package
+    # ++ optional withFestival festival-freebsoft-utils
+    # TODO: add Ivona support with libdumbtts package
+    # ++ optional withIvona libdumbtts
+  ;
 
-  hardeningDisable = [ "format" ];
+  pythonPath = [ pyxdg ];
 
-  pythonPath = with python3Packages; [ pyxdg ];
+  configureFlags = [
+    # Audio method falls back from left to right.
+    "--with-default-audio-method=\"libao,pulse,alsa,oss\""
+  ] ++ optional withPulse "--with-pulse"
+    ++ optional withAlsa "--with-alsa"
+    ++ optional withLibao "--with-libao"
+    ++ optional withOss "--with-oss"
+    ++ optional withEspeak "--with-espeak-ng"
+    ++ optional withPico "--with-pico"
+    # ++ optional withFestival "--with-flint"
+    # ++ optional withIvona "--with-ivona"
+  ;
 
-  postPatch = lib.optionalString withPico ''
-    sed -i 's,/usr/share/pico/lang/,${svox}/share/pico/lang/,g' src/modules/pico.c
+  postPatch = ''
+    substituteInPlace config/speechd.conf --replace "DefaultModule espeak" "DefaultModule ${selectedDefaultModule}"
+    substituteInPlace src/modules/pico.c --replace "/usr/share/pico/lang" "${svox}/share/pico/lang"
   '';
 
   postInstall = ''
@@ -32,8 +73,9 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Common interface to speech synthesis";
-    homepage = http://www.freebsoft.org/speechd;
+    homepage = https://devel.freebsoft.org/speechd;
     license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ berce ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/swc/default.nix b/pkgs/development/libraries/swc/default.nix
deleted file mode 100644
index bbc3aa20dd6..00000000000
--- a/pkgs/development/libraries/swc/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ lib, stdenv, fetchurl, pkgconfig
-, wld, wayland, xwayland, fontconfig, pixman, libdrm, libinput, libevdev, libxkbcommon, libxcb, xcbutilwm
-}:
-
-stdenv.mkDerivation rec {
-  name = "swc-${version}";
-  version = "git-2016-02-09";
-  repo = "https://github.com/michaelforney/swc";
-  rev = "1da0ef13fddc572accea12439a4471b4d2f64ddd";
-
-  src = fetchurl {
-    url = "${repo}/archive/${rev}.tar.gz";
-    sha256 = "d1894612d8aa1ce828efb78f1570290f84bba6563e21eb777e08c3c3859b7bbe";
-  };
-
-  nativeBuildInputs = [ pkgconfig ];
-
-  buildInputs = [ wld wayland xwayland fontconfig pixman libdrm libinput libevdev libxkbcommon libxcb xcbutilwm ];
-
-  prePatch = ''
-    substituteInPlace launch/local.mk --replace 4755 755
-  '';
-
-  makeFlags = "PREFIX=$(out)";
-  installPhase = "PREFIX=$out make install";
-
-  meta = {
-    description = "A library for making a simple Wayland compositor";
-    homepage    = repo;
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.linux;
-    maintainers = with lib.maintainers; [ ];
-  };
-}
diff --git a/pkgs/development/libraries/tntdb/default.nix b/pkgs/development/libraries/tntdb/default.nix
index d11a5c344c9..75a494cfbde 100644
--- a/pkgs/development/libraries/tntdb/default.nix
+++ b/pkgs/development/libraries/tntdb/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0js79dbvkic30bzw1pf26m64vs2ssw2sbj55w1dc0sy69dlv4fh9";
   };
 
-  buildInputs = [ cxxtools postgresql mysql sqlite zlib openssl ];
+  buildInputs = [ cxxtools postgresql mysql.connector-c sqlite zlib openssl ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix
index 233fdd90254..badcb7e661b 100644
--- a/pkgs/development/libraries/unixODBCDrivers/default.nix
+++ b/pkgs/development/libraries/unixODBCDrivers/default.nix
@@ -37,19 +37,12 @@
     };
 
     nativeBuildInputs = [ cmake ];
-    buildInputs = [ unixODBC mariadb.lib ];
+    buildInputs = [ unixODBC mariadb.connector-c ];
 
     cmakeFlags = [
-      "-DMARIADB_INCLUDE_DIR=${mariadb.lib}/include/mysql"
+      "-DMARIADB_INCLUDE_DIR=${mariadb.connector-c}/include/mariadb"
     ];
 
-    preConfigure = ''
-      sed -i \
-        -e 's,mariadb_config,mysql_config,g' \
-        -e 's,libmariadbclient,libmysqlclient,g' \
-        cmake/FindMariaDB.cmake
-    '';
-
     passthru = {
       fancyName = "MariaDB";
       driver = "lib/libmyodbc3-3.51.12.so";
@@ -60,7 +53,6 @@
       homepage =  https://downloads.mariadb.org/connector-odbc/;
       license = licenses.gpl2;
       platforms = platforms.linux;
-      broken = true;
     };
   };
 
diff --git a/pkgs/development/libraries/webkitgtk/2.18.nix b/pkgs/development/libraries/webkitgtk/2.18.nix
index 946f032f0f7..1899234fc56 100644
--- a/pkgs/development/libraries/webkitgtk/2.18.nix
+++ b/pkgs/development/libraries/webkitgtk/2.18.nix
@@ -15,7 +15,7 @@ assert stdenv.isDarwin -> !enableGtk2Plugins;
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "webkitgtk-${version}";
-  version = "2.18.3";
+  version = "2.18.4";
 
   meta = {
     description = "Web content rendering engine, GTK+ port";
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://webkitgtk.org/releases/${name}.tar.xz";
-    sha256 = "17lgn7qwrwqxl1lgmq5icvzmna6aymx4c7al47rp0vvac7hj0m71";
+    sha256 = "1f1j0r996l20cgkvbwpizn7d4yp58cy334b1pvn4kfb5c2dbpdl7";
   };
 
   # see if we can clean this up....
diff --git a/pkgs/development/libraries/wld/default.nix b/pkgs/development/libraries/wld/default.nix
deleted file mode 100644
index 1dd5858ec72..00000000000
--- a/pkgs/development/libraries/wld/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ lib, stdenv, fetchurl, pkgconfig
-, wayland, fontconfig, pixman, freetype, libdrm
-}:
-
-stdenv.mkDerivation rec {
-  name = "wld-${version}";
-  version = "git-2015-09-01";
-  repo = "https://github.com/michaelforney/wld";
-  rev = "efe0a1ed1856a2e4a1893ed0f2d7dde43b5627f0";
-
-  src = fetchurl {
-    url = "${repo}/archive/${rev}.tar.gz";
-    sha256 = "09388f7828e18c75e7b8d41454903886a725d7a868f60e66c128bd7d2e953ee1";
-  };
-
-  nativeBuildInputs = [ pkgconfig ];
-
-  buildInputs = [ wayland fontconfig pixman freetype libdrm ];
-
-  makeFlags = "PREFIX=$(out)";
-  installPhase = "PREFIX=$out make install";
-
-  meta = {
-    description = "A primitive drawing library targeted at Wayland";
-    homepage    = repo;
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.linux;
-    maintainers = with lib.maintainers; [ ];
-  };
-}
diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix
index 79bd8bb9665..c32f0a3b938 100644
--- a/pkgs/development/libraries/wlroots/default.nix
+++ b/pkgs/development/libraries/wlroots/default.nix
@@ -1,30 +1,44 @@
 { stdenv, fetchFromGitHub, meson, ninja, pkgconfig
 , wayland, mesa_noglu, wayland-protocols, libinput, libxkbcommon, pixman
-, xcbutilwm, libX11, libcap
+, xcbutilwm, libX11, libcap, xcbutilimage
 }:
 
 let pname = "wlroots";
-    version = "unstable-2017-10-31";
+    version = "unstable-2017-12-22";
 in stdenv.mkDerivation rec {
   name = "${pname}-${version}";
 
   src = fetchFromGitHub {
     owner = "swaywm";
     repo = "wlroots";
-    rev = "7200d643363e988edf6777c38e7f8fcd451a2c50";
-    sha256 = "179raymkni1xzaph32zdhg7nfin0xfzrlnbnxkcr266k9y8k66ac";
+    rev = "0a370c529806077a11638e7fa856d5fbb539496b";
+    sha256 = "0h3i0psn5595dncv53l5m2mf13k9wcv3qi16vla5ckpskykc0xx6";
   };
 
   # TODO: Temporary workaround for compilation errors
-  patches = [ ./libdrm.patch ./no-werror.patch ];
+  patches = [ ./libdrm.patch ]; #./no-werror.patch
+
+  # $out for the library and $bin for rootston
+  outputs = [ "out" "bin" ];
 
   nativeBuildInputs = [ meson ninja pkgconfig ];
 
   buildInputs = [
     wayland mesa_noglu wayland-protocols libinput libxkbcommon pixman
-    xcbutilwm libX11 libcap
+    xcbutilwm libX11 libcap xcbutilimage
   ];
 
+  # Install rootston (the reference compositor) to $bin
+  postInstall = ''
+    mkdir -p $bin/bin
+    cp rootston/rootston $bin/bin/
+    mkdir $bin/lib
+    cp libwlroots.so $bin/lib/
+    patchelf --set-rpath "$bin/lib:${stdenv.lib.makeLibraryPath buildInputs}" $bin/bin/rootston
+    mkdir $bin/etc
+    cp ../rootston/rootston.ini.example $bin/etc/rootston.ini
+  '';
+
   meta = with stdenv.lib; {
     description = "A modular Wayland compositor library";
     inherit (src.meta) homepage;
diff --git a/pkgs/development/libraries/wt/default.nix b/pkgs/development/libraries/wt/default.nix
index 3adf4f1497f..1d0bd20f66f 100644
--- a/pkgs/development/libraries/wt/default.nix
+++ b/pkgs/development/libraries/wt/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, cmake, boost, pkgconfig, doxygen, qt48Full, libharu
-, pango, fcgi, firebird, libmysql, postgresql, graphicsmagick, glew, openssl
+, pango, fcgi, firebird, mysql, postgresql, graphicsmagick, glew, openssl
 , pcre
 }:
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     cmake boost doxygen qt48Full libharu
-    pango fcgi firebird libmysql postgresql graphicsmagick glew
+    pango fcgi firebird mysql.connector-c postgresql graphicsmagick glew
     openssl pcre
   ];
 
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     "-DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick"
     "-DWT_CPP_11_MODE=-std=c++11"
     "-DGM_PREFIX=${graphicsmagick}"
-    "-DMYSQL_PREFIX=${libmysql.dev}"
+    "-DMYSQL_PREFIX=${mysql.connector-c}"
     "--no-warn-unused-cli"
   ];
 
diff --git a/pkgs/development/libraries/wxwidgets/3.1/default.nix b/pkgs/development/libraries/wxwidgets/3.1/default.nix
new file mode 100644
index 00000000000..4b410a307bb
--- /dev/null
+++ b/pkgs/development/libraries/wxwidgets/3.1/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchFromGitHub
+, wxGTK30
+}:
+
+with stdenv.lib;
+
+wxGTK30.overrideAttrs (oldAttrs : rec {
+    name = "wxwidgets-${version}";
+    version = "3.1.0";
+    src = fetchFromGitHub {
+        owner = "wxWidgets";
+        repo = "wxWidgets";
+        rev = "v${version}";
+        sha256 = "14kl1rsngm70v3mbyv1mal15iz2b18k97avjx8jn7s81znha1c7f";
+    };
+})
\ No newline at end of file