about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/arduino/arduino-core/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/8/default.nix7
-rw-r--r--pkgs/development/compilers/gcc/9/default.nix7
-rw-r--r--pkgs/development/compilers/gerbil/build.nix8
-rw-r--r--pkgs/development/compilers/hhvm/default.nix4
-rw-r--r--pkgs/development/compilers/neko/default.nix4
-rw-r--r--pkgs/development/compilers/openjdk/8.nix2
-rw-r--r--pkgs/development/compilers/urweb/default.nix8
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix2
-rw-r--r--pkgs/development/interpreters/perl/sw_vers.patch2
-rw-r--r--pkgs/development/interpreters/php/default.nix8
-rw-r--r--pkgs/development/java-modules/jogl/default.nix9
-rw-r--r--pkgs/development/libraries/cppdb/default.nix6
-rw-r--r--pkgs/development/libraries/expat/default.nix6
-rw-r--r--pkgs/development/libraries/gdal/2.4.0.nix4
-rw-r--r--pkgs/development/libraries/gdal/default.nix4
-rw-r--r--pkgs/development/libraries/giflib/default.nix (renamed from pkgs/development/libraries/giflib/5.1.nix)16
-rw-r--r--pkgs/development/libraries/kdb/default.nix4
-rw-r--r--pkgs/development/libraries/libagar/default.nix6
-rw-r--r--pkgs/development/libraries/libdbi-drivers/default.nix10
-rw-r--r--pkgs/development/libraries/libgda/default.nix6
-rw-r--r--pkgs/development/libraries/libgdiplus/default.nix24
-rw-r--r--pkgs/development/libraries/libproxy/default.nix2
-rw-r--r--pkgs/development/libraries/librdf/redland.nix4
-rw-r--r--pkgs/development/libraries/opendbx/default.nix8
-rw-r--r--pkgs/development/libraries/openssl/default.nix8
-rw-r--r--pkgs/development/libraries/poco/default.nix6
-rw-r--r--pkgs/development/libraries/qt-3/default.nix6
-rw-r--r--pkgs/development/libraries/qt-4.x/4.8/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix12
-rw-r--r--pkgs/development/libraries/tntdb/default.nix4
-rw-r--r--pkgs/development/libraries/unixODBCDrivers/default.nix17
-rw-r--r--pkgs/development/libraries/wt/default.nix6
-rw-r--r--pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix8
-rw-r--r--pkgs/development/lisp-modules/shell.nix4
-rw-r--r--pkgs/development/lua-modules/overrides.nix6
-rw-r--r--pkgs/development/ocaml-modules/mysql/default.nix4
-rw-r--r--pkgs/development/perl-modules/DBD-mysql/default.nix4
-rw-r--r--pkgs/development/pure-modules/glpk/default.nix6
-rw-r--r--pkgs/development/python-modules/algebraic-data-types/default.nix28
-rw-r--r--pkgs/development/python-modules/cryptography/default.nix11
-rw-r--r--pkgs/development/python-modules/ledgerblue/default.nix7
-rw-r--r--pkgs/development/python-modules/lxml/default.nix2
-rw-r--r--pkgs/development/python-modules/mypy/default.nix4
-rw-r--r--pkgs/development/python-modules/mysqlclient/default.nix6
-rw-r--r--pkgs/development/python-modules/ncclient/default.nix4
-rw-r--r--pkgs/development/python-modules/pyopenssl/default.nix3
-rw-r--r--pkgs/development/python-modules/python-language-server/default.nix4
-rw-r--r--pkgs/development/python-modules/sentry-sdk/default.nix4
-rw-r--r--pkgs/development/python-modules/typed-ast/default.nix12
-rw-r--r--pkgs/development/r-modules/default.nix4
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix6
-rw-r--r--pkgs/development/tools/ammonite/default.nix29
-rw-r--r--pkgs/development/tools/analysis/flow/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/redo-apenwarr/default.nix6
-rw-r--r--pkgs/development/tools/misc/hydra-cli/default.nix31
-rw-r--r--pkgs/development/tools/misc/patchelf/default.nix19
-rw-r--r--pkgs/development/tools/misc/patchelf/unstable.nix26
-rw-r--r--pkgs/development/tools/misc/sysbench/default.nix4
-rw-r--r--pkgs/development/tools/misc/ycmd/default.nix33
-rw-r--r--pkgs/development/tools/tora/default.nix6
61 files changed, 304 insertions, 209 deletions
diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix
index 2897bac061444..840fbff60ebdb 100644
--- a/pkgs/development/arduino/arduino-core/default.nix
+++ b/pkgs/development/arduino/arduino-core/default.nix
@@ -200,7 +200,7 @@ stdenv.mkDerivation rec {
 
     # avrdude_bin is linked against libtinfo.so.5
     mkdir $out/lib/
-    ln -s ${lib.makeLibraryPath [ncurses5]}/libncursesw.so.5 $out/lib/libtinfo.so.5
+    ln -s ${lib.makeLibraryPath [ncurses5]}/libtinfo.so.5 $out/lib/libtinfo.so.5
 
     ${stdenv.lib.optionalString withTeensyduino ''
       # Patch the Teensy loader binary
diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix
index 129ca72251fc0..e25c7b6016af6 100644
--- a/pkgs/development/compilers/gcc/8/default.nix
+++ b/pkgs/development/compilers/gcc/8/default.nix
@@ -186,7 +186,12 @@ stdenv.mkDerivation ({
             sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
         ''
         )
-    else "");
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+	        makeFlagsArray+=(
+	           'LIMITS_H_TEST=false'
+	        )
+	      '';
 
   inherit noSysDirs staticCompiler crossStageStatic
     libcCross crossMingw;
diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix
index 506cfee7f498b..de4d893b99e2b 100644
--- a/pkgs/development/compilers/gcc/9/default.nix
+++ b/pkgs/development/compilers/gcc/9/default.nix
@@ -185,7 +185,12 @@ stdenv.mkDerivation ({
             sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
         ''
         )
-    else "");
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+	        makeFlagsArray+=(
+	           'LIMITS_H_TEST=false'
+	        )
+	      '';
 
   inherit noSysDirs staticCompiler crossStageStatic
     libcCross crossMingw;
diff --git a/pkgs/development/compilers/gerbil/build.nix b/pkgs/development/compilers/gerbil/build.nix
index 9ef650c330fab..b5ccbca6f7e64 100644
--- a/pkgs/development/compilers/gerbil/build.nix
+++ b/pkgs/development/compilers/gerbil/build.nix
@@ -1,6 +1,6 @@
 { stdenv, makeStaticLibraries,
   coreutils, rsync, bash,
-  openssl, zlib, sqlite, libxml2, libyaml, mysql, lmdb, leveldb, postgresql,
+  openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
   version, git-version, gambit, src }:
 
 # TODO: distinct packages for gerbil-release and gerbil-devel
@@ -12,13 +12,13 @@ stdenv.mkDerivation rec {
   inherit src;
 
   # Use makeStaticLibraries to enable creation of statically linked binaries
-  buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml mysql.connector-c lmdb leveldb postgresql ];
+  buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml libmysqlclient lmdb leveldb postgresql ];
   buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries;
 
   buildInputs = [ gambit rsync bash ]
     ++ buildInputs_libraries ++ buildInputs_staticLibraries;
 
-  NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ];
+  NIX_CFLAGS_COMPILE = [ "-I${libmysqlclient}/include/mysql" "-L${libmysqlclient}/lib/mysql" ];
 
   postPatch = ''
     echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm
@@ -40,7 +40,7 @@ ZLIB=${makeStaticLibraries zlib}/lib/libz.a
 # SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING!
 # LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING!
 # YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING!
-MYSQL=${makeStaticLibraries mysql.connector-c}/lib/mariadb/libmariadb.a
+MYSQL=${makeStaticLibraries libmysqlclient}/lib/mariadb/libmariadb.a
 # LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING!
 LEVELDB=${makeStaticLibraries lmdb}/lib/libleveldb.a
 EOF
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 24e88f9ee2e2c..7066744bb54dd 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -2,7 +2,7 @@
 , pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
 , expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
 , bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
-, libxslt, freetype, gdb, git, perl, mysql, gmp, libyaml, libedit
+, libxslt, freetype, gdb, git, perl, libmysqlclient, gmp, libyaml, libedit
 , libvpx, imagemagick, fribidi, gperf, which, ocamlPackages
 }:
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ cmake pkgconfig boost libunwind mysql.connector-c libmemcached pcre gdb git perl
+    [ cmake pkgconfig boost libunwind libmysqlclient libmemcached pcre gdb git perl
       libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
       oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
       libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5
diff --git a/pkgs/development/compilers/neko/default.nix b/pkgs/development/compilers/neko/default.nix
index 74ccaac388f26..79c4aacbed5b9 100644
--- a/pkgs/development/compilers/neko/default.nix
+++ b/pkgs/development/compilers/neko/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, boehmgc, zlib, sqlite, pcre, cmake, pkgconfig
-, git, apacheHttpd, apr, aprutil, mysql, mbedtls, openssl, pkgs, gtk2, libpthreadstubs
+, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls, openssl, pkgs, gtk2, libpthreadstubs
 }:
 
 stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkgconfig git ];
   buildInputs =
     [ boehmgc zlib sqlite pcre apacheHttpd apr aprutil
-      mysql.connector-c mbedtls openssl libpthreadstubs ]
+      libmysqlclient mbedtls openssl libpthreadstubs ]
       ++ stdenv.lib.optional stdenv.isLinux gtk2
       ++ stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
                                                 pkgs.darwin.apple_sdk.frameworks.Carbon];
diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix
index 1d356945a4f10..1a5848cd1a682 100644
--- a/pkgs/development/compilers/openjdk/8.nix
+++ b/pkgs/development/compilers/openjdk/8.nix
@@ -219,6 +219,8 @@ let
       ln -s $jre/lib/openjdk/jre $out/jre
     '';
 
+    propagatedBuildInputs = [ setJavaClassPath ];
+
     preFixup = ''
       # Propagate the setJavaClassPath setup hook from the JRE so that
       # any package that depends on the JRE has $CLASSPATH set up
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 01d4972a55d50..31381aac741d0 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, file, openssl, mlton
-, mysql, postgresql, sqlite, gcc, icu
+, libmysqlclient, postgresql, sqlite, gcc, icu
 }:
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1cl0x0sy7w1lazszc8q06q3wx0x0rczxh27vimrsw54s6s9y096s";
   };
 
-  buildInputs = [ openssl mlton mysql.connector-c postgresql sqlite icu ];
+  buildInputs = [ openssl mlton libmysqlclient postgresql sqlite icu ];
 
   prePatch = ''
     sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
@@ -21,13 +21,13 @@ stdenv.mkDerivation rec {
 
   preConfigure = ''
     export PGHEADER="${postgresql}/include/libpq-fe.h";
-    export MSHEADER="${mysql.connector-c}/include/mysql/mysql.h";
+    export MSHEADER="${libmysqlclient}/include/mysql/mysql.h";
     export SQHEADER="${sqlite.dev}/include/sqlite3.h";
 
     export CC="${gcc}/bin/gcc";
     export CCARGS="-I$out/include \
                    -L${openssl.out}/lib \
-                   -L${mysql.connector-c}/lib \
+                   -L${libmysqlclient}/lib \
                    -L${postgresql.lib}/lib \
                    -L${sqlite.out}/lib";
   '';
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index 5db25686fc66d..91fdb1ece2767 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -53,7 +53,7 @@ self: super: builtins.intersectAttrs super {
 
   # Use the default version of mysql to build this package (which is actually mariadb).
   # test phase requires networking
-  mysql = dontCheck (super.mysql.override { mysql = pkgs.mysql.connector-c; });
+  mysql = dontCheck (super.mysql.override { mysql = pkgs.libmysqlclient; });
 
   # CUDA needs help finding the SDK headers and libraries.
   cuda = overrideCabal super.cuda (drv: {
diff --git a/pkgs/development/interpreters/perl/sw_vers.patch b/pkgs/development/interpreters/perl/sw_vers.patch
index 9d4cd75486e64..2e30dba929242 100644
--- a/pkgs/development/interpreters/perl/sw_vers.patch
+++ b/pkgs/development/interpreters/perl/sw_vers.patch
@@ -7,7 +7,7 @@ index afadf53..80b7533 100644
      # "ProductVersion:    10.10.5"   "10.10"
      # "ProductVersion:    10.11"     "10.11"
 -        prodvers=`sw_vers|awk '/^ProductVersion:/{print $2}'|awk -F. '{print $1"."$2}'`
-+        prodvers="10.10"
++        prodvers="${MACOSX_DEPLOYMENT_TARGET:-10.12}"
      case "$prodvers" in
      10.*)
        add_macosx_version_min ccflags $prodvers
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 9a82868b7b3d3..508339d0da6b3 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -1,6 +1,6 @@
 # pcre functionality is tested in nixos/tests/php-pcre.nix
 { lib, stdenv, fetchurl, autoconf, bison, libtool, pkgconfig, re2c
-, mysql, libxml2, readline, zlib, curl, postgresql, gettext
+, libmysqlclient, libxml2, readline, zlib, curl, postgresql, gettext
 , openssl, pcre, pcre2, sqlite, config, libjpeg, libpng, freetype
 , libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
 , uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
@@ -64,7 +64,7 @@ let
   }:
 
     let
-      mysqlBuildInputs = optional (!mysqlndSupport) mysql.connector-c;
+      mysqlBuildInputs = optional (!mysqlndSupport) libmysqlclient;
       libmcrypt' = libmcrypt.override { disablePosixThreads = true; };
     in stdenv.mkDerivation {
 
@@ -149,9 +149,9 @@ let
       ++ optional postgresqlSupport "--with-pgsql=${postgresql}"
       ++ optional pdo_odbcSupport "--with-pdo-odbc=unixODBC,${unixODBC}"
       ++ optional pdo_pgsqlSupport "--with-pdo-pgsql=${postgresql}"
-      ++ optional pdo_mysqlSupport "--with-pdo-mysql=${if mysqlndSupport then "mysqlnd" else mysql.connector-c}"
+      ++ optional pdo_mysqlSupport "--with-pdo-mysql=${if mysqlndSupport then "mysqlnd" else libmysqlclient}"
       ++ optionals mysqliSupport [
-        "--with-mysqli=${if mysqlndSupport then "mysqlnd" else "${mysql.connector-c}/bin/mysql_config"}"
+        "--with-mysqli=${if mysqlndSupport then "mysqlnd" else "${libmysqlclient}/bin/mysql_config"}"
       ]
       ++ optional ( pdo_mysqlSupport || mysqliSupport ) "--with-mysql-sock=/run/mysqld/mysqld.sock"
       ++ optional bcmathSupport "--enable-bcmath"
diff --git a/pkgs/development/java-modules/jogl/default.nix b/pkgs/development/java-modules/jogl/default.nix
index d179fb531789f..80f19ab65f5c6 100644
--- a/pkgs/development/java-modules/jogl/default.nix
+++ b/pkgs/development/java-modules/jogl/default.nix
@@ -1,9 +1,5 @@
-{ stdenv, fetchgit, ant, jdk, openjdk8, zulu8, git, xorg, udev, libGL, libGLU }:
+{ stdenv, fetchgit, ant, jdk, git, xorg, udev, libGL, libGLU }:
 
-let
-  # workaround https://github.com/NixOS/nixpkgs/issues/37364
-  jdk-without-symlinks = if jdk == openjdk8 then zulu8 else jdk;
-in
 {
   jogl_2_3_2 =
     let
@@ -32,7 +28,8 @@ in
           -exec sed -i 's@"libGLU.so"@"${libGLU}/lib/libGLU.so"@' {} \;
       '';
 
-      buildInputs = [ jdk-without-symlinks ant git udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXt xorg.libXxf86vm xorg.libXrender ];
+      nativeBuildInputs = [ jdk ant git ];
+      buildInputs = [ udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXt xorg.libXxf86vm xorg.libXrender ];
 
       buildPhase = ''
         cp -r ${gluegen-src} $NIX_BUILD_TOP/gluegen
diff --git a/pkgs/development/libraries/cppdb/default.nix b/pkgs/development/libraries/cppdb/default.nix
index 737122c57bfe2..a21b3cc93faa0 100644
--- a/pkgs/development/libraries/cppdb/default.nix
+++ b/pkgs/development/libraries/cppdb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, sqlite, mysql, postgresql, unixODBC }:
+{ stdenv, fetchurl, cmake, sqlite, libmysqlclient, postgresql, unixODBC }:
 
 stdenv.mkDerivation rec {
   pname = "cppdb";
@@ -11,10 +11,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  buildInputs = [ cmake sqlite mysql.connector-c postgresql unixODBC ];
+  buildInputs = [ cmake sqlite libmysqlclient postgresql unixODBC ];
 
   cmakeFlags = [ "--no-warn-unused-cli" ];
-  NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ];
+  NIX_CFLAGS_COMPILE = [ "-I${libmysqlclient}/include/mysql" "-L${libmysqlclient}/lib/mysql" ];
 
   meta = with stdenv.lib; {
     homepage = http://cppcms.com/sql/cppdb/;
diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix
index ef2574019459d..bb86ac57832ad 100644
--- a/pkgs/development/libraries/expat/default.nix
+++ b/pkgs/development/libraries/expat/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "expat-2.2.7";
+  name = "expat-2.2.8";
 
   src = fetchurl {
-    url = "mirror://sourceforge/expat/${name}.tar.bz2";
-    sha256 = "067cfhqwiswm4zynw7xaxl59mrrimaiyjhnn8byxma1i98pi1jfb";
+    url = "https://github.com/libexpat/libexpat/releases/download/R_2_2_8/${name}.tar.xz";
+    sha256 = "16vpj5mk3lps3x7fr8cs03rffx3ir4jilyqw0frayn6q94daijk1";
   };
 
   outputs = [ "out" "dev" ]; # TODO: fix referrers
diff --git a/pkgs/development/libraries/gdal/2.4.0.nix b/pkgs/development/libraries/gdal/2.4.0.nix
index baf847d4e0a28..d41b4c55f867d 100644
--- a/pkgs/development/libraries/gdal/2.4.0.nix
+++ b/pkgs/development/libraries/gdal/2.4.0.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, unzip, libjpeg, libtiff, zlib
-, postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl
+, postgresql, libmysqlclient, libgeotiff, pythonPackages, proj, geos, openssl
 , libpng, sqlite, libspatialite, poppler, hdf4, qhull, giflib, expat
 , libiconv, libxml2
 , netcdfSupport ? true, netcdf, hdf5, curl
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     "--with-poppler=${poppler.dev}" # optional
     "--with-libz=${zlib.dev}"       # optional
     "--with-pg=${postgresql}/bin/pg_config"
-    "--with-mysql=${mysql.connector-c or mysql}/bin/mysql_config"
+    "--with-mysql=${libmysqlclient}/bin/mysql_config"
     "--with-geotiff=${libgeotiff.dev}"
     "--with-sqlite3=${sqlite.dev}"
     "--with-spatialite=${libspatialite}"
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index 413d4e19dde75..bb53277075f13 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, fetchpatch, unzip, libjpeg, libtiff, zlib
-, postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl
+, postgresql, libmysqlclient, libgeotiff, pythonPackages, proj, geos, openssl
 , libpng, sqlite, libspatialite, poppler, hdf4, qhull, giflib, expat
 , libiconv, libxml2, autoreconfHook
 , netcdfSupport ? true, netcdf, hdf5, curl
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     "--with-poppler=${poppler.dev}" # optional
     "--with-libz=${zlib.dev}"       # optional
     "--with-pg=${postgresql}/bin/pg_config"
-    "--with-mysql=${mysql.connector-c or mysql}/bin/mysql_config"
+    "--with-mysql=${libmysqlclient}/bin/mysql_config"
     "--with-geotiff=${libgeotiff}"
     "--with-sqlite3=${sqlite.dev}"
     "--with-spatialite=${libspatialite}"
diff --git a/pkgs/development/libraries/giflib/5.1.nix b/pkgs/development/libraries/giflib/default.nix
index fee760b3ea26f..d97477e3f3a50 100644
--- a/pkgs/development/libraries/giflib/5.1.nix
+++ b/pkgs/development/libraries/giflib/default.nix
@@ -1,18 +1,24 @@
 {stdenv, fetchurl, xmlto, docbook_xml_dtd_412, docbook_xsl, libxml2 }:
 
-stdenv.mkDerivation {
-  name = "giflib-5.1.4";
+stdenv.mkDerivation rec {
+  name = "giflib-5.2.1";
   src = fetchurl {
-    url = mirror://sourceforge/giflib/giflib-5.1.4.tar.bz2;
-    sha256 = "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz";
+    url = "mirror://sourceforge/giflib/${name}.tar.gz";
+    sha256 = "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii";
   };
 
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace 'PREFIX = /usr/local' 'PREFIX = ${builtins.placeholder "out"}'
+  '';
+
   buildInputs = [ xmlto docbook_xml_dtd_412 docbook_xsl libxml2 ];
+
   meta = {
     description = "A library for reading and writing gif images";
     platforms = stdenv.lib.platforms.unix;
     license = stdenv.lib.licenses.mit;
     maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
-    branch = "5.1";
+    branch = "5.2";
   };
 }
diff --git a/pkgs/development/libraries/kdb/default.nix b/pkgs/development/libraries/kdb/default.nix
index 4a403a19964e9..03eabc6447b43 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, mysql
+  qtbase, qttranslations, kcoreaddons, python2, sqlite, postgresql, libmysqlclient
 }:
 
 mkDerivation rec {
@@ -15,7 +15,7 @@ mkDerivation rec {
 
   nativeBuildInputs = [ extra-cmake-modules ];
 
-  buildInputs = [ qttranslations kcoreaddons python2 sqlite postgresql mysql.connector-c ];
+  buildInputs = [ qttranslations kcoreaddons python2 sqlite postgresql libmysqlclient ];
 
   propagatedBuildInputs = [ qtbase ];
 
diff --git a/pkgs/development/libraries/libagar/default.nix b/pkgs/development/libraries/libagar/default.nix
index 48fb0f1153e78..630b17121587e 100644
--- a/pkgs/development/libraries/libagar/default.nix
+++ b/pkgs/development/libraries/libagar/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, libtool, perl, bsdbuild, gettext, mandoc
 , libpng, libjpeg, xlibsWrapper, libXinerama, freetype, SDL, libGLU_combined
-, libsndfile, portaudio, mysql, fontconfig
+, libsndfile, portaudio, libmysqlclient, fontconfig
 }:
 
 let srcs = import ./srcs.nix { inherit fetchurl; }; in
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
     "--with-gettext=${gettext}"
     "--with-jpeg=${libjpeg.dev}"
     "--with-gl=${libGLU_combined}"
-    "--with-mysql=${mysql.connector-c}"
+    "--with-mysql=${libmysqlclient}"
     "--with-manpages=yes"
   ];
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [ pkgconfig libtool gettext ];
 
   buildInputs = [
-    bsdbuild perl xlibsWrapper libXinerama SDL libGLU_combined mysql.connector-c mandoc
+    bsdbuild perl xlibsWrapper libXinerama SDL libGLU_combined libmysqlclient mandoc
     freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
   ];
 
diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix
index 99cd636b03b8e..52b8a32fab4a5 100644
--- a/pkgs/development/libraries/libdbi-drivers/default.nix
+++ b/pkgs/development/libraries/libdbi-drivers/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, libdbi
-, mysql ? null
+, libmysqlclient ? null
 , sqlite ? null
 , postgresql ? null
 }:
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3";
   };
 
-  buildInputs = [ libdbi sqlite postgresql ] ++ optional (mysql != null) mysql.connector-c;
+  buildInputs = [ libdbi sqlite postgresql ] ++ optional (libmysqlclient != null) libmysqlclient;
 
   postPatch = ''
     sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
@@ -26,10 +26,10 @@ stdenv.mkDerivation rec {
     "--enable-libdbi"
     "--with-dbi-incdir=${libdbi}/include"
     "--with-dbi-libdir=${libdbi}/lib"
-  ] ++ optionals (mysql != null) [
+  ] ++ optionals (libmysqlclient != null) [
     "--with-mysql"
-    "--with-mysql-incdir=${mysql.connector-c}/include/mysql"
-    "--with-mysql-libdir=${mysql.connector-c}/lib/mysql"
+    "--with-mysql-incdir=${libmysqlclient}/include/mysql"
+    "--with-mysql-libdir=${libmysqlclient}/lib/mysql"
   ] ++ optionals (sqlite != null) [
     "--with-sqlite3"
     "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix
index bb6402dc42872..270326079963d 100644
--- a/pkgs/development/libraries/libgda/default.nix
+++ b/pkgs/development/libraries/libgda/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, pkgconfig, intltool, itstool, libxml2, gtk3, openssl, gnome3, gobject-introspection, vala, libgee
 , overrideCC, gcc6
-, mysqlSupport ? false, mysql ? null
+, mysqlSupport ? false, libmysqlclient ? null
 , postgresSupport ? false, postgresql ? null
 }:
 
-assert mysqlSupport -> mysql != null;
+assert mysqlSupport -> libmysqlclient != null;
 assert postgresSupport -> postgresql != null;
 
 (if stdenv.isAarch64 then overrideCC stdenv gcc6 else stdenv).mkDerivation rec {
@@ -25,7 +25,7 @@ assert postgresSupport -> postgresql != null;
 
   nativeBuildInputs = [ pkgconfig intltool itstool libxml2 gobject-introspection vala ];
   buildInputs = with stdenv.lib; [ gtk3 openssl libgee ]
-    ++ optional (mysqlSupport) mysql.connector-c
+    ++ optional (mysqlSupport) libmysqlclient
     ++ optional (postgresSupport) postgresql;
 
   passthru = {
diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix
index 9ba3cdbd09aac..ca65c3fdf8c21 100644
--- a/pkgs/development/libraries/libgdiplus/default.nix
+++ b/pkgs/development/libraries/libgdiplus/default.nix
@@ -2,33 +2,19 @@
 , libtiff, giflib, libjpeg, libpng
 , libXrender, libexif, autoreconfHook, fetchpatch }:
 
-stdenv.mkDerivation {
-  name = "libgdiplus-5.6.1";
+stdenv.mkDerivation rec {
+  pname = "libgdiplus";
+  version = "6.0.2";
 
   src = fetchFromGitHub {
     owner = "mono";
     repo = "libgdiplus";
-    rev = "5.6.1";
-    sha256 = "023xf3l2s0mxcdbl2viglzrkhx3lwcrpm66fiq7cfdqz80d4vsj2";
+    rev = version;
+    sha256 = "07a3n7i35mn5j2djah64by785b1hzy8ckk1pz0xwvk716yzb7sxg";
   };
 
   NIX_LDFLAGS = "-lgif";
 
-  patches = [ # Series of patches cherry-picked from master, all fixes various sigsegv (or required by other patch)
-    (fetchpatch {
-          url = "https://github.com/mono/libgdiplus/commit/d33a2580a94701ff33abe28c22881d6173be57d0.patch";
-          sha256 = "0rr54jylscn4icqjprqhwrncyr92r0d7kmfrrq3myskplpqv1c11";
-    })
-    (fetchpatch {
-          url ="https://github.com/mono/libgdiplus/commit/aa6aa53906935572f52f519fe4ab9ebedc051d08.patch";
-          sha256 = "1wg0avm8qv5cb4vk80baflfzszm6q7ydhn89c3h6kq68hg6zsf1f";
-    })
-    (fetchpatch {
-          url = "https://github.com/mono/libgdiplus/commit/81e45a1d5a3ac3cf035bcc3fabb2859818b6cc04.patch";
-          sha256 = "07wmc88cd1lqifs5x6npryni65jyy9gi8lgr2i1lb7v0fhvlyswg";
-    })
-  ];
-
   hardeningDisable = [ "format" ];
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix
index 844d626f49e36..773acd0353553 100644
--- a/pkgs/development/libraries/libproxy/default.nix
+++ b/pkgs/development/libraries/libproxy/default.nix
@@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  postFixup = ''
+  postFixup = stdenv.lib.optionalString stdenv.isLinux ''
     # config_gnome3 uses the helper to find GNOME proxy settings
     wrapProgram $out/libexec/pxgsettings --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
   '';
diff --git a/pkgs/development/libraries/librdf/redland.nix b/pkgs/development/libraries/librdf/redland.nix
index 30d8d8a94e9d5..8835490187d1d 100644
--- a/pkgs/development/libraries/librdf/redland.nix
+++ b/pkgs/development/libraries/librdf/redland.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, openssl, libxslt, perl
 , curl, pcre, libxml2, librdf_rasqal, gmp
-, mysql, withMysql ? false
+, libmysqlclient, withMysql ? false
 , postgresql, withPostgresql ? false
 , sqlite, withSqlite ? true
 , db, withBdb ? false
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ perl pkgconfig ];
 
   buildInputs = [ openssl libxslt curl pcre libxml2 gmp ]
-    ++ stdenv.lib.optional withMysql mysql.connector-c
+    ++ stdenv.lib.optional withMysql libmysqlclient
     ++ stdenv.lib.optional withSqlite sqlite
     ++ stdenv.lib.optional withPostgresql postgresql
     ++ stdenv.lib.optional withBdb db;
diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix
index f954aaf72457e..16ec6a5c11032 100644
--- a/pkgs/development/libraries/opendbx/default.nix
+++ b/pkgs/development/libraries/opendbx/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, readline, mysql, postgresql, sqlite }:
+{ stdenv, fetchurl, readline, libmysqlclient, postgresql, sqlite }:
 
 stdenv.mkDerivation rec {
   name = "opendbx-1.4.6";
@@ -9,12 +9,12 @@ stdenv.mkDerivation rec {
   };
 
   preConfigure = ''
-    export CPPFLAGS="-I${mysql.connector-c}/include/mysql"
-    export LDFLAGS="-L${mysql.connector-c}/lib/mysql -L${postgresql}/lib"
+    export CPPFLAGS="-I${libmysqlclient}/include/mysql"
+    export LDFLAGS="-L${libmysqlclient}/lib/mysql -L${postgresql}/lib"
     configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
   '';
 
-  buildInputs = [ readline mysql.connector-c postgresql sqlite ];
+  buildInputs = [ readline libmysqlclient postgresql sqlite ];
 
   meta = with stdenv.lib; {
     description = "Extremely lightweight but extensible database access library written in C";
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 03082eab09178..0b026ae75f4e1 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -127,8 +127,8 @@ let
 in {
 
   openssl_1_0_2 = common {
-    version = "1.0.2s";
-    sha256 = "15mbmg8hf7s12vr3v2bdc0pi9y4pdbnsxhzk4fyyap42jaa5rgfa";
+    version = "1.0.2t";
+    sha256 = "1g67ra0ph7gpz6fgvv1i96d792jmd6ymci5kk53vbikszr74djql";
     patches = [
       ./1.0.2/nix-ssl-cert-file.patch
 
@@ -139,8 +139,8 @@ in {
   };
 
   openssl_1_1 = common {
-    version = "1.1.1c";
-    sha256 = "142c7zdlz06hjrrvinb9f276czc78bnkyhd9xma621qmmmwk1yzn";
+    version = "1.1.1d";
+    sha256 = "1whinyw402z3b9xlb3qaxv4b9sk4w1bgh9k0y8df1z4x3yy92fhy";
     patches = [
       ./1.1/nix-ssl-cert-file.patch
 
diff --git a/pkgs/development/libraries/poco/default.nix b/pkgs/development/libraries/poco/default.nix
index c19e343f19aec..e69ed0236f486 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, mysql }:
+{ stdenv, fetchurl, cmake, pkgconfig, zlib, pcre, expat, sqlite, openssl, unixODBC, libmysqlclient }:
 
 stdenv.mkDerivation rec {
   pname = "poco";
@@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkgconfig ];
 
-  buildInputs = [ zlib pcre expat sqlite openssl unixODBC mysql.connector-c ];
+  buildInputs = [ zlib pcre expat sqlite openssl unixODBC libmysqlclient ];
 
-  MYSQL_DIR = mysql.connector-c;
+  MYSQL_DIR = libmysqlclient;
   MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
 
   cmakeFlags = [
diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix
index 3b3f406485c7d..a46dcec031283 100644
--- a/pkgs/development/libraries/qt-3/default.nix
+++ b/pkgs/development/libraries/qt-3/default.nix
@@ -5,7 +5,7 @@
 , xineramaSupport ? true, libXinerama ? null
 , cursorSupport ? true, libXcursor ? null
 , threadSupport ? true
-, mysqlSupport ? false, mysql ? null
+, mysqlSupport ? false, libmysqlclient ? null
 , libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
 , openglSupport ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
 , libGLU_combined ? null, libXmu ? null
@@ -16,7 +16,7 @@ assert xftSupport -> libXft != null;
 assert xrenderSupport -> xftSupport && libXrender != null;
 assert xrandrSupport -> libXrandr != null;
 assert cursorSupport -> libXcursor != null;
-assert mysqlSupport -> mysql != null;
+assert mysqlSupport -> libmysqlclient != null;
 assert openglSupport -> libGLU_combined != null && libXmu != null;
 
 stdenv.mkDerivation {
@@ -62,7 +62,7 @@ stdenv.mkDerivation {
   ] ++ stdenv.lib.optionals cursorSupport [
     "-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
   ] ++ stdenv.lib.optionals mysqlSupport [
-    "-qt-sql-mysql" "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql"
+    "-qt-sql-mysql" "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql"
   ] ++ stdenv.lib.optionals xftSupport [
     "-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 b5a10e8f11a75..7c7f8f51de7dd 100644
--- a/pkgs/development/libraries/qt-4.x/4.8/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix
@@ -2,7 +2,7 @@
 , libXrender, libXinerama, libXcursor, libXv, libXext
 , libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng
 , libmng, which, libGLU, openssl, dbus, cups, pkgconfig
-, libtiff, glib, icu, mysql, postgresql, sqlite, perl, coreutils, libXi
+, libtiff, glib, icu, libmysqlclient, postgresql, sqlite, perl, coreutils, libXi
 , buildMultimedia ? stdenv.isLinux, alsaLib, gstreamer, gst-plugins-base
 , buildWebkit ? (stdenv.isLinux || stdenv.isDarwin)
 , libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
@@ -166,7 +166,7 @@ stdenv.mkDerivation rec {
     (mk (!stdenv.isFreeBSD) "opengl") "-xrender" "-xrandr" "-xinerama" "-xcursor" "-xinput" "-xfixes" "-fontconfig"
     "-qdbus" (mk (cups != null) "cups") "-glib" "-dbus-linked" "-openssl-linked"
 
-    "-${if mysql != null then "plugin" else "no"}-sql-mysql" "-system-sqlite"
+    "-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql" "-system-sqlite"
 
     "-exceptions" "-xmlpatterns"
 
@@ -192,7 +192,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ cups # Qt dlopen's libcups instead of linking to it
       postgresql sqlite libjpeg libmng libtiff icu ]
-    ++ lib.optionals (mysql != null) [ mysql.connector-c ]
+    ++ lib.optionals (libmysqlclient != null) [ libmysqlclient ]
     ++ lib.optionals gtkStyle [ gtk2 gdk-pixbuf ]
     ++ lib.optionals stdenv.isDarwin [ ApplicationServices OpenGL Cocoa AGL libcxx libobjc ];
 
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index e2c71a77062eb..8119513618b24 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -14,7 +14,7 @@
   zlib,
 
   # optional dependencies
-  cups ? null, mysql ? null, postgresql ? null,
+  cups ? null, libmysqlclient ? null, postgresql ? null,
   withGtk3 ? false, dconf ? null, gtk3 ? null,
 
   # options
@@ -80,7 +80,7 @@ stdenv.mkDerivation {
     )
     ++ lib.optional developerBuild gdb
     ++ lib.optional (cups != null) cups
-    ++ lib.optional (mysql != null) mysql.connector-c
+    ++ lib.optional (libmysqlclient != null) libmysqlclient
     ++ lib.optional (postgresql != null) postgresql;
 
   nativeBuildInputs =
@@ -285,7 +285,7 @@ stdenv.mkDerivation {
       "-L" "${openssl.out}/lib"
       "-I" "${openssl.dev}/include"
       "-system-sqlite"
-      ''-${if mysql != null then "plugin" else "no"}-sql-mysql''
+      ''-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql''
       ''-${if postgresql != null then "plugin" else "no"}-sql-psql''
 
       "-make libs"
@@ -349,9 +349,9 @@ stdenv.mkDerivation {
           "-L" "${cups.lib}/lib"
           "-I" "${cups.dev}/include"
         ]
-        ++ lib.optionals (mysql != null) [
-          "-L" "${mysql.out}/lib"
-          "-I" "${mysql.out}/include"
+        ++ lib.optionals (libmysqlclient != null) [
+          "-L" "${libmysqlclient}/lib"
+          "-I" "${libmysqlclient}/include"
         ]
     );
 
diff --git a/pkgs/development/libraries/tntdb/default.nix b/pkgs/development/libraries/tntdb/default.nix
index 13b4e6b97a9a1..2d6ae3f18cad8 100644
--- a/pkgs/development/libraries/tntdb/default.nix
+++ b/pkgs/development/libraries/tntdb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cxxtools, postgresql, mysql, sqlite, zlib, openssl }:
+{ stdenv, fetchurl, cxxtools, postgresql, libmysqlclient, sqlite, zlib, openssl }:
 
 stdenv.mkDerivation rec {
   pname = "tntdb";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "0js79dbvkic30bzw1pf26m64vs2ssw2sbj55w1dc0sy69dlv4fh9";
   };
 
-  buildInputs = [ cxxtools postgresql mysql.connector-c sqlite zlib openssl ];
+  buildInputs = [ cxxtools postgresql libmysqlclient sqlite zlib openssl ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix
index b9aa1696d4878..44e7ed17f0c67 100644
--- a/pkgs/development/libraries/unixODBCDrivers/default.nix
+++ b/pkgs/development/libraries/unixODBCDrivers/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, unixODBC, cmake, postgresql, mysql, mariadb, sqlite, zlib, libxml2, dpkg, lib, kerberos, curl, libuuid, autoPatchelfHook }:
+{ fetchurl, stdenv, unixODBC, cmake, postgresql, mysql, libmysqlclient, sqlite, zlib, libxml2, dpkg, lib, openssl, kerberos, curl, libuuid, autoPatchelfHook }:
 
 # I haven't done any parameter tweaking.. So the defaults provided here might be bad
 
@@ -29,18 +29,23 @@
 
   mariadb = stdenv.mkDerivation rec {
     pname = "mariadb-connector-odbc";
-    version = "2.0.10";
+    version = "3.1.2";
 
     src = fetchurl {
-      url = "https://downloads.mariadb.org/interstitial/connector-odbc-${version}/src/${pname}-${version}-ga-src.tar.gz";
-      sha256 = "0b6ximy0dg0xhqbrm1l7pn8hjapgpmddi67kh54h6i9cq9hqfdvz";
+      url = "https://downloads.mariadb.org/interstitial/connector-odbc-${version}/${pname}-${version}-ga-src.tar.gz";
+      sha256 = "0iibly2mbqijqyq4pzpb6dh40clqhvqrhgnj8knm4bw3nlksd0d5";
     };
 
     nativeBuildInputs = [ cmake ];
-    buildInputs = [ unixODBC mariadb.connector-c ];
+    buildInputs = [ unixODBC libmysqlclient openssl ];
 
     cmakeFlags = [
-      "-DMARIADB_INCLUDE_DIR=${mariadb.connector-c}/include/mariadb"
+      "-DWITH_OPENSSL=ON"
+    ];
+
+   NIX_CFLAGS_COMPILE = [
+     "-I${libmysqlclient}/include/mysql"
+     "-L${libmysqlclient}/lib/mysql"
     ];
 
     passthru = {
diff --git a/pkgs/development/libraries/wt/default.nix b/pkgs/development/libraries/wt/default.nix
index 319b0effc5788..31fa104fb059d 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, mysql, postgresql, graphicsmagick, glew, openssl
+, pango, fcgi, firebird, libmysqlclient, postgresql, graphicsmagick, glew, openssl
 , pcre, harfbuzz
 }:
 
@@ -22,7 +22,7 @@ let
       nativeBuildInputs = [ pkgconfig ];
       buildInputs = [
         cmake boost doxygen qt48Full libharu
-        pango fcgi firebird mysql.connector-c postgresql graphicsmagick glew
+        pango fcgi firebird libmysqlclient postgresql graphicsmagick glew
         openssl pcre
       ];
 
@@ -30,7 +30,7 @@ let
         "-DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick"
         "-DWT_CPP_11_MODE=-std=c++11"
         "-DGM_PREFIX=${graphicsmagick}"
-        "-DMYSQL_PREFIX=${mysql.connector-c}"
+        "-DMYSQL_PREFIX=${libmysqlclient}"
         "-DHARFBUZZ_INCLUDE_DIR=${harfbuzz.dev}/include"
         "--no-warn-unused-cli"
       ];
diff --git a/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix b/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
index 052bfb1194987..acc98215af01c 100644
--- a/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
+++ b/pkgs/development/lisp-modules/quicklisp-to-nix-overrides.nix
@@ -53,11 +53,11 @@ in
   cl-async-ssl = addNativeLibs [pkgs.openssl (import ./openssl-lib-marked.nix)];
   cl-async-test = addNativeLibs [pkgs.openssl];
   clsql = x: {
-    propagatedBuildInputs = with pkgs; [mysql.connector-c postgresql sqlite zlib];
+    propagatedBuildInputs = with pkgs; [libmysqlclient postgresql sqlite zlib];
     overrides = y: (x.overrides y) // {
       preConfigure = ((x.overrides y).preConfigure or "") + ''
-        export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.mysql.connector-c}/include/mysql"
-        export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.mysql.connector-c}/lib/mysql"
+        export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.libmysqlclient}/include/mysql"
+        export NIX_LDFLAGS="$NIX_LDFLAGS -L${pkgs.libmysqlclient}/lib/mysql"
       '';
     };
   };
@@ -77,7 +77,7 @@ $out/lib/common-lisp/query-fs"
     };
   };
   cffi = addNativeLibs [pkgs.libffi];
-  cl-mysql = addNativeLibs [pkgs.mysql];
+  cl-mysql = addNativeLibs [pkgs.libmysqlclient];
   cl-ppcre-template = x: {
     overrides = y: (x.overrides y) // {
       postPatch = ''
diff --git a/pkgs/development/lisp-modules/shell.nix b/pkgs/development/lisp-modules/shell.nix
index b3d50b2fb0757..4a1f9ded56c87 100644
--- a/pkgs/development/lisp-modules/shell.nix
+++ b/pkgs/development/lisp-modules/shell.nix
@@ -6,11 +6,11 @@ self = rec {
   env = buildEnv { name = name; paths = buildInputs; };
   buildInputs = [
     gcc stdenv
-    openssl fuse libuv mysql.connector-c libfixposix libev sqlite
+    openssl fuse libuv libmysqlclient libfixposix libev sqlite
     freetds
     lispPackages.quicklisp-to-nix lispPackages.quicklisp-to-nix-system-info
   ];
   CPATH = "${libfixposix}/include";
-  LD_LIBRARY_PATH = "${openssl.out}/lib:${fuse}/lib:${libuv}/lib:${libev}/lib:${mysql.connector-c}/lib:${mysql.connector-c}/lib/mysql:${postgresql.lib}/lib:${sqlite.out}/lib:${libfixposix}/lib:${freetds}/lib:${openssl_lib_marked}/lib";
+  LD_LIBRARY_PATH = "${openssl.out}/lib:${fuse}/lib:${libuv}/lib:${libev}/lib:${libmysqlclient}/lib:${libmysqlclient}/lib/mysql:${postgresql.lib}/lib:${sqlite.out}/lib:${libfixposix}/lib:${freetds}/lib:${openssl_lib_marked}/lib";
 };
 in stdenv.mkDerivation self
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index 233503c2eca86..41dae8347eede 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -154,12 +154,12 @@ with super;
   luadbi-mysql = super.luadbi-mysql.override({
     extraVariables = ''
       -- Can't just be /include and /lib, unfortunately needs the trailing 'mysql'
-      MYSQL_INCDIR='${pkgs.mysql.connector-c}/include/mysql';
-      MYSQL_LIBDIR='${pkgs.mysql.connector-c}/lib/mysql';
+      MYSQL_INCDIR='${pkgs.libmysqlclient}/include/mysql';
+      MYSQL_LIBDIR='${pkgs.libmysqlclient}/lib/mysql';
     '';
     buildInputs = [
       pkgs.mysql.client
-      pkgs.mysql.connector-c
+      pkgs.libmysqlclient
     ];
   });
 
diff --git a/pkgs/development/ocaml-modules/mysql/default.nix b/pkgs/development/ocaml-modules/mysql/default.nix
index 1986f7e48f69e..9be5ebf8a7bc9 100644
--- a/pkgs/development/ocaml-modules/mysql/default.nix
+++ b/pkgs/development/ocaml-modules/mysql/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, ocaml, findlib, mysql }:
+{ stdenv, fetchurl, fetchpatch, ocaml, findlib, libmysqlclient }:
 
 # TODO: la versione stabile da' un errore di compilazione dovuto a
 # qualche cambiamento negli header .h
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   createFindlibDestdir = true;
 
-  propagatedBuildInputs = [ mysql.connector-c ];
+  propagatedBuildInputs = [ libmysqlclient ];
 
   patches = [
     (fetchpatch {
diff --git a/pkgs/development/perl-modules/DBD-mysql/default.nix b/pkgs/development/perl-modules/DBD-mysql/default.nix
index 6eed57c4e7c67..eb53933960322 100644
--- a/pkgs/development/perl-modules/DBD-mysql/default.nix
+++ b/pkgs/development/perl-modules/DBD-mysql/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, buildPerlPackage, DBI, DevelChecklib, mysql }:
+{ fetchurl, buildPerlPackage, DBI, DevelChecklib, libmysqlclient }:
 
 buildPerlPackage {
   pname = "DBD-mysql";
@@ -9,7 +9,7 @@ buildPerlPackage {
     sha256 = "0y4djb048i09dk19av7mzfb3khr72vw11p3ayw2p82jsy4gm8j2g";
   };
 
-  buildInputs = [ mysql.connector-c DevelChecklib ] ;
+  buildInputs = [ libmysqlclient DevelChecklib ] ;
   propagatedBuildInputs = [ DBI ];
 
   doCheck = false;
diff --git a/pkgs/development/pure-modules/glpk/default.nix b/pkgs/development/pure-modules/glpk/default.nix
index 7b615928da9aa..34d12f1471fb1 100644
--- a/pkgs/development/pure-modules/glpk/default.nix
+++ b/pkgs/development/pure-modules/glpk/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl,
-  pkgconfig, pure, glpk, gmp, libtool, mysql, libiodbc }:
+  pkgconfig, pure, glpk, gmp, libtool, libmysqlclient, libiodbc }:
 
 stdenv.mkDerivation rec {
   baseName = "glpk";
@@ -12,13 +12,13 @@ stdenv.mkDerivation rec {
   };
 
   glpkWithExtras = lib.overrideDerivation glpk (attrs: {
-    propagatedBuildInputs = [ gmp libtool mysql.connector-c libiodbc ];
+    propagatedBuildInputs = [ gmp libtool libmysqlclient libiodbc ];
 
     CPPFLAGS = "-I${gmp.dev}/include";
 
     preConfigure = ''
       substituteInPlace configure \
-        --replace /usr/include/mysql ${mysql.connector-c}/include/mysql
+        --replace /usr/include/mysql ${libmysqlclient}/include/mysql
     '';
     configureFlags = [ "--enable-dl"
                        "--enable-odbc"
diff --git a/pkgs/development/python-modules/algebraic-data-types/default.nix b/pkgs/development/python-modules/algebraic-data-types/default.nix
new file mode 100644
index 0000000000000..4b4986795ce12
--- /dev/null
+++ b/pkgs/development/python-modules/algebraic-data-types/default.nix
@@ -0,0 +1,28 @@
+{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, hypothesis, mypy }:
+
+buildPythonPackage rec {
+  pname = "algebraic-data-types";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "jspahrsummers";
+    repo = "adt";
+    rev = "v" + version;
+    sha256 = "1py94jsgh6wch59n9dxnwvk74psbpa1679zfmripa1qfc2218kqi";
+  };
+
+  disabled = pythonOlder "3.6";
+
+  checkInputs = [
+    hypothesis
+    mypy
+  ];
+
+  meta = with lib; {
+    description = "Algebraic data types for Python";
+    homepage = https://github.com/jspahrsummers/adt;
+    license = licenses.mit;
+    maintainers = with maintainers; [ uri-canva ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix
index 6b20b4b570a33..2a5d4fa475738 100644
--- a/pkgs/development/python-modules/cryptography/default.nix
+++ b/pkgs/development/python-modules/cryptography/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , openssl
 , cryptography_vectors
 , darwin
@@ -49,10 +50,18 @@ buildPythonPackage rec {
     pytz
   ];
 
+  # remove when https://github.com/pyca/cryptography/issues/4998 is fixed
   checkPhase = ''
-    py.test --disable-pytest-warnings tests
+    py.test --disable-pytest-warnings tests -k 'not load_ecdsa_no_named_curve'
   '';
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/pyca/cryptography/commit/e575e3d482f976c4a1f3203d63ea0f5007a49a2a.patch";
+      sha256 = "0vg9prqsizd6gzh5j7lscsfxzxlhz7pacvzhgqmj1vhdhjwbblcp";
+    })
+  ];
+
   # IOKit's dependencies are inconsistent between OSX versions, so this is the best we
   # can do until nix 1.11's release
   __impureHostDeps = [ "/usr/lib" ];
diff --git a/pkgs/development/python-modules/ledgerblue/default.nix b/pkgs/development/python-modules/ledgerblue/default.nix
index 3f9f58b5203f2..3e2c1f1356ac3 100644
--- a/pkgs/development/python-modules/ledgerblue/default.nix
+++ b/pkgs/development/python-modules/ledgerblue/default.nix
@@ -1,18 +1,19 @@
 { stdenv, fetchPypi, buildPythonPackage, hidapi
 , pycrypto, pillow, protobuf, future, ecpy, python-u2flib-host, pycryptodomex
+, websocket_client
 }:
 
 buildPythonPackage rec {
   pname = "ledgerblue";
-  version = "0.1.24";
+  version = "0.1.28";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "fc111ed5db8da93f280928d966f9d87416b464f5f09cec80b60e88c4c1265026";
+    sha256 = "1jfh4gb3f16ga1ircwiyg7dldldmhn0a5slbpqsqr2g6mlqihpmd";
   };
 
   propagatedBuildInputs = [
-    hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex
+    hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex websocket_client
   ];
 
   # No tests
diff --git a/pkgs/development/python-modules/lxml/default.nix b/pkgs/development/python-modules/lxml/default.nix
index 816b3a6768287..fca4366e8a0e5 100644
--- a/pkgs/development/python-modules/lxml/default.nix
+++ b/pkgs/development/python-modules/lxml/default.nix
@@ -15,7 +15,7 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [ libxml2.dev libxslt.dev ];
-  buildInputs = [ libxml2 libxslt ];
+  propagatedBuildInputs = [ libxml2 libxslt ];
 
   hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";
 
diff --git a/pkgs/development/python-modules/mypy/default.nix b/pkgs/development/python-modules/mypy/default.nix
index c5ca8e1f4b571..d4361baf903a7 100644
--- a/pkgs/development/python-modules/mypy/default.nix
+++ b/pkgs/development/python-modules/mypy/default.nix
@@ -3,14 +3,14 @@
 
 buildPythonPackage rec {
   pname = "mypy";
-  version = "0.701";
+  version = "0.711";
 
   # Tests not included in pip package.
   doCheck = false;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "05479r3gbq17r22hyhxjg49smx5q864pgx8ayy23rsdj4w6z2r2p";
+    sha256 = "0s1kwi1dhrv55v0c9w7c1g6mq5d2dpw7x1jj5mcnniw77mclmvdv";
   };
 
   disabled = !isPy3k;
diff --git a/pkgs/development/python-modules/mysqlclient/default.nix b/pkgs/development/python-modules/mysqlclient/default.nix
index 488f6f9a7bb54..b37f191286e4c 100644
--- a/pkgs/development/python-modules/mysqlclient/default.nix
+++ b/pkgs/development/python-modules/mysqlclient/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, buildPythonPackage, fetchPypi, mysql }:
+{ stdenv, buildPythonPackage, fetchPypi, libmysqlclient }:
 
 buildPythonPackage rec {
   pname = "mysqlclient";
   version = "1.4.4";
 
   nativeBuildInputs = [
-    mysql.connector-c
+    libmysqlclient
   ];
 
   buildInputs = [
-    mysql.connector-c
+    libmysqlclient
   ];
 
   # Tests need a MySQL database
diff --git a/pkgs/development/python-modules/ncclient/default.nix b/pkgs/development/python-modules/ncclient/default.nix
index 10baadcab3023..02e2a1b472a72 100644
--- a/pkgs/development/python-modules/ncclient/default.nix
+++ b/pkgs/development/python-modules/ncclient/default.nix
@@ -4,8 +4,6 @@
 , paramiko
 , selectors2
 , lxml
-, libxml2
-, libxslt
 , nose
 , rednose
 }:
@@ -22,7 +20,7 @@ buildPythonPackage rec {
   checkInputs = [ nose rednose ];
 
   propagatedBuildInputs = [
-    paramiko lxml libxml2 libxslt selectors2
+    paramiko lxml selectors2
   ];
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix
index ec17b77ba200f..018463ead5464 100644
--- a/pkgs/development/python-modules/pyopenssl/default.nix
+++ b/pkgs/development/python-modules/pyopenssl/default.nix
@@ -9,6 +9,7 @@
 , pretend
 , flaky
 , glibcLocales
+, six
 }:
 
 with stdenv.lib;
@@ -84,7 +85,7 @@ buildPythonPackage rec {
   doCheck = !stdenv.isDarwin;
 
   nativeBuildInputs = [ openssl ];
-  propagatedBuildInputs = [ cryptography pyasn1 idna ];
+  propagatedBuildInputs = [ cryptography pyasn1 idna six ];
 
   checkInputs = [ pytest pretend flaky glibcLocales ];
 }
diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix
index 6b25ba93ef9ba..76508d1ec96ff 100644
--- a/pkgs/development/python-modules/python-language-server/default.nix
+++ b/pkgs/development/python-modules/python-language-server/default.nix
@@ -1,6 +1,6 @@
 { stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
 , backports_functools_lru_cache, configparser, futures, future, jedi, pluggy, python-jsonrpc-server
-, pytest, mock, pytestcov, coverage
+, pytest, mock, pytestcov, coverage, setuptools
 , # Allow building a limited set of providers, e.g. ["pycodestyle"].
   providers ? ["*"]
   # The following packages are optional and
@@ -44,7 +44,7 @@ buildPythonPackage rec {
     HOME=$TEMPDIR pytest
   '';
 
-  propagatedBuildInputs = [ jedi pluggy future python-jsonrpc-server ]
+  propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server ]
     ++ stdenv.lib.optional (withProvider "autopep8") autopep8
     ++ stdenv.lib.optional (withProvider "mccabe") mccabe
     ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle
diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix
index 503b899ec22d4..c3cc1baaf43fe 100644
--- a/pkgs/development/python-modules/sentry-sdk/default.nix
+++ b/pkgs/development/python-modules/sentry-sdk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, urllib3, certifi }:
+{ stdenv, buildPythonPackage, fetchPypi, urllib3, certifi, django, flask, tornado, sanic, aiohttp, bottle, rq, falcon, pyramid, celery }:
 
 buildPythonPackage rec {
   pname = "sentry-sdk";
@@ -9,6 +9,8 @@ buildPythonPackage rec {
     sha256 = "f5819df450d7b0696be69a0c6d70a09e4890a3844ee8ccb7a461794135bd5965";
   };
 
+  checkInputs = [ django flask tornado sanic aiohttp bottle rq falcon pyramid celery ];
+
   propagatedBuildInputs = [ urllib3 certifi ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/typed-ast/default.nix b/pkgs/development/python-modules/typed-ast/default.nix
index f540cf72877a7..0514be0fb4d4b 100644
--- a/pkgs/development/python-modules/typed-ast/default.nix
+++ b/pkgs/development/python-modules/typed-ast/default.nix
@@ -1,10 +1,12 @@
-{ buildPythonPackage, fetchPypi, lib, pythonOlder }:
+{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder }:
 buildPythonPackage rec {
   pname = "typed-ast";
-  version = "1.3.5";
-  src = fetchPypi{
-    inherit pname version;
-    sha256 = "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak";
+  version = "1.4.0";
+  src = fetchFromGitHub{
+    owner = "python";
+    repo = "typed_ast";
+    rev = version;
+    sha256 = "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb";
   };
   # Only works with Python 3.3 and newer;
   disabled = pythonOlder "3.3";
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index 1616eacffc651..cef7f0aecf260 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -325,7 +325,7 @@ let
     rmatio = [ pkgs.zlib.dev ];
     Rmpfr = [ pkgs.gmp pkgs.mpfr.dev ];
     Rmpi = [ pkgs.openmpi ];
-    RMySQL = [ pkgs.zlib pkgs.mysql.connector-c pkgs.openssl.dev ];
+    RMySQL = [ pkgs.zlib pkgs.libmysqlclient pkgs.openssl.dev ];
     RNetCDF = [ pkgs.netcdf pkgs.udunits ];
     RODBCext = [ pkgs.libiodbc ];
     RODBC = [ pkgs.libiodbc ];
@@ -810,7 +810,7 @@ let
     });
 
     RMySQL = old.RMySQL.overrideDerivation (attrs: {
-      MYSQL_DIR=pkgs.mysql.connector-c;
+      MYSQL_DIR="${pkgs.libmysqlclient}";
       preConfigure = ''
         patchShebangs configure
       '';
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index a03e40e8097cf..157e15e375f64 100644
--- a/pkgs/development/ruby-modules/gem-config/default.nix
+++ b/pkgs/development/ruby-modules/gem-config/default.nix
@@ -20,7 +20,7 @@
 { lib, fetchurl, writeScript, ruby, kerberos, libxml2, libxslt, python, stdenv, which
 , libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick
 , pkgconfig , ncurses, xapian, gpgme, utillinux, tzdata, icu, libffi
-, cmake, libssh2, openssl, mysql, darwin, git, perl, pcre, gecode_3, curl
+, cmake, libssh2, openssl, libmysqlclient, darwin, git, perl, pcre, gecode_3, curl
 , msgpack, qt59, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem
 , cairo, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx
 , file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz
@@ -349,11 +349,11 @@ in
   };
 
   mysql = attrs: {
-    buildInputs = [ mysql.connector-c zlib openssl ];
+    buildInputs = [ libmysqlclient zlib openssl ];
   };
 
   mysql2 = attrs: {
-    buildInputs = [ mysql.connector-c zlib openssl ];
+    buildInputs = [ libmysqlclient zlib openssl ];
   };
 
   ncursesw = attrs: {
diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix
index ff630242c933b..d44a6666ee9fc 100644
--- a/pkgs/development/tools/ammonite/default.nix
+++ b/pkgs/development/tools/ammonite/default.nix
@@ -1,30 +1,27 @@
-{ stdenv, lib, fetchurl, makeWrapper, jre, gnused
+{ stdenv, fetchurl, jre
 , disableRemoteLogging ? true
 }:
 
 with stdenv.lib;
+
+let
+common = { scalaVersion, sha256 }:
 stdenv.mkDerivation rec {
   pname = "ammonite";
   version = "1.7.1";
-  scalaVersion = "2.12";
 
   src = fetchurl {
     url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${scalaVersion}-${version}";
-    sha256 = "0isg9flnzc2ldbx6q0lg0xyg9lnvqkd8qhgfln8p1hbzdq0n6jd0";
+    inherit sha256;
   };
 
-  propagatedBuildInputs = [ jre ] ;
-  buildInputs = [ makeWrapper gnused ] ;
-
   phases = "installPhase";
 
   installPhase = ''
-    mkdir -p $out/bin
-    cp ${src} $out/bin/amm
-    chmod +x $out/bin/amm
-    ${gnused}/bin/sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
+    install -Dm755 ${src} $out/bin/amm
+    sed -i '0,/java/{s|java|${jre}/bin/java|}' $out/bin/amm
   '' + optionalString (disableRemoteLogging) ''
-    ${gnused}/bin/sed -i '0,/ammonite.Main/{s|ammonite.Main|ammonite.Main --no-remote-logging|}' $out/bin/amm
+    sed -i '0,/ammonite.Main/{s|ammonite.Main|ammonite.Main --no-remote-logging|}' $out/bin/amm
   '';
 
   meta = {
@@ -36,8 +33,12 @@ stdenv.mkDerivation rec {
         that may be familiar to people coming from IDEs or other REPLs such as IPython or Zsh.
     '';
     homepage = http://www.lihaoyi.com/Ammonite/;
-    license = lib.licenses.mit;
-    platforms = lib.platforms.all;
-    maintainers = [ lib.maintainers.nequissimus ];
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.nequissimus ];
   };
+};
+in {
+  ammonite_2_12 = common { scalaVersion = "2.12"; sha256 = "0isg9flnzc2ldbx6q0lg0xyg9lnvqkd8qhgfln8p1hbzdq0n6jd0"; };
+  ammonite_2_13 = common { scalaVersion = "2.13"; sha256 = "01dyc6bilhcr1mwrpmhjc8nhzfqgjh44bx36gd3gk9mkvlbys5mp"; };
 }
diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix
index f4c7047e8de2e..2d7d99bb39374 100644
--- a/pkgs/development/tools/analysis/flow/default.nix
+++ b/pkgs/development/tools/analysis/flow/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "flow";
-  version = "0.107.0";
+  version = "0.108.0";
 
   src = fetchFromGitHub {
     owner  = "facebook";
     repo   = "flow";
     rev    = "refs/tags/v${version}";
-    sha256 = "1in7a006lgw4v2p0gn5sx41cn3p259vncpq0l3rz52lyfpn7ai3b";
+    sha256 = "13irr1hkv7mxvq57pywmjmqdf5fv359vl5d19w3sra3rqg7vi3ws";
   };
 
   installPhase = ''
diff --git a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
index d25367c3e5729..f08a2e563429a 100644
--- a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
+++ b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
@@ -17,10 +17,10 @@ in stdenv.mkDerivation rec {
   pname = "redo-apenwarr";
   version = "0.42";
 
-  src = fetchFromGitHub {
+  src = fetchFromGitHub rec {
     owner = "apenwarr";
-    repo = pname;
-    rev = "${pname}-${version}";
+    repo = "redo";
+    rev = "${repo}-${version}";
     sha256 = "1060yb7hrxm8c7bfvb0y4j0acpxsj6hbykw1d9549zpkxxr9nsgm";
   };
 
diff --git a/pkgs/development/tools/misc/hydra-cli/default.nix b/pkgs/development/tools/misc/hydra-cli/default.nix
new file mode 100644
index 0000000000000..24ca98118bdcd
--- /dev/null
+++ b/pkgs/development/tools/misc/hydra-cli/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, pkgconfig, openssl, fetchFromGitHub, rustPlatform, darwin }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "hydra-cli";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "nlewo";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1jdlmc45hwblcxs6hvy3gi2dr7qyzs1sg5zr26jrpxrbvqqzrdhc";
+  };
+
+  cargoSha256 = "0dqj2pdqfbgg8r3h2s07p3m9zgl9xl4vislbqs6a0f1ahrczlda5";
+
+  buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    openssl
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A client for the Hydra CI";
+    homepage = "https://github.com/nlewo/hydra-cli";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ gilligan lewo ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix
index 77d03f299f4a5..db8bb4f424356 100644
--- a/pkgs/development/tools/misc/patchelf/default.nix
+++ b/pkgs/development/tools/misc/patchelf/default.nix
@@ -1,16 +1,27 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, autoreconfHook }:
 
 stdenv.mkDerivation rec {
-  name = "patchelf-0.9";
+  name = "patchelf-${version}";
+  version = "0.10";
 
   src = fetchurl {
     url = "https://nixos.org/releases/patchelf/${name}/${name}.tar.bz2";
-    sha256 = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83";
+    sha256 = "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n";
   };
 
+  # Drop test that fails on musl (?)
+  postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace tests/Makefile.am \
+      --replace "set-rpath-library.sh" ""
+  '';
+
   setupHook = [ ./setup-hook.sh ];
 
-  doCheck = false; # fails 8 out of 24 tests, problems when loading libc.so.6
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ ];
+
+  # if not Musl, fails 8 out of 25 tests, problems when loading libc.so.6
+  doCheck = stdenv.hostPlatform.isMusl;
 
   meta = with stdenv.lib; {
     homepage = https://nixos.org/patchelf.html;
diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix
index c673bd261098a..f5ff1c74bcc9d 100644
--- a/pkgs/development/tools/misc/patchelf/unstable.nix
+++ b/pkgs/development/tools/misc/patchelf/unstable.nix
@@ -1,24 +1,18 @@
-{ stdenv, fetchFromGitHub, autoreconfHook }:
+{ stdenv, fetchurl, autoreconfHook }:
 
 stdenv.mkDerivation rec {
-  pname = "patchelf";
-  version = "0.10-pre-20190328";
+  name = "patchelf-${version}";
+  version = "0.10";
 
-  src = fetchFromGitHub {
-    owner = "NixOS";
-    repo = "patchelf";
-    rev = "e1e39f3639e39360ceebb2f7ed533cede4623070";
-    sha256 = "09q1b1yqfzg1ih51v7qjh55vxfdbd8x5anycl8sfz6qy107wr02k";
+  src = fetchurl {
+    url = "https://nixos.org/releases/patchelf/${name}/${name}.tar.bz2";
+    sha256 = "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n";
   };
 
   # Drop test that fails on musl (?)
   postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
     substituteInPlace tests/Makefile.am \
       --replace "set-rpath-library.sh" ""
-  '' +
-  # extend version identifier to more informative than "0.10".
-  ''
-    echo -n ${version} > version
   '';
 
   setupHook = [ ./setup-hook.sh ];
@@ -28,11 +22,11 @@ stdenv.mkDerivation rec {
 
   doCheck = !stdenv.isDarwin;
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = https://nixos.org/patchelf.html;
-    license = "GPL";
+    license = licenses.gpl3;
     description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-    platforms = stdenv.lib.platforms.all;
+    maintainers = [ maintainers.eelco ];
+    platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix
index e2d507ab80134..8076925f29b02 100644
--- a/pkgs/development/tools/misc/sysbench/default.nix
+++ b/pkgs/development/tools/misc/sysbench/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, vim, mysql
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, vim, libmysqlclient
 , libaio }:
 
 stdenv.mkDerivation {
   name = "sysbench-1.0.17";
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
-  buildInputs = [ vim mysql.connector-c libaio ];
+  buildInputs = [ vim libmysqlclient libaio ];
 
   src = fetchFromGitHub {
     owner = "akopytov";
diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix
index 12f0b13a6602a..eac81aa7f1717 100644
--- a/pkgs/development/tools/misc/ycmd/default.nix
+++ b/pkgs/development/tools/misc/ycmd/default.nix
@@ -1,18 +1,19 @@
 { stdenv, lib, fetchgit, cmake, llvmPackages, boost, python
 , gocode ? null
 , godef ? null
+, gotools ? null
 , rustracerd ? null
 , fixDarwinDylibNames, Cocoa ? null
 }:
 
 stdenv.mkDerivation {
   pname = "ycmd";
-  version = "2018-09-20";
+  version = "2019-09-19";
 
   src = fetchgit {
     url = "https://github.com/Valloric/ycmd.git";
-    rev = "bf658fd78722c517674c0aaf2381e199bca8f163";
-    sha256 = "1lwa8xr76vapfpncvp81cn3m9219yw14fl7fzk5gnly60zkphbbl";
+    rev = "c6d360775b0c5c82e2513dce7b625f8bf3812702";
+    sha256 = "19rxlval20gg65xc5p7q9cnzfm9zw2j0m6vxxk0vqlalcyh0rnzd";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -49,18 +50,28 @@ stdenv.mkDerivation {
     mkdir -p $out/bin
     ln -s $out/lib/ycmd/ycmd/__main__.py $out/bin/ycmd
 
-    mkdir -p $out/lib/ycmd/third_party/{gocode,godef,racerd/target/release}
-
-    for p in jedi waitress frozendict bottle parso python-future requests; do
-      cp -r third_party/$p $out/lib/ycmd/third_party
-    done
+    # Copy everything: the structure of third_party has been known to change.
+    # When linking our own libraries below, do so with '-f'
+    # to clobber anything we may have copied here.
+    mkdir -p $out/lib/ycmd/third_party
+    cp -r third_party/* $out/lib/ycmd/third_party/
 
   '' + lib.optionalString (gocode != null) ''
-    ln -s ${gocode}/bin/gocode $out/lib/ycmd/third_party/gocode
+    TARGET=$out/lib/ycmd/third_party/gocode
+    mkdir -p $TARGET
+    ln -sf ${gocode}/bin/gocode $TARGET
   '' + lib.optionalString (godef != null) ''
-    ln -s ${godef}/bin/godef $out/lib/ycmd/third_party/godef
+    TARGET=$out/lib/ycmd/third_party/godef
+    mkdir -p $TARGET
+    ln -sf ${godef}/bin/godef $TARGET
+  '' + lib.optionalString (gotools != null) ''
+    TARGET=$out/lib/ycmd/third_party/go/src/golang.org/x/tools/cmd/gopls
+    mkdir -p $TARGET
+    ln -sf ${gotools}/bin/gopls $TARGET
   '' + lib.optionalString (rustracerd != null) ''
-    ln -s ${rustracerd}/bin/racerd $out/lib/ycmd/third_party/racerd/target/release
+    TARGET=$out/lib/ycmd/third_party/racerd/target/release
+    mkdir -p $TARGET
+    ln -sf ${rustracerd}/bin/racerd $TARGET
   '';
 
   # fixup the argv[0] and replace __file__ with the corresponding path so
diff --git a/pkgs/development/tools/tora/default.nix b/pkgs/development/tools/tora/default.nix
index 74f1f22426f9a..931c00ecce588 100644
--- a/pkgs/development/tools/tora/default.nix
+++ b/pkgs/development/tools/tora/default.nix
@@ -1,5 +1,5 @@
 { mkDerivation, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeWrapper
-, boost, doxygen, openssl, mysql, postgresql, graphviz, loki
+, boost, doxygen, openssl, libmysqlclient, postgresql, graphviz, loki
 , qscintilla, qtbase, qttools }:
 
 mkDerivation {
@@ -16,7 +16,7 @@ mkDerivation {
   nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper qttools ];
 
   buildInputs = [
-    boost doxygen graphviz loki mysql.connector-c openssl postgresql qscintilla qtbase
+    boost doxygen graphviz loki libmysqlclient openssl postgresql qscintilla qtbase
   ];
 
   preConfigure = ''
@@ -47,7 +47,7 @@ mkDerivation {
     "-lssl"
   ];
 
-  NIX_CFLAGS_COMPILE = [ "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql" ];
+  NIX_CFLAGS_COMPILE = [ "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql" ];
 
   qtWrapperArgs = [
     ''--prefix PATH : ${lib.getBin graphviz}/bin''