about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-01-02 19:10:45 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2018-01-02 19:10:45 +0100
commit804285f589ded484b530750dd1ec03b9052bcdac (patch)
tree8b20955e293215e1b8d672a3fd38867c39484609 /pkgs/tools
parent63c1a54257a5cef15b926c0843b3c7557c6f9a24 (diff)
parent4cc2a38854338ba783fb867ff924200b59867773 (diff)
downloadnixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar.gz
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar.bz2
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar.lz
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar.xz
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.tar.zst
nixlib-804285f589ded484b530750dd1ec03b9052bcdac.zip
Merge remote-tracking branch 'upstream/staging' into HEAD
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/admin/ansible/2.1.nix9
-rw-r--r--pkgs/tools/admin/ansible/2.2.nix9
-rw-r--r--pkgs/tools/admin/awscli/default.nix5
-rw-r--r--pkgs/tools/backup/bareos/default.nix8
-rw-r--r--pkgs/tools/backup/mydumper/default.nix4
-rw-r--r--pkgs/tools/inputmethods/ibus/default.nix179
-rw-r--r--pkgs/tools/misc/colord-kde/default.nix4
-rw-r--r--pkgs/tools/misc/coreutils/default.nix4
-rw-r--r--pkgs/tools/networking/kea/default.nix4
-rw-r--r--pkgs/tools/networking/mailutils/default.nix21
-rw-r--r--pkgs/tools/networking/mitmproxy/default.nix28
-rw-r--r--pkgs/tools/networking/snabb/default.nix4
-rw-r--r--pkgs/tools/security/gnupg/22.nix4
-rw-r--r--pkgs/tools/security/thc-hydra/default.nix4
-rw-r--r--pkgs/tools/system/collectd/default.nix5
-rw-r--r--pkgs/tools/system/rsyslog/default.nix9
-rw-r--r--pkgs/tools/text/diffutils/default.nix3
-rw-r--r--pkgs/tools/text/gawk/default.nix2
-rw-r--r--pkgs/tools/text/sgml/opensp/setup-hook.sh2
-rw-r--r--pkgs/tools/typesetting/tex/dblatex/default.nix4
-rw-r--r--pkgs/tools/typesetting/tex/tetex/setup-hook.sh2
-rw-r--r--pkgs/tools/typesetting/tex/texlive/setup-hook.sh2
22 files changed, 181 insertions, 135 deletions
diff --git a/pkgs/tools/admin/ansible/2.1.nix b/pkgs/tools/admin/ansible/2.1.nix
index d4a349c5e47d..b8b335bd6186 100644
--- a/pkgs/tools/admin/ansible/2.1.nix
+++ b/pkgs/tools/admin/ansible/2.1.nix
@@ -1,5 +1,6 @@
 { stdenv
 , fetchurl
+, fetchFromGitHub
 , pythonPackages
 , windowsSupport ? false
 }:
@@ -10,9 +11,11 @@ let
   jinja = jinja2.overridePythonAttrs (old: rec {
     version = "2.8.1";
     name = "${old.pname}-${version}";
-    src = old.src.override {
-      inherit version;
-      sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
+    src = fetchFromGitHub {
+      owner = "pallets";
+      repo = "jinja";
+      rev = version;
+      sha256 = "0m6g6fx6flxb6hrkw757mbx1gxyrmj50w27m2afdsvmvz0zpdi2a";
     };
   });
 in buildPythonPackage rec {
diff --git a/pkgs/tools/admin/ansible/2.2.nix b/pkgs/tools/admin/ansible/2.2.nix
index 4ef35fa5d9eb..ccca64b86b64 100644
--- a/pkgs/tools/admin/ansible/2.2.nix
+++ b/pkgs/tools/admin/ansible/2.2.nix
@@ -1,5 +1,6 @@
 { stdenv
 , fetchurl
+, fetchFromGitHub
 , pythonPackages
 , windowsSupport ? false
 }:
@@ -12,9 +13,11 @@ let
   jinja = jinja2.overridePythonAttrs (old: rec {
     version = "2.8.1";
     name = "${old.pname}-${version}";
-    src = old.src.override {
-      inherit version;
-      sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
+    src = fetchFromGitHub {
+      owner = "pallets";
+      repo = "jinja";
+      rev = version;
+      sha256 = "0m6g6fx6flxb6hrkw757mbx1gxyrmj50w27m2afdsvmvz0zpdi2a";
     };
   });
 in buildPythonPackage rec {
diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix
index b0e142a6d1d0..b6c7270a4250 100644
--- a/pkgs/tools/admin/awscli/default.nix
+++ b/pkgs/tools/admin/awscli/default.nix
@@ -25,14 +25,13 @@ let
   });
 
 in buildPythonPackage rec {
-  name = "${pname}-${version}";
   pname = "awscli";
-  version = "1.14.6";
+  version = "1.14.17";
   namePrefix = "";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1lhv8vb3bkjfjg4jm3hgfjssxgqy50gb6vbkh4lxiy8cn3y2dxp1";
+    sha256 = "456499acc41ab67671062a08e218a22aa1a1ff64ae531e694163d0371e8a1dd0";
   };
 
   # No tests included
diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix
index c32567138322..4af20f76449a 100644
--- a/pkgs/tools/backup/bareos/default.nix
+++ b/pkgs/tools/backup/bareos/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool, flex
 , readline ? null, openssl ? null, python2 ? null, ncurses ? null, rocksdb
-, sqlite ? null, postgresql ? null, libmysql ? null, zlib ? null, lzo ? null
+, sqlite ? null, postgresql ? null, mysql ? null, zlib ? null, lzo ? null
 , jansson ? null, acl ? null, glusterfs ? null, libceph ? null, libcap ? null
 }:
 
-assert sqlite != null || postgresql != null || libmysql != null;
+assert sqlite != null || postgresql != null || mysql != null;
 
 with stdenv.lib;
 let
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     nettools gettext readline openssl python2 flex ncurses sqlite postgresql
-    libmysql zlib lzo jansson acl glusterfs libceph libcap rocksdb
+    mysql.connector-c zlib lzo jansson acl glusterfs libceph libcap rocksdb
   ];
 
   postPatch = ''
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
     ++ optional (openssl != null) "--with-openssl=${openssl.dev}"
     ++ optional (sqlite != null) "--with-sqlite3=${sqlite.dev}"
     ++ optional (postgresql != null) "--with-postgresql=${postgresql}"
-    ++ optional (libmysql != null) "--with-mysql=${libmysql.dev}"
+    ++ optional (mysql != null) "--with-mysql=${mysql.connector-c}"
     ++ optional (zlib != null) "--with-zlib=${zlib.dev}"
     ++ optional (lzo != null) "--with-lzo=${lzo}"
     ++ optional (jansson != null) "--with-jansson=${jansson}"
diff --git a/pkgs/tools/backup/mydumper/default.nix b/pkgs/tools/backup/mydumper/default.nix
index 5b1f8f3fd5cb..da8805bc226e 100644
--- a/pkgs/tools/backup/mydumper/default.nix
+++ b/pkgs/tools/backup/mydumper/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, cmake, pkgconfig
-, glib, zlib, pcre, mariadb, libressl, }:
+, glib, zlib, pcre, mysql, libressl }:
 
 stdenv.mkDerivation rec {
   version = "0.9.3";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkgconfig ];
 
-  buildInputs = [ glib zlib pcre mariadb.client.dev libressl ];
+  buildInputs = [ glib zlib pcre mysql.connector-c libressl ];
 
   meta = with stdenv.lib; {
     description = ''High-perfomance MySQL backup tool'';
diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix
index 3fd29d65f369..f71a21b914f3 100644
--- a/pkgs/tools/inputmethods/ibus/default.nix
+++ b/pkgs/tools/inputmethods/ibus/default.nix
@@ -1,129 +1,138 @@
-{ stdenv, fetchurl, wrapGAppsHook
-, intltool, isocodes, pkgconfig
-, python3
-, gtk2, gtk3, atk, dconf, glib, json_glib
-, dbus, libnotify, gobjectIntrospection, wayland
-}:
+{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, gconf, intltool, makeWrapper, pkgconfig
+, vala, wrapGAppsHook, atk, dbus, dconf ? null, glib, gdk_pixbuf, gobjectIntrospection, gtk2
+, gtk3, gtk_doc, isocodes, python3, json_glib, libnotify ? null, enablePythonLibrary ? true
+, enableUI ? true, withWayland ? false, libxkbcommon ? null, wayland ? null }:
+
+assert withWayland -> wayland != null && libxkbcommon != null;
+
+with stdenv.lib;
 
 let
-  emojiData = let
-    srcs = {
-      data = fetchurl {
-        url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
-        sha256 = "11jfz5rrvyc2ixliqfcjgmch4cn9mfy0x96qnpfcyz5fy1jvfyxf";
-      };
-      sequences = fetchurl {
-        url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
-        sha256 = "09bii7f5mmladg0kl3n80fa9qaix6bv5ylm92x52j7wygzv0szb1";
-      };
-      variation-sequences = fetchurl {
-        url = "http://unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt";
-        sha256 = "1wlg4gbq7spmpppjfy5zdl82sj0hc836p8gljgfrjmwsjgybq286";
-      };
-      zwj-sequences = fetchurl {
-        url = "http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt";
-        sha256 = "16gvzv76mjv9g81lm1m6cr3rpfqyn2k4hb9a62xd329252dhl25q";
-      };
-      test = fetchurl {
-        url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
-        sha256 = "031qk2v8xdnba7hfinmgrmpglc9l8ll2hds6mw885p0hngdb3dgw";
-      };
+  emojiSrcs = {
+    data = fetchurl {
+      url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
+      sha256 = "11jfz5rrvyc2ixliqfcjgmch4cn9mfy0x96qnpfcyz5fy1jvfyxf";
+    };
+    sequences = fetchurl {
+      url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
+      sha256 = "09bii7f5mmladg0kl3n80fa9qaix6bv5ylm92x52j7wygzv0szb1";
+    };
+    variation-sequences = fetchurl {
+      url = "http://unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt";
+      sha256 = "1wlg4gbq7spmpppjfy5zdl82sj0hc836p8gljgfrjmwsjgybq286";
+    };
+    zwj-sequences = fetchurl {
+      url = "http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt";
+      sha256 = "16gvzv76mjv9g81lm1m6cr3rpfqyn2k4hb9a62xd329252dhl25q";
+    };
+    test = fetchurl {
+      url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
+      sha256 = "031qk2v8xdnba7hfinmgrmpglc9l8ll2hds6mw885p0hngdb3dgw";
     };
-  in stdenv.mkDerivation {
+  };
+  emojiData = stdenv.mkDerivation {
     name = "emoji-data-5.0";
     unpackPhase = ":";
-    dontBuild = true;
-    installPhase = with stdenv.lib; ''
+    installPhase = ''
       mkdir $out
-      ${builtins.toString (flip mapAttrsToList srcs (k: v: ''
-        cp ${v} $out/emoji-${k}.txt
-      ''))}
+      ${builtins.toString (flip mapAttrsToList emojiSrcs (k: v: "cp ${v} $out/emoji-${k}.txt;"))}
     '';
   };
   cldrEmojiAnnotation = stdenv.mkDerivation rec {
     name = "cldr-emoji-annotation-${version}";
-    version = "31.0.1_1";
-    src = fetchurl {
-      url = "https://github.com/fujiwarat/cldr-emoji-annotation/releases/download/${version}/${name}.tar.gz";
-      sha256 = "1a3qzsab7vzjqpdialp1g8ppr21x05v0ph8ngyq9pyjkx4vzcdi7";
+    version = "31.90.0_1";
+    src = fetchFromGitHub {
+      owner = "fujiwarat";
+      repo = "cldr-emoji-annotation";
+      rev = version;
+      sha256 = "1vsj32bg8ab4d80rz0fxy6sj2lv31inzyjnddjm079bnvlaf2kih";
     };
+    nativeBuildInputs = [ autoreconfHook ];
   };
-  pyEnv = python3.buildEnv.override {
-    extraLibs = [ python3.pkgs.pygobject3 ];
-
+  python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
+  python3BuildEnv = python3.buildEnv.override {
     # ImportError: No module named site
     postBuild = ''
-      makeWrapper '${glib.dev}/bin/glib-genmarshal' "$out"/bin/glib-genmarshal \
-        --unset PYTHONPATH
+      makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --unset PYTHONPATH
+      makeWrapper ${glib.dev}/bin/glib-genmarshal $out/bin/glib-genmarshal --unset PYTHONPATH
+      makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
     '';
   };
-in stdenv.mkDerivation rec {
+in
+
+stdenv.mkDerivation rec {
   name = "ibus-${version}";
-  version = "1.5.16";
+  version = "1.5.17";
 
-  src = fetchurl {
-    url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
-    sha256 = "07py16jb81kd7vkqhcia9cb2avsbg5jswp2kzf0k4bprwkxppd9n";
+  src = fetchFromGitHub {
+    owner = "ibus";
+    repo = "ibus";
+    rev = version;
+    sha256 = "09mrj9d8qpl9cbylg1zx8c3ymc5gdy4jrf6zs125wjz0b574g5av";
   };
 
   postPatch = ''
-    # These paths will be set in the wrapper.
-    sed -e "/export IBUS_DATAROOTDIR/ s/^.*$//" \
-        -e "/export IBUS_LIBEXECDIR/ s/^.*$//" \
-        -e "/export IBUS_LOCALEDIR/ s/^.*$//" \
-        -e "/export IBUS_PREFIX/ s/^.*$//" \
-        -i "setup/ibus-setup.in"
+    substituteInPlace setup/ibus-setup.in --subst-var-by PYTHON ${python3Runtime.interpreter}
+    substituteInPlace data/dconf/Makefile.am --replace "dconf update" true
+    substituteInPlace configure.ac --replace '$python2dir/ibus' $out/${python3.sitePackages}/ibus
+    echo \#!${stdenv.shell} > data/dconf/make-dconf-override-db.sh
+    cp ${gtk_doc}/share/gtk-doc/data/gtk-doc.make .
   '';
 
+  preAutoreconf = "touch ChangeLog";
+  preConfigure = "intltoolize";
+
   configureFlags = [
     "--disable-gconf"
-    "--enable-dconf"
     "--disable-memconf"
-    "--enable-ui"
-    "--enable-python-library"
+    (enableFeature (dconf != null) "dconf")
+    (enableFeature (libnotify != null) "libnotify")
+    (enableFeature withWayland "wayland")
+    (enableFeature enablePythonLibrary "python-library")
+    (enableFeature enableUI "ui")
     "--with-unicode-emoji-dir=${emojiData}"
     "--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
   ];
 
-  buildInputs = [
-    pyEnv
-    intltool isocodes pkgconfig
-    gtk2 gtk3 dconf
-    json_glib
-    dbus libnotify gobjectIntrospection wayland
+  nativeBuildInputs = [
+    autoreconfHook
+    gconf
+    gtk_doc
+    intltool
+    makeWrapper
+    pkgconfig
+    python3BuildEnv
+    vala
+    wrapGAppsHook
   ];
 
   propagatedBuildInputs = [ glib ];
 
-  nativeBuildInputs = [ wrapGAppsHook ];
-
-  outputs = [ "out" "dev" ];
+  buildInputs = [
+    dbus
+    dconf
+    gdk_pixbuf
+    gobjectIntrospection
+    gtk2
+    gtk3
+    isocodes
+    json_glib
+    libnotify
+  ] ++ optionals withWayland [
+    libxkbcommon
+    wayland
+  ];
 
   enableParallelBuilding = true;
 
-  preConfigure = ''
-    # Fix hard-coded installation paths, so make does not try to overwrite our
-    # Python installation.
-    sed -e "/py2overridesdir=/ s|=.*$|=$out/lib/${python3.libPrefix}|" \
-        -e "/pyoverridesdir=/ s|=.*$|=$out/lib/${python3.libPrefix}|" \
-        -e "/PYTHON2_LIBDIR/ s|=.*|=$out/lib/${python3.libPrefix}|" \
-        -i configure
-
-    # Don't try to generate a system-wide dconf database; it wouldn't work.
-    substituteInPlace data/dconf/Makefile.in --replace "dconf update" "echo"
-  '';
-
   doInstallCheck = true;
   installCheckPhase = "$out/bin/ibus version";
 
-  postInstall = ''
-    moveToOutput "bin/ibus-setup" "$dev"
-  '';
-
-  meta = with stdenv.lib; {
+  meta = {
     homepage = https://github.com/ibus/ibus;
-    description = "Intelligent Input Bus for Linux / Unix OS";
+    description = "Intelligent Input Bus, input method framework";
+    license = licenses.lgpl21Plus;
     platforms = platforms.linux;
-    maintainers = [ maintainers.ttuegel ];
+    maintainers = with maintainers; [ ttuegel yegortimoshenko ];
   };
 }
diff --git a/pkgs/tools/misc/colord-kde/default.nix b/pkgs/tools/misc/colord-kde/default.nix
index a91cd627bdae..12821cf864c2 100644
--- a/pkgs/tools/misc/colord-kde/default.nix
+++ b/pkgs/tools/misc/colord-kde/default.nix
@@ -14,11 +14,11 @@ stdenv.mkDerivation rec {
     sha256 = "0brdnpflm95vf4l41clrqxwvjrdwhs859n7401wxcykkmw4m0m3c";
   };
 
-  nativeBuildInputs = [ extra-cmake-modules ki18n ];
+  nativeBuildInputs = [ extra-cmake-modules ];
 
   buildInputs = [
     kconfig kconfigwidgets kcoreaddons kdbusaddons kiconthemes
-    kcmutils kio knotifications plasma-framework kwidgetsaddons
+    kcmutils ki18n kio knotifications plasma-framework kwidgetsaddons
     kwindowsystem kitemviews lcms2 libXrandr qtx11extras
   ];
 
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 9a422a96d703..589c58d0acc0 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -14,11 +14,11 @@ assert selinuxSupport -> libselinux != null && libsepol != null;
 with lib;
 
 stdenv.mkDerivation rec {
-  name = "coreutils-8.28";
+  name = "coreutils-8.29";
 
   src = fetchurl {
     url = "mirror://gnu/coreutils/${name}.tar.xz";
-    sha256 = "0r8c1bgm68kl70j1lgd0rv12iykw6143k4m9a56xip9rc2hv25qi";
+    sha256 = "0plm1zs9il6bb5mk881qvbghq4glc8ybbgakk2lfzb0w64fgml4j";
   };
 
   patches = optional hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
diff --git a/pkgs/tools/networking/kea/default.nix b/pkgs/tools/networking/kea/default.nix
index 68fb72ff7d9e..f33fe7a7105c 100644
--- a/pkgs/tools/networking/kea/default.nix
+++ b/pkgs/tools/networking/kea/default.nix
@@ -21,12 +21,12 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--localstatedir=/var"
     "--with-dhcp-pgsql=${postgresql}/bin/pg_config"
-    "--with-dhcp-mysql=${mysql.client.dev}/bin/mysql_config"
+    "--with-dhcp-mysql=${mysql.connector-c}/bin/mysql_config"
   ];
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [
-    openssl log4cplus boost python3 mysql.client
+    openssl log4cplus boost python3 mysql.connector-c
     botan2 gmp bzip2
   ];
 
diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix
index aee5302405a5..6f47b4b55766 100644
--- a/pkgs/tools/networking/mailutils/default.nix
+++ b/pkgs/tools/networking/mailutils/default.nix
@@ -1,11 +1,10 @@
-{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, libtool, pkgconfig
+{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, pkgconfig
 , gdbm, pam, readline, ncurses, gnutls, guile, texinfo, gnum4, sasl, fribidi, nettools
-, gss, mysql }:
+, python, gss, mysql }:
 
 let
   p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files";
-in
-stdenv.mkDerivation rec {
+in stdenv.mkDerivation rec {
   name = "${project}-${version}";
   project = "mailutils";
   version = "3.2";
@@ -16,11 +15,11 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [
-    autoreconfHook gettext libtool pkgconfig
+    autoreconfHook gettext pkgconfig
   ] ++ stdenv.lib.optional doCheck dejagnu;
   buildInputs = [
     gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools
-    gss mysql.lib
+    gss mysql.connector-c python
   ];
 
   patches = [
@@ -52,14 +51,20 @@ stdenv.mkDerivation rec {
   ];
 
   postPatch = ''
-    sed -e '/AM_GNU_GETTEXT_VERSION/s/0.18/0.19/' -i configure.ac
     sed -i -e '/chown root:mail/d' \
            -e 's/chmod [24]755/chmod 0755/' \
       */Makefile{.in,.am}
+    sed -i 's:/usr/lib/mysql:${mysql.connector-c}/lib/mysql:' configure.ac
+    sed -i 's/0\.18/0.19/' configure.ac
+    sed -i -e 's:mysql/mysql.h:mysql.h:' \
+           -e 's:mysql/errmsg.h:errmsg.h:' \
+      sql/mysql.c
   '';
 
+  NIX_CFLAGS_COMPILE = "-L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql";
+
   preCheck = ''
-    # Add missing files.
+    # Add missing test files
     cp ${builtins.toString readmsg-tests} readmsg/tests/
     for f in hdr.at nohdr.at twomsg.at weed.at; do
       mv readmsg/tests/*-$f readmsg/tests/$f
diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix
index f96987a1300b..36874a812812 100644
--- a/pkgs/tools/networking/mitmproxy/default.nix
+++ b/pkgs/tools/networking/mitmproxy/default.nix
@@ -1,6 +1,28 @@
 { stdenv, fetchpatch, fetchFromGitHub, fetchurl, python3, glibcLocales }:
 
-python3.pkgs.buildPythonPackage rec {
+let
+  # When overrides are not needed, then only remove the contents of this set.
+  packageOverrides = self: super: {
+    ldap3 = super.ldap3.overridePythonAttrs (oldAttrs: rec {
+      version = "2.3";
+      src = oldAttrs.src.override {
+        inherit version;
+        sha256 = "c056b3756076e15aa71c963c7c5a44d5d9bbd430263ee49598d4454223a766ac";
+      };
+    });
+    pyasn1 = super.pyasn1.overridePythonAttrs (oldAttrs: rec {
+      version = "0.3.7";
+      src = oldAttrs.src.override {
+        inherit version;
+        sha256 = "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965";
+      };
+    });
+  };
+
+  pythonPackages = (python3.override {inherit packageOverrides; }).pkgs;
+in with pythonPackages;
+
+buildPythonPackage rec {
   baseName = "mitmproxy";
   name = "${baseName}-unstable-2017-10-31";
 
@@ -17,7 +39,7 @@ python3.pkgs.buildPythonPackage rec {
     LC_CTYPE=en_US.UTF-8 pytest -k 'not test_echo and not test_find_unclaimed_URLs '
   '';
 
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = [
     blinker click certifi cryptography
     h2 hyperframe
     kaitaistruct passlib pyasn1 pyopenssl
@@ -25,7 +47,7 @@ python3.pkgs.buildPythonPackage rec {
     urwid brotlipy sortedcontainers ldap3
   ];
 
-  buildInputs = with python3.pkgs; [
+  buildInputs = [
     beautifulsoup4 flask pytest pytestrunner glibcLocales
   ];
 
diff --git a/pkgs/tools/networking/snabb/default.nix b/pkgs/tools/networking/snabb/default.nix
index f3baddd2653c..46580c0b802c 100644
--- a/pkgs/tools/networking/snabb/default.nix
+++ b/pkgs/tools/networking/snabb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, git, mariadb, diffutils, which, coreutils, procps, nettools }:
+{ stdenv, lib, fetchFromGitHub, bash, makeWrapper, git, mysql, diffutils, which, coreutils, procps, nettools }:
 
 stdenv.mkDerivation rec {
   name = "snabb-${version}";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     done
 
     # We need a way to pass $PATH to the scripts
-    sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git mariadb which procps coreutils ]}' src/program/snabbnfv/neutron_sync_master/neutron_sync_master.sh.inc
+    sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git mysql.client which procps coreutils ]}' src/program/snabbnfv/neutron_sync_master/neutron_sync_master.sh.inc
     sed -i '2iexport PATH=${stdenv.lib.makeBinPath [ git coreutils diffutils nettools ]}' src/program/snabbnfv/neutron_sync_agent/neutron_sync_agent.sh.inc
   '';
 
diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix
index 0519902308af..89fee90364e8 100644
--- a/pkgs/tools/security/gnupg/22.nix
+++ b/pkgs/tools/security/gnupg/22.nix
@@ -15,11 +15,11 @@ assert guiSupport -> pinentry != null;
 stdenv.mkDerivation rec {
   name = "gnupg-${version}";
 
-  version = "2.2.3";
+  version = "2.2.4";
 
   src = fetchurl {
     url = "mirror://gnupg/gnupg/${name}.tar.bz2";
-    sha256 = "1d4482c4pbi0p1k8cc0f9c4q51k56v8navrbz5samxrrs42p3lyb";
+    sha256 = "1v7j8v2ww1knknbrhw3svfrqkmf9ll58iq0dczbsdpqgg1j3w6j0";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix
index e8eb3aacd3e9..9a7a245b8134 100644
--- a/pkgs/tools/security/thc-hydra/default.nix
+++ b/pkgs/tools/security/thc-hydra/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysql, postgresql
+{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, mysql, postgresql
 , withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
 
 let
@@ -23,7 +23,7 @@ in stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
-  buildInputs = [ zlib openssl ncurses libidn pcre libssh libmysql postgresql ]
+  buildInputs = [ zlib openssl ncurses libidn pcre libssh mysql.connector-c postgresql ]
                 ++ lib.optional withGUI gtk2;
 
   postInstall = lib.optionalString withGUI ''
diff --git a/pkgs/tools/system/collectd/default.nix b/pkgs/tools/system/collectd/default.nix
index b1c5778ed4c5..e9ce2913a6cb 100644
--- a/pkgs/tools/system/collectd/default.nix
+++ b/pkgs/tools/system/collectd/default.nix
@@ -20,7 +20,7 @@
 , libtool ? null
 , lm_sensors ? null
 , lvm2 ? null
-, libmysql ? null
+, mysql ? null
 , postgresql ? null
 , protobufc ? null
 , python ? null
@@ -53,9 +53,10 @@ stdenv.mkDerivation rec {
   buildInputs = [
     curl libdbi libgcrypt libmemcached
     cyrus_sasl libnotify gdk_pixbuf liboping libpcap libvirt
-    libxml2 libmysql postgresql protobufc rrdtool
+    libxml2 postgresql protobufc rrdtool
     varnish yajl jdk libtool python hiredis libmicrohttpd
     riemann_c_client mosquitto rdkafka mongoc
+  ] ++ stdenv.lib.optionals (mysql != null) [ mysql.connector-c
   ] ++ stdenv.lib.optionals stdenv.isLinux [
     iptables libatasmart libcredis libmodbus libsigrok
     lm_sensors lvm2 rabbitmq-c udev net_snmp libmnl
diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix
index e642b91c3d96..a6999942e0c6 100644
--- a/pkgs/tools/system/rsyslog/default.nix
+++ b/pkgs/tools/system/rsyslog/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, autoreconfHook, libestr, json_c, zlib, pythonPackages, fastJson
-, libkrb5 ? null, systemd ? null, jemalloc ? null, libmysql ? null, postgresql ? null
+, libkrb5 ? null, systemd ? null, jemalloc ? null, mysql ? null, postgresql ? null
 , libdbi ? null, net_snmp ? null, libuuid ? null, curl ? null, gnutls ? null
 , libgcrypt ? null, liblognorm ? null, openssl ? null, librelp ? null, libksi ? null
 , libgt ? null, liblogging ? null, libnet ? null, hadoop ? null, rdkafka ? null
@@ -22,11 +22,12 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig autoreconfHook ];
   buildInputs = [
-    fastJson libestr json_c zlib pythonPackages.docutils libkrb5 jemalloc libmysql
+    fastJson libestr json_c zlib pythonPackages.docutils libkrb5 jemalloc 
     postgresql libdbi net_snmp libuuid curl gnutls libgcrypt liblognorm openssl
     librelp libgt libksi liblogging libnet hadoop rdkafka libmongo-client czmq
     rabbitmq-c hiredis
-  ] ++ stdenv.lib.optional stdenv.isLinux systemd;
+  ] ++ stdenv.lib.optional (mysql != null) mysql.connector-c
+    ++ stdenv.lib.optional stdenv.isLinux systemd;
 
   hardeningDisable = [ "format" ];
 
@@ -49,7 +50,7 @@ stdenv.mkDerivation rec {
     (mkFlag false                     "valgrind")
     (mkFlag false                     "diagtools")
     (mkFlag true                      "usertools")
-    (mkFlag (libmysql != null)        "mysql")
+    (mkFlag (mysql != null)           "mysql")
     (mkFlag (postgresql != null)      "pgsql")
     (mkFlag (libdbi != null)          "libdbi")
     (mkFlag (net_snmp != null)        "snmp")
diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix
index cd64bd1566b5..60628e2139ce 100644
--- a/pkgs/tools/text/diffutils/default.nix
+++ b/pkgs/tools/text/diffutils/default.nix
@@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
   configureFlags =
     # "pr" need not be on the PATH as a run-time dep, so we need to tell
     # configure where it is. Covers the cross and native case alike.
-    stdenv.lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr";
+    stdenv.lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr"
+    ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "gl_cv_func_getopt_gnu=yes";
 
   meta = {
     homepage = http://www.gnu.org/software/diffutils/diffutils.html;
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix
index 65d0a1e4c00a..6783158ca77e 100644
--- a/pkgs/tools/text/gawk/default.nix
+++ b/pkgs/tools/text/gawk/default.nix
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
     (if interactive then "--with-readline=${readline.dev}" else "--without-readline")
   ];
 
+  makeFlags = "AR=${stdenv.cc.targetPrefix}ar";
+
   inherit doCheck;
 
   postInstall = ''
diff --git a/pkgs/tools/text/sgml/opensp/setup-hook.sh b/pkgs/tools/text/sgml/opensp/setup-hook.sh
index 52da517a8cbe..753a3ea64287 100644
--- a/pkgs/tools/text/sgml/opensp/setup-hook.sh
+++ b/pkgs/tools/text/sgml/opensp/setup-hook.sh
@@ -18,5 +18,5 @@ if test -z "$sgmlHookDone"; then
     export ftp_proxy=http://nodtd.invalid/
 
     export SGML_CATALOG_FILES
-    envHooks+=(addSGMLCatalogs)
+    addEnvHooks "$targetOffset" addSGMLCatalogs
 fi
diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix
index 7ffccde2c035..c4eaf4e1df46 100644
--- a/pkgs/tools/typesetting/tex/dblatex/default.nix
+++ b/pkgs/tools/typesetting/tex/dblatex/default.nix
@@ -21,11 +21,11 @@ assert enableAllFeatures ->
   ghostscript != null;
 
 stdenv.mkDerivation rec {
-  name = "dblatex-0.3.7";
+  name = "dblatex-0.3.10";
 
   src = fetchurl {
     url = "mirror://sourceforge/dblatex/${name}.tar.bz2";
-    sha256 = "0bkjgrn03dy5c7438s429wnv6z5ynxkr4pbhp2z49kynskgkzkjr";
+    sha256 = "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg";
   };
 
   buildInputs = [ python2 libxslt tex ]
diff --git a/pkgs/tools/typesetting/tex/tetex/setup-hook.sh b/pkgs/tools/typesetting/tex/tetex/setup-hook.sh
index 9c5424e881e3..5faef7fe5df5 100644
--- a/pkgs/tools/typesetting/tex/tetex/setup-hook.sh
+++ b/pkgs/tools/typesetting/tex/tetex/setup-hook.sh
@@ -4,4 +4,4 @@ addTeXMFPath () {
     fi
 }
 
-envHooks+=(addTeXMFPath)
+addEnvHooks "$targetOffset" addTeXMFPath
diff --git a/pkgs/tools/typesetting/tex/texlive/setup-hook.sh b/pkgs/tools/typesetting/tex/texlive/setup-hook.sh
index 9c5424e881e3..5faef7fe5df5 100644
--- a/pkgs/tools/typesetting/tex/texlive/setup-hook.sh
+++ b/pkgs/tools/typesetting/tex/texlive/setup-hook.sh
@@ -4,4 +4,4 @@ addTeXMFPath () {
     fi
 }
 
-envHooks+=(addTeXMFPath)
+addEnvHooks "$targetOffset" addTeXMFPath