summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@secure.mailbox.org>2017-06-24 15:19:36 -0500
committerGitHub <noreply@github.com>2017-06-24 15:19:36 -0500
commit1593bd24235f2e9611f90fb914440b0d0ae5aeea (patch)
treee724586e506818440f28396525c1dc8d1e1e0e5c
parentc0303c7110466e976cf89c824136264c11e90fd0 (diff)
parent69438a397ffce9ad999cb05c451c14e55b9ebc90 (diff)
downloadnixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar.gz
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar.bz2
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar.lz
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar.xz
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.tar.zst
nixlib-1593bd24235f2e9611f90fb914440b0d0ae5aeea.zip
Merge pull request #26817 from ttuegel/qt-5.9
Qt 5.9
-rw-r--r--pkgs/desktops/plasma-5/khotkeys.nix1
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/default.nix3
-rw-r--r--pkgs/development/libraries/kde-frameworks/kjs.nix4
-rw-r--r--pkgs/development/libraries/qt-5/5.8/fetch.sh3
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtbase/xdg-config-dirs.patch41
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix97
-rw-r--r--pkgs/development/libraries/qt-5/5.8/srcs.nix325
-rw-r--r--pkgs/development/libraries/qt-5/5.9/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/fetch.sh3
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch)64
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch)8
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/default.nix)4
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gl.patch)10
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gtkstyle.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch)13
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-resolv.patch)16
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch)8
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/libressl.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/qnativesocketengine-type-pun.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/series (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/series)1
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/tzdir.patch)8
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtdeclarative/series (renamed from pkgs/development/libraries/qt-5/5.8/qtdeclarative/series)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtdoc.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtdoc.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtgraphicaleffects.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtimageformats.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtimageformats.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtlocation.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtlocation.nix)2
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtmacextras.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtmacextras.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtquickcontrols.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtscript/0001-glib-2.32.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtscript/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtscript/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtsensors.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtsensors.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtserialport/series (renamed from pkgs/development/libraries/qt-5/5.8/qtserialport/series)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtsvg.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtsvg.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qttools/cmake-paths.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qttools/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qttools/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qttools/series (renamed from pkgs/development/libraries/qt-5/5.8/qttools/series)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qttranslations.nix (renamed from pkgs/development/libraries/qt-5/5.8/qttranslations.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwayland.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtwayland.nix)2
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix113
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebengine/qtwebengine-paxmark-mksnapshot.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtwebengine/qtwebengine-paxmark-mksnapshot.patch)24
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebkit/default.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-gtk.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-udev.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-icucore-darwin.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebkit/series (renamed from pkgs/development/libraries/qt-5/5.8/qtwebkit/series)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtwebsockets.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtx11extras.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtx11extras.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/qtxmlpatterns.nix (renamed from pkgs/development/libraries/qt-5/5.8/qtxmlpatterns.nix)0
-rw-r--r--pkgs/development/libraries/qt-5/5.9/srcs.nix333
-rw-r--r--pkgs/top-level/all-packages.nix10
59 files changed, 538 insertions, 555 deletions
diff --git a/pkgs/desktops/plasma-5/khotkeys.nix b/pkgs/desktops/plasma-5/khotkeys.nix
index abfb85a867c5..c54d5486ee96 100644
--- a/pkgs/desktops/plasma-5/khotkeys.nix
+++ b/pkgs/desktops/plasma-5/khotkeys.nix
@@ -13,4 +13,5 @@ mkDerivation {
     plasma-framework plasma-workspace qtx11extras
   ];
   outputs = [ "out" "dev" "bin" ];
+  enableParallelBuild = false;
 }
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
index b866ebab0e51..b28a1e87fb6a 100644
--- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
@@ -20,8 +20,7 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
   buildInputs = [
     isocodes libdbusmenu libSM libXcursor libXtst pam wayland
-  ];
-  propagatedBuildInputs = [
+
     baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative
     kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff
     knotifyconfig kpackage krunner kscreenlocker ktexteditor ktextwidgets
diff --git a/pkgs/development/libraries/kde-frameworks/kjs.nix b/pkgs/development/libraries/kde-frameworks/kjs.nix
index 62bcc0065b3e..311f07241d65 100644
--- a/pkgs/development/libraries/kde-frameworks/kjs.nix
+++ b/pkgs/development/libraries/kde-frameworks/kjs.nix
@@ -1,12 +1,12 @@
 {
   mkDerivation, lib,
   extra-cmake-modules, kdoctools,
-  qtbase,
+  pcre, qtbase,
 }:
 
 mkDerivation {
   name = "kjs";
   meta = { maintainers = [ lib.maintainers.ttuegel ]; };
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-  buildInputs = [ qtbase ];
+  buildInputs = [ pcre qtbase ];
 }
diff --git a/pkgs/development/libraries/qt-5/5.8/fetch.sh b/pkgs/development/libraries/qt-5/5.8/fetch.sh
deleted file mode 100644
index 2e21cdefba6a..000000000000
--- a/pkgs/development/libraries/qt-5/5.8/fetch.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-WGET_ARGS=( http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/ \
-            http://download.qt.io/community_releases/5.8/5.8.0-final/ \
-            -A '*.tar.xz' )
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/xdg-config-dirs.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/xdg-config-dirs.patch
deleted file mode 100644
index b5c21f064a42..000000000000
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/xdg-config-dirs.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Index: qtbase-opensource-src-5.8.0/src/corelib/io/qsettings.cpp
-===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/io/qsettings.cpp
-+++ qtbase-opensource-src-5.8.0/src/corelib/io/qsettings.cpp
-@@ -1134,6 +1134,23 @@ QConfFileSettingsPrivate::QConfFileSetti
-         confFiles[F_System | F_Application].reset(QConfFile::fromName(systemPath + appFile, false));
-     confFiles[F_System | F_Organization].reset(QConfFile::fromName(systemPath + orgFile, false));
- 
-+#if !defined(Q_OS_WIN)
-+    // Add directories specified in $XDG_CONFIG_DIRS
-+    const QString pathEnv = QString::fromLocal8Bit(getenv("XDG_CONFIG_DIRS"));
-+    if (!pathEnv.isEmpty()) {
-+        const QStringList pathEntries = pathEnv.split(QLatin1Char(':'), QString::SkipEmptyParts);
-+        if (!pathEntries.isEmpty()) {
-+            int j = 4; // This is the number of confFiles set above -- we need to start adding $XDG_CONFIG_DIRS after those.
-+            for (int k = 0; k < pathEntries.size() && j < NumConfFiles - 1; ++k) {
-+                const QString& path = pathEntries.at(k);
-+                if (!application.isEmpty())
-+                    confFiles[j++].reset(QConfFile::fromName(path + QDir::separator() + appFile, false));
-+                confFiles[j++].reset(QConfFile::fromName(path + QDir::separator() + orgFile, false));
-+            }
-+        }
-+    }
-+#endif
-+
-     for (i = 0; i < NumConfFiles; ++i) {
-         if (confFiles[i]) {
-             spec = i;
-Index: qtbase-opensource-src-5.8.0/src/corelib/io/qsettings_p.h
-===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/io/qsettings_p.h
-+++ qtbase-opensource-src-5.8.0/src/corelib/io/qsettings_p.h
-@@ -246,7 +246,7 @@ public:
-         F_Organization = 0x1,
-         F_User = 0x0,
-         F_System = 0x2,
--        NumConfFiles = 4
-+        NumConfFiles = 40 // HACK: increase NumConfFiles from 4 to 40 in order to accommodate more paths in $XDG_CONFIG_DIRS -- ellis
-     };
- 
-     QSettings::Format format;
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix
deleted file mode 100644
index 871fb21c1065..000000000000
--- a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix
+++ /dev/null
@@ -1,97 +0,0 @@
-{ qtSubmodule, qtquickcontrols, qtlocation, qtwebchannel
-
-, xlibs, libXcursor, libXScrnSaver, libXrandr, libXtst
-, fontconfig, freetype, harfbuzz, icu, dbus
-, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus
-, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent
-, alsaLib
-, libcap
-, pciutils
-, systemd
-
-, bison, flex, git, which, gperf
-, coreutils
-, pkgconfig, python2
-, enableProprietaryCodecs ? true
-
-, lib, stdenv # lib.optional, needsPax
-}:
-
-with stdenv.lib;
-
-qtSubmodule {
-  name = "qtwebengine";
-  qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
-  buildInputs = [ bison flex git which gperf ];
-  nativeBuildInputs = [ pkgconfig python2 coreutils ];
-  doCheck = true;
-  outputs = [ "out" "dev" "bin" ];
-
-  enableParallelBuilding = true;
-
-  preConfigure = ''
-    export MAKEFLAGS=-j$NIX_BUILD_CORES
-    substituteInPlace ./src/3rdparty/chromium/build/common.gypi \
-      --replace /bin/echo ${coreutils}/bin/echo
-    substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi \
-      --replace /bin/echo ${coreutils}/bin/echo
-    substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi \
-      --replace /bin/echo ${coreutils}/bin/echo
-
-    # Fix library paths
-    sed -i \
-      -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \
-      -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
-      -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
-      src/core/web_engine_library_info.cpp
- '' + optionalString (!stdenv.isDarwin) ''
-    sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
-      src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
-
-    sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
-      src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
-  '';
-
-  qmakeFlags = optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs";
-
-  propagatedBuildInputs = [
-    # Image formats
-    libjpeg libpng libtiff libwebp
-
-    # Video formats
-    srtp libvpx
-
-    # Audio formats
-    libopus
-
-    # Text rendering
-    harfbuzz icu
-  ]
-  ++ optionals (!stdenv.isDarwin) [
-    dbus zlib minizip snappy nss protobuf jsoncpp libevent
-
-    # Audio formats
-    alsaLib
-
-    # Text rendering
-    fontconfig freetype
-
-    libcap
-    pciutils
-
-    # X11 libs
-    xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
-    xlibs.libXcomposite
-  ];
-  patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
-  postInstall = ''
-    cat > $out/libexec/qt.conf <<EOF
-    [Paths]
-    Prefix = ..
-    EOF
-
-    paxmark m $out/libexec/QtWebEngineProcess
-
-    moveToOutput "$qtQmlPrefix" "$bin"
-  '';
-}
diff --git a/pkgs/development/libraries/qt-5/5.8/srcs.nix b/pkgs/development/libraries/qt-5/5.8/srcs.nix
deleted file mode 100644
index 02bd5c4f18b2..000000000000
--- a/pkgs/development/libraries/qt-5/5.8/srcs.nix
+++ /dev/null
@@ -1,325 +0,0 @@
-# DO NOT EDIT! This file is generated automatically by fetch-kde-qt.sh
-{ fetchurl, mirror }:
-
-{
-  qt3d = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qt3d-opensource-src-5.8.0.tar.xz";
-      sha256 = "1rca1k8lf0xy2x1w3kp9rnpi77bbrm8v7db302n9a8cjziv4a8is";
-      name = "qt3d-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtactiveqt = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtactiveqt-opensource-src-5.8.0.tar.xz";
-      sha256 = "1a9m87chmp2m3ljadryh9ggvwpvclmazz081h3p68n092dbl2ylj";
-      name = "qtactiveqt-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtandroidextras = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtandroidextras-opensource-src-5.8.0.tar.xz";
-      sha256 = "1wgbxi579fdnripp481qhcqma95hm4zcc16n4ljjpl0yzn1zx8qa";
-      name = "qtandroidextras-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtbase = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtbase-opensource-src-5.8.0.tar.xz";
-      sha256 = "01f07yjly7y24njl2h4hyknmi7pf8yd9gky23szcfkd40ap12wf1";
-      name = "qtbase-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtcanvas3d = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtcanvas3d-opensource-src-5.8.0.tar.xz";
-      sha256 = "18yaikbwk4d7sh09psi3kjn1mxjp4d2f3qchfzgq5x96yn8gfijl";
-      name = "qtcanvas3d-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtcharts = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtcharts-opensource-src-5.8.0.tar.xz";
-      sha256 = "11m5g1fxip6z2xk1z6g6h4rq7v282qbkxflan8hs87hadnzars03";
-      name = "qtcharts-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtconnectivity = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtconnectivity-opensource-src-5.8.0.tar.xz";
-      sha256 = "1w97na5s420y08dcydqinbqb0rd9h4pfdnjbwslr0qvzsvlh2bbv";
-      name = "qtconnectivity-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtdatavis3d = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtdatavis3d-opensource-src-5.8.0.tar.xz";
-      sha256 = "1n2vdf6n7pr9xrjwbvbar899q74shx6cy19x32adxfn2iilygwbp";
-      name = "qtdatavis3d-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtdeclarative = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtdeclarative-opensource-src-5.8.0.tar.xz";
-      sha256 = "0ilaf2sprpk9fg2j3905hxnhm0xbnm88ppk4zifp7n0jmnwix51j";
-      name = "qtdeclarative-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtdoc = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtdoc-opensource-src-5.8.0.tar.xz";
-      sha256 = "13jpml9hdcxvf8j2033x5liw26r3q8idpjmx2rij63w2956c84ii";
-      name = "qtdoc-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtgamepad = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtgamepad-opensource-src-5.8.0.tar.xz";
-      sha256 = "0dwcrq60h802z694h4108figlr3yvp8fpzhwjzbjm503v8yaxw5j";
-      name = "qtgamepad-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtgraphicaleffects = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtgraphicaleffects-opensource-src-5.8.0.tar.xz";
-      sha256 = "06frknb7m8bgg55rs7jjm61iziisy2ykzrrc5dy3vj0aad89najz";
-      name = "qtgraphicaleffects-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtimageformats = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtimageformats-opensource-src-5.8.0.tar.xz";
-      sha256 = "0vv0wh5q5sih294x661djzwvgdwy7r6xpnxsc111k5hwq7m5w13m";
-      name = "qtimageformats-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtlocation = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtlocation-opensource-src-5.8.0.tar.xz";
-      sha256 = "1fqssa8rhq83lnxjcdh4ijqck3lmqglpk8yax8x17w49v6gf78a8";
-      name = "qtlocation-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtmacextras = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtmacextras-opensource-src-5.8.0.tar.xz";
-      sha256 = "049lbxy6yxv7yii7zxibfbix0q2p8fn58dsbc33rn40gbs7rj9zf";
-      name = "qtmacextras-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtmultimedia = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtmultimedia-opensource-src-5.8.0.tar.xz";
-      sha256 = "01sakngvsqr90qhrxyghfqdpddpxwbjyzzhm34k0hlpr6i409g58";
-      name = "qtmultimedia-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtnetworkauth = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtnetworkauth-opensource-src-5.8.0.tar.xz";
-      sha256 = "1hz4lcm4cai56v0q7h1q6zc29ykkb2191iqmf8h7l5l9m71q2mb1";
-      name = "qtnetworkauth-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtpurchasing = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtpurchasing-opensource-src-5.8.0.tar.xz";
-      sha256 = "0mdkw73yx1csz9mf3wl0w1x1b8cv9j5px4nvakrknkjzaa9qgzdk";
-      name = "qtpurchasing-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtquickcontrols = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtquickcontrols-opensource-src-5.8.0.tar.xz";
-      sha256 = "09mkswxw7wa2l8xz9fbblxr1pbi86hggis55j4k8ifnrrw60vrq4";
-      name = "qtquickcontrols-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtquickcontrols2 = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtquickcontrols2-opensource-src-5.8.0.tar.xz";
-      sha256 = "06yy98x4vic2yrlpp83gf4kvl7kd93q62k178w0cy4sgqxp8d6dh";
-      name = "qtquickcontrols2-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtscript = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtscript-opensource-src-5.8.0.tar.xz";
-      sha256 = "1lssbsjf2p2ag02fjq6k6vk7vywhj4jsl286r2fqi78q5lfvjfi9";
-      name = "qtscript-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtscxml = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtscxml-opensource-src-5.8.0.tar.xz";
-      sha256 = "1i4xl24q4i32mbhyndrwaz0xj79d9n84s320gmkf5rwnfcwrvfxn";
-      name = "qtscxml-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtsensors = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtsensors-opensource-src-5.8.0.tar.xz";
-      sha256 = "15p7bp21yj4cdl5yfc9qnn4lhhiwiwx3b71lrb431kgqxhwhcp9s";
-      name = "qtsensors-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtserialbus = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtserialbus-opensource-src-5.8.0.tar.xz";
-      sha256 = "02n1b1wrvfg6c7z15c5c5gv9r5gd4pp58jrd1a8d8fg3ybcksd2q";
-      name = "qtserialbus-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtserialport = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtserialport-opensource-src-5.8.0.tar.xz";
-      sha256 = "1b86al3zn1pxyk0n59vh8bqxrpz2m0j33ygclaqbxl1sszg7ycaj";
-      name = "qtserialport-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtspeech = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtspeech-opensource-src-5.8.0.tar.xz";
-      sha256 = "0i2cx1b6ssj56p5blf7n16bbrq1g0hb27m3b5r6dh6py7mcq2spi";
-      name = "qtspeech-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtsvg = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtsvg-opensource-src-5.8.0.tar.xz";
-      sha256 = "12fwzbp28szqw1sk3flb8i6xnxgl94siwyy41ffdmd0s44f1jwwq";
-      name = "qtsvg-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qttools = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qttools-opensource-src-5.8.0.tar.xz";
-      sha256 = "10wx4vydj91yag30457c7azx4ihrwky42l7zzwkbmdlksdv8xv4m";
-      name = "qttools-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qttranslations = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qttranslations-opensource-src-5.8.0.tar.xz";
-      sha256 = "0bpwqclidji12f3f20hfpafr1b7b9wc7nhp4yhms1hhbqlpgfz1v";
-      name = "qttranslations-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtvirtualkeyboard = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtvirtualkeyboard-opensource-src-5.8.0.tar.xz";
-      sha256 = "0772yhb8w6rzxqgrdmvbw61vk2gagcs9zics56v3a2ckknrzbz9m";
-      name = "qtvirtualkeyboard-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwayland = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwayland-opensource-src-5.8.0.tar.xz";
-      sha256 = "06ilh55vaxbkyv7irw0n11gxgc34ypx2qhqawxzy7kllzg9zcl7z";
-      name = "qtwayland-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebchannel = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwebchannel-opensource-src-5.8.0.tar.xz";
-      sha256 = "0jhbgp9rdp5lpwjrykxmg4lb60wk7gm3dldz5kp3b8ms2dab3xav";
-      name = "qtwebchannel-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebengine = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz";
-      sha256 = "1gkrvb8wa04p91hras2pa7i26n1q5xgsiq5gfw3fc488cvqj4g92";
-      name = "qtwebengine-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebkit = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/community_releases/5.8/5.8.0-final/qtwebkit-opensource-src-5.8.0.tar.xz";
-      sha256 = "1v0vj6slyh19mjrrpbqdzb47fr0f4xk7bc8803xjzybb11h8dbkr";
-      name = "qtwebkit-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebkit-examples = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/community_releases/5.8/5.8.0-final/qtwebkit-examples-opensource-src-5.8.0.tar.xz";
-      sha256 = "18ar35mg32knm3r0wgqv1hmxl9pqhi1y0yhd3lbskca0f0csxiw4";
-      name = "qtwebkit-examples-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebsockets = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwebsockets-opensource-src-5.8.0.tar.xz";
-      sha256 = "1xa5p36grqxz3fa08amn7r3dy6k28g6y0gkc6jgj7lyhjzr0l4da";
-      name = "qtwebsockets-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwebview = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwebview-opensource-src-5.8.0.tar.xz";
-      sha256 = "1lvzab6vjmpsl3rq73afhvjv6hkkgj19sl6sd03fgx0iikfd9n5p";
-      name = "qtwebview-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtwinextras = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtwinextras-opensource-src-5.8.0.tar.xz";
-      sha256 = "1761qaqbrsqqpznv2mrkc44fk4x3lc13x6s0z3ahjms6pna7pzr7";
-      name = "qtwinextras-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtx11extras = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtx11extras-opensource-src-5.8.0.tar.xz";
-      sha256 = "03i8lk9qcdf8h2k4f3rkqqkzbrlnyaspv9mgjkn4k61s2asz5mxy";
-      name = "qtx11extras-opensource-src-5.8.0.tar.xz";
-    };
-  };
-  qtxmlpatterns = {
-    version = "5.8.0";
-    src = fetchurl {
-      url = "${mirror}/official_releases/qt/5.8/5.8.0/submodules/qtxmlpatterns-opensource-src-5.8.0.tar.xz";
-      sha256 = "016s75j2cml7kc8scdm9a6pmxm8jhs424lml2h9znm1flmgadzvv";
-      name = "qtxmlpatterns-opensource-src-5.8.0.tar.xz";
-    };
-  };
-}
diff --git a/pkgs/development/libraries/qt-5/5.8/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix
index fd4769a02c6a..fd4769a02c6a 100644
--- a/pkgs/development/libraries/qt-5/5.8/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.9/fetch.sh b/pkgs/development/libraries/qt-5/5.9/fetch.sh
new file mode 100644
index 000000000000..60acf2cea9d2
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.9/fetch.sh
@@ -0,0 +1,3 @@
+WGET_ARGS=( http://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/ \
+            http://download.qt.io/community_releases/5.9/5.9.0-final/ \
+            -A '*.tar.xz' )
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch
index 3408b235e0c0..9616f5812cfd 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/cmake-paths.patch
@@ -1,7 +1,7 @@
-Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-+++ qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
 @@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
  endif()
  !!ENDIF
@@ -97,7 +97,7 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
      )
  !!ELSE
      set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-@@ -255,7 +221,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
+@@ -281,7 +247,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
  !!IF isEmpty(CMAKE_DEBUG_TYPE)
  !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
  !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@@ -106,7 +106,7 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
  !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
      if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
  !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
-@@ -263,13 +229,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
+@@ -289,13 +255,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
  !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
      if (EXISTS
  !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
@@ -122,7 +122,7 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
  !!ELSE
          \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
  !!ENDIF
-@@ -292,7 +258,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
+@@ -318,7 +284,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
  !!IF isEmpty(CMAKE_RELEASE_TYPE)
  !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
  !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@@ -131,7 +131,7 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
  !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
      if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
  !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
-@@ -300,13 +266,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
+@@ -326,13 +292,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
  !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
      if (EXISTS
  !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
@@ -147,7 +147,7 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
  !!ELSE
          \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
  !!ENDIF
-@@ -328,11 +294,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
+@@ -354,11 +320,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME
      macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
          set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
  
@@ -160,10 +160,10 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5BasicConfig.cm
          _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
          set_target_properties(Qt5::${Plugin} PROPERTIES
              \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
-Index: qtbase-opensource-src-5.8.0/src/gui/Qt5GuiConfigExtras.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/gui/Qt5GuiConfigExtras.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/gui/Qt5GuiConfigExtras.cmake.in
++++ qtbase-opensource-src-5.9.0/src/gui/Qt5GuiConfigExtras.cmake.in
 @@ -2,7 +2,7 @@
  !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
  
@@ -189,10 +189,10 @@ Index: qtbase-opensource-src-5.8.0/src/gui/Qt5GuiConfigExtras.cmake.in
  !!ELSE
      set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/widgets/Qt5WidgetsConfigExtras.cmake.in
++++ qtbase-opensource-src-5.9.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
 @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
      add_executable(Qt5::uic IMPORTED)
  
@@ -202,10 +202,10 @@ Index: qtbase-opensource-src-5.8.0/src/widgets/Qt5WidgetsConfigExtras.cmake.in
  !!ELSE
      set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtras.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtras.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtras.cmake.in
++++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtras.cmake.in
 @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
      add_executable(Qt5::qmake IMPORTED)
  
@@ -251,10 +251,10 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtras.cmake.in
  !!ELSE
      set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
++++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
 @@ -1,6 +1,6 @@
  
  !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
@@ -263,10 +263,10 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDirForIn
  !!ELSE
  set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
++++ qtbase-opensource-src-5.9.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
 @@ -1,6 +1,6 @@
  
  !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
@@ -275,10 +275,10 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmak
  !!ELSE
  set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/src/dbus/Qt5DBusConfigExtras.cmake.in
+Index: qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in
-+++ qtbase-opensource-src-5.8.0/src/dbus/Qt5DBusConfigExtras.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/src/dbus/Qt5DBusConfigExtras.cmake.in
++++ qtbase-opensource-src-5.9.0/src/dbus/Qt5DBusConfigExtras.cmake.in
 @@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
      add_executable(Qt5::qdbuscpp2xml IMPORTED)
  
@@ -297,10 +297,10 @@ Index: qtbase-opensource-src-5.8.0/src/dbus/Qt5DBusConfigExtras.cmake.in
  !!ELSE
      set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
  !!ENDIF
-Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+Index: qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-+++ qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
++++ qtbase-opensource-src-5.9.0/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
 @@ -2,10 +2,10 @@
  add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
  
@@ -314,10 +314,10 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5PluginTarget.c
  !!ENDIF
  
  list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
-Index: qtbase-opensource-src-5.8.0/mkspecs/features/create_cmake.prf
+Index: qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/mkspecs/features/create_cmake.prf
-+++ qtbase-opensource-src-5.8.0/mkspecs/features/create_cmake.prf
+--- qtbase-opensource-src-5.9.0.orig/mkspecs/features/create_cmake.prf
++++ qtbase-opensource-src-5.9.0/mkspecs/features/create_cmake.prf
 @@ -136,28 +136,28 @@ contains(CONFIG, plugin) {
  
      win32 {
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch
index 225d47f8e229..720e7d81fa22 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/compose-search-path.patch
@@ -1,8 +1,8 @@
-Index: qtbase-opensource-src-5.8.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
+Index: qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
-+++ qtbase-opensource-src-5.8.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
-@@ -258,12 +258,9 @@ void TableGenerator::initPossibleLocatio
+--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
++++ qtbase-opensource-src-5.9.0/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
+@@ -265,12 +265,9 @@ void TableGenerator::initPossibleLocatio
      m_possibleLocations.reserve(7);
      if (qEnvironmentVariableIsSet("QTCOMPOSE"))
          m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE")));
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix
index 93be661b7dab..a4451a486ce1 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/default.nix
@@ -9,7 +9,7 @@
 
   dbus, dconf, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite,
   libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff,
-  libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, sqlite, udev,
+  libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre2, sqlite, udev,
   xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs,
   zlib,
 
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
 
   propagatedBuildInputs =
     [
-      libxml2 libxslt openssl pcre16 sqlite zlib
+      libxml2 libxslt openssl pcre2 sqlite zlib
 
       # Text rendering
       harfbuzz icu
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gl.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch
index c835f2bfe441..9385c7f6678c 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gl.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gl.patch
@@ -1,9 +1,9 @@
-Index: qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
-+++ qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
-@@ -576,7 +576,14 @@ QFunctionPointer QGLXContext::getProcAdd
- #ifndef QT_NO_LIBRARY
+--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
++++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+@@ -580,7 +580,14 @@ QFunctionPointer QGLXContext::getProcAdd
+ #if QT_CONFIG(library)
                  extern const QString qt_gl_library_name();
  //                QLibrary lib(qt_gl_library_name());
 +                // Check system library paths first
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gtkstyle.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch
index 755b0965cf5f..755b0965cf5f 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-gtkstyle.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-gtkstyle.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch
index d0e82cf122ac..31339abc7856 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-libXcursor.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-libXcursor.patch
@@ -1,9 +1,9 @@
-Index: qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/qxcbcursor.cpp
+Index: qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp
-+++ qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/qxcbcursor.cpp
-@@ -309,13 +309,13 @@ QXcbCursor::QXcbCursor(QXcbConnection *c
- #if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
+--- qtbase-opensource-src-5.9.0.orig/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ qtbase-opensource-src-5.9.0/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -311,10 +311,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *c
+ #if defined(XCB_USE_XLIB) && QT_CONFIG(library)
      static bool function_ptrs_not_initialized = true;
      if (function_ptrs_not_initialized) {
 -        QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
@@ -15,6 +15,3 @@ Index: qtbase-opensource-src-5.8.0/src/plugins/platforms/xcb/qxcbcursor.cpp
              xcursorFound = xcursorLib.load();
          }
          if (xcursorFound) {
-             ptrXcursorLibraryLoadCursor =
-                 (PtrXcursorLibraryLoadCursor) xcursorLib.resolve("XcursorLibraryLoadCursor");
-             ptrXcursorLibraryGetTheme =
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch
index ef7cd4a910a2..598456a49ffb 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/dlopen-resolv.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/dlopen-resolv.patch
@@ -1,8 +1,8 @@
-Index: qtbase-opensource-src-5.8.0/src/network/kernel/qdnslookup_unix.cpp
+Index: qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/network/kernel/qdnslookup_unix.cpp
-+++ qtbase-opensource-src-5.8.0/src/network/kernel/qdnslookup_unix.cpp
-@@ -90,7 +90,7 @@ static bool resolveLibraryInternal()
+--- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qdnslookup_unix.cpp
++++ qtbase-opensource-src-5.9.0/src/network/kernel/qdnslookup_unix.cpp
+@@ -92,7 +92,7 @@ static bool resolveLibraryInternal()
      if (!lib.load())
  #endif
      {
@@ -11,11 +11,11 @@ Index: qtbase-opensource-src-5.8.0/src/network/kernel/qdnslookup_unix.cpp
          if (!lib.load())
              return false;
      }
-Index: qtbase-opensource-src-5.8.0/src/network/kernel/qhostinfo_unix.cpp
+Index: qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/network/kernel/qhostinfo_unix.cpp
-+++ qtbase-opensource-src-5.8.0/src/network/kernel/qhostinfo_unix.cpp
-@@ -100,7 +100,7 @@ static bool resolveLibraryInternal()
+--- qtbase-opensource-src-5.9.0.orig/src/network/kernel/qhostinfo_unix.cpp
++++ qtbase-opensource-src-5.9.0/src/network/kernel/qhostinfo_unix.cpp
+@@ -102,7 +102,7 @@ static bool resolveLibraryInternal()
      if (!lib.load())
  #endif
      {
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch
index 38eecbe2c646..4c24d73ed364 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/library-paths.patch
@@ -1,8 +1,8 @@
-Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
+Index: qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/kernel/qcoreapplication.cpp
-+++ qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
-@@ -2476,6 +2476,15 @@ QStringList QCoreApplication::libraryPat
+--- qtbase-opensource-src-5.9.0.orig/src/corelib/kernel/qcoreapplication.cpp
++++ qtbase-opensource-src-5.9.0/src/corelib/kernel/qcoreapplication.cpp
+@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPat
          QStringList *app_libpaths = new QStringList;
          coreappdata()->app_libpaths.reset(app_libpaths);
  
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/libressl.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch
index e9c60e7ab076..e9c60e7ab076 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/libressl.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/libressl.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch
index 8e5e2c71828a..8e5e2c71828a 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/qgtk-env.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/qnativesocketengine-type-pun.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch
index ad40dfab2f7b..ad40dfab2f7b 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/qnativesocketengine-type-pun.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/qnativesocketengine-type-pun.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/series b/pkgs/development/libraries/qt-5/5.9/qtbase/series
index f3387694518a..4f354e87c847 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/series
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/series
@@ -1,7 +1,6 @@
 dlopen-resolv.patch
 tzdir.patch
 dlopen-libXcursor.patch
-xdg-config-dirs.patch
 library-paths.patch
 libressl.patch
 dlopen-gl.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/tzdir.patch b/pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch
index b8c05815a784..d57f24c3ed0a 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/tzdir.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtbase/tzdir.patch
@@ -1,7 +1,7 @@
-Index: qtbase-opensource-src-5.8.0/src/corelib/tools/qtimezoneprivate_tz.cpp
+Index: qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp
 ===================================================================
---- qtbase-opensource-src-5.8.0.orig/src/corelib/tools/qtimezoneprivate_tz.cpp
-+++ qtbase-opensource-src-5.8.0/src/corelib/tools/qtimezoneprivate_tz.cpp
+--- qtbase-opensource-src-5.9.0.orig/src/corelib/tools/qtimezoneprivate_tz.cpp
++++ qtbase-opensource-src-5.9.0/src/corelib/tools/qtimezoneprivate_tz.cpp
 @@ -70,7 +70,11 @@ typedef QHash<QByteArray, QTzTimeZone> Q
  // Parse zone.tab table, assume lists all installed zones, if not will need to read directories
  static QTzTimeZoneHash loadTzTimeZones()
@@ -15,7 +15,7 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/tools/qtimezoneprivate_tz.cpp
      if (!QFile::exists(path))
          path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
  
-@@ -642,12 +646,16 @@ void QTzTimeZonePrivate::init(const QByt
+@@ -643,12 +647,16 @@ void QTzTimeZonePrivate::init(const QByt
          if (!tzif.open(QIODevice::ReadOnly))
              return;
      } else {
diff --git a/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix b/pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix
index 1c10535c7853..1c10535c7853 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtconnectivity.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix
index cc6653348859..cc6653348859 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch
index d50ee823a78b..d50ee823a78b 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/import-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/series
index 38abb916a508..38abb916a508 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series
+++ b/pkgs/development/libraries/qt-5/5.9/qtdeclarative/series
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdoc.nix b/pkgs/development/libraries/qt-5/5.9/qtdoc.nix
index 7f979ee94c0f..7f979ee94c0f 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdoc.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtdoc.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtgraphicaleffects.nix b/pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix
index 3273f12eb830..3273f12eb830 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtgraphicaleffects.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtgraphicaleffects.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtimageformats.nix b/pkgs/development/libraries/qt-5/5.9/qtimageformats.nix
index 03d0fffbe80e..03d0fffbe80e 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtimageformats.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtimageformats.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtlocation.nix b/pkgs/development/libraries/qt-5/5.9/qtlocation.nix
index 0eabe04e478c..24f0b648723e 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtlocation.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtlocation.nix
@@ -8,4 +8,6 @@ qtSubmodule {
     moveToOutput "$qtPluginPrefix" "$bin"
     moveToOutput "$qtQmlPrefix" "$bin"
   '';
+  # Linking with -lclipper fails with parallel build enabled
+  enableParallelBuild = false;
 }
diff --git a/pkgs/development/libraries/qt-5/5.8/qtmacextras.nix b/pkgs/development/libraries/qt-5/5.9/qtmacextras.nix
index 582294cc7f76..582294cc7f76 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtmacextras.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtmacextras.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix b/pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix
index e133256e9004..e133256e9004 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtmultimedia.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols.nix b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix
index 93a864621b82..93a864621b82 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix
index 1a52d1802cee..1a52d1802cee 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtquickcontrols2.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtscript/0001-glib-2.32.patch b/pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch
index 887e107b6c1b..887e107b6c1b 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtscript/0001-glib-2.32.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtscript/0001-glib-2.32.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtscript/default.nix b/pkgs/development/libraries/qt-5/5.9/qtscript/default.nix
index 127766e2ebd6..127766e2ebd6 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtscript/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtscript/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix b/pkgs/development/libraries/qt-5/5.9/qtsensors.nix
index 75829d3f0aaf..75829d3f0aaf 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtsensors.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix
index 925e8a808f25..925e8a808f25 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtserialport/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch
index 65bb64710ebd..65bb64710ebd 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtserialport/qtserialport-dlopen-udev.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/series b/pkgs/development/libraries/qt-5/5.9/qtserialport/series
index 83f4abf094e9..83f4abf094e9 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtserialport/series
+++ b/pkgs/development/libraries/qt-5/5.9/qtserialport/series
diff --git a/pkgs/development/libraries/qt-5/5.8/qtsvg.nix b/pkgs/development/libraries/qt-5/5.9/qtsvg.nix
index 0e21cf89340a..0e21cf89340a 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtsvg.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtsvg.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qttools/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch
index dfcba9045a75..dfcba9045a75 100644
--- a/pkgs/development/libraries/qt-5/5.8/qttools/cmake-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qttools/cmake-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix b/pkgs/development/libraries/qt-5/5.9/qttools/default.nix
index 8c231271607c..8c231271607c 100644
--- a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qttools/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qttools/series b/pkgs/development/libraries/qt-5/5.9/qttools/series
index 6cc1d3b87bca..6cc1d3b87bca 100644
--- a/pkgs/development/libraries/qt-5/5.8/qttools/series
+++ b/pkgs/development/libraries/qt-5/5.9/qttools/series
diff --git a/pkgs/development/libraries/qt-5/5.8/qttranslations.nix b/pkgs/development/libraries/qt-5/5.9/qttranslations.nix
index 50fc8cf6826a..50fc8cf6826a 100644
--- a/pkgs/development/libraries/qt-5/5.8/qttranslations.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qttranslations.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwayland.nix b/pkgs/development/libraries/qt-5/5.9/qtwayland.nix
index 7b7bd2f6ebcc..3e5deea7ec16 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwayland.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtwayland.nix
@@ -8,6 +8,6 @@ qtSubmodule {
   outputs = [ "out" "dev" "bin" ];
   postInstall = ''
     moveToOutput "$qtPluginPrefix" "$bin"
-    moveToOutput "$qtQmlPrefix "$bin"
+    moveToOutput "$qtQmlPrefix" "$bin"
   '';
 }
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix b/pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix
index 50a539dbe729..50a539dbe729 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebchannel.nix
diff --git a/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix
new file mode 100644
index 000000000000..1684e6aac707
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebengine/default.nix
@@ -0,0 +1,113 @@
+{ qtSubmodule, qtquickcontrols, qtlocation, qtwebchannel
+
+, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which
+
+, xlibs, libXcursor, libXScrnSaver, libXrandr, libXtst
+, fontconfig, freetype, harfbuzz, icu, dbus
+, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus
+, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent
+, alsaLib
+, libcap
+, pciutils
+, systemd
+
+, enableProprietaryCodecs ? true
+
+, lib, stdenv # lib.optional, needsPax
+}:
+
+with stdenv.lib;
+
+qtSubmodule {
+  name = "qtwebengine";
+  qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
+  nativeBuildInputs = [
+    bison coreutils flex git gperf ninja pkgconfig python2 which
+  ];
+  doCheck = true;
+  outputs = [ "out" "dev" "bin" ];
+
+  enableParallelBuilding = true;
+
+  postPatch =
+    # Patch Chromium build tools
+    ''
+      ( cd src/3rdparty/chromium; patchShebangs . )
+    ''
+    # Patch Chromium build files
+    + ''
+      substituteInPlace ./src/3rdparty/chromium/build/common.gypi \
+        --replace /bin/echo ${coreutils}/bin/echo
+      substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi \
+        --replace /bin/echo ${coreutils}/bin/echo
+      substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi \
+        --replace /bin/echo ${coreutils}/bin/echo
+    ''
+    # Patch library paths in Qt sources
+    + ''
+      sed -i \
+        -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \
+        -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
+        -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
+        src/core/web_engine_library_info.cpp
+    ''
+    # Patch library paths in Chromium sources
+    + optionalString (!stdenv.isDarwin) ''
+      sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
+        src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
+
+      sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
+        src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
+    '';
+
+  preConfigure = ''
+    export MAKEFLAGS=-j$NIX_BUILD_CORES
+ '';
+
+  qmakeFlags =
+    [
+      # Use system Ninja because bootstrapping it is fragile
+      "WEBENGINE_CONFIG+=use_system_ninja"
+    ] ++ optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs";
+
+  propagatedBuildInputs = [
+    # Image formats
+    libjpeg libpng libtiff libwebp
+
+    # Video formats
+    srtp libvpx
+
+    # Audio formats
+    libopus
+
+    # Text rendering
+    harfbuzz icu
+  ]
+  ++ optionals (!stdenv.isDarwin) [
+    dbus zlib minizip snappy nss protobuf jsoncpp libevent
+
+    # Audio formats
+    alsaLib
+
+    # Text rendering
+    fontconfig freetype
+
+    libcap
+    pciutils
+
+    # X11 libs
+    xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
+    xlibs.libXcomposite
+  ];
+  patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
+  postInstall = ''
+    cat > $out/libexec/qt.conf <<EOF
+    [Paths]
+    Prefix = ..
+    EOF
+
+    paxmark m $out/libexec/QtWebEngineProcess
+
+    moveToOutput "$qtQmlPrefix" "$bin"
+  '';
+}
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebengine/qtwebengine-paxmark-mksnapshot.patch b/pkgs/development/libraries/qt-5/5.9/qtwebengine/qtwebengine-paxmark-mksnapshot.patch
index 49d4c4f042b6..5e170567ce5d 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebengine/qtwebengine-paxmark-mksnapshot.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebengine/qtwebengine-paxmark-mksnapshot.patch
@@ -1,23 +1,25 @@
---- qtwebengine-opensource-src-5.8.0-orig/src/3rdparty/chromium/v8/src/v8.gyp	2016-03-04 01:48:36.000000000 +1100
-+++ qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp	2016-05-01 19:15:44.052770543 +1000
-@@ -33,6 +33,7 @@
-     'embed_script%': "",
-     'v8_extra_library_files%': [],
+Index: qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/v8.gyp
+===================================================================
+--- qtwebengine-opensource-src-5.9.0.orig/src/3rdparty/chromium/v8/src/v8.gyp
++++ qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/v8.gyp
+@@ -36,6 +36,7 @@
+     'v8_experimental_extra_library_files%': [],
+     'v8_enable_inspector%': 0,
      'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
 +    'mksnapshot_u_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_u<(EXECUTABLE_SUFFIX)',
-     'remove_v8base_debug_symbols%': 0,
+     'mkpeephole_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkpeephole<(EXECUTABLE_SUFFIX)',
+     'v8_os_page_size%': 0,
    },
-   'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
-@@ -1913,7 +1914,7 @@
+@@ -2432,7 +2433,7 @@
          ]
      },
      {
 -      'target_name': 'mksnapshot',
 +      'target_name': 'mksnapshot_u',
        'type': 'executable',
-       'dependencies': ['v8_base', 'v8_nosnapshot', 'v8_libplatform'],
-       'include_dirs+': [
-@@ -1936,5 +1937,26 @@
+       'dependencies': [
+         'v8_base',
+@@ -2485,5 +2486,26 @@
          }],
        ],
      },
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.9/qtwebkit/default.nix
index 664281aac311..664281aac311 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit/default.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-gtk.patch
index e34eda592af7..e34eda592af7 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-gtk.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-udev.patch
index e69de29bb2d1..e69de29bb2d1 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-dlopen-udev.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-icucore-darwin.patch
index 63c653da94ef..63c653da94ef 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit/qtwebkit-icucore-darwin.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/series b/pkgs/development/libraries/qt-5/5.9/qtwebkit/series
index 140e2a3dd4e2..140e2a3dd4e2 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/series
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebkit/series
diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix b/pkgs/development/libraries/qt-5/5.9/qtwebsockets.nix
index 925adce75a92..925adce75a92 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtwebsockets.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtx11extras.nix b/pkgs/development/libraries/qt-5/5.9/qtx11extras.nix
index a765161e2d7e..a765161e2d7e 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtx11extras.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtx11extras.nix
diff --git a/pkgs/development/libraries/qt-5/5.8/qtxmlpatterns.nix b/pkgs/development/libraries/qt-5/5.9/qtxmlpatterns.nix
index 9a8ddbba2bd2..9a8ddbba2bd2 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtxmlpatterns.nix
+++ b/pkgs/development/libraries/qt-5/5.9/qtxmlpatterns.nix
diff --git a/pkgs/development/libraries/qt-5/5.9/srcs.nix b/pkgs/development/libraries/qt-5/5.9/srcs.nix
new file mode 100644
index 000000000000..021cd935a14c
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.9/srcs.nix
@@ -0,0 +1,333 @@
+# DO NOT EDIT! This file is generated automatically by fetch-kde-qt.sh
+{ fetchurl, mirror }:
+
+{
+  qt3d = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qt3d-opensource-src-5.9.0.tar.xz";
+      sha256 = "1a8v70svsqxissj0rmna71f9g2w56w0zgk5s41m5acgvi9byzywy";
+      name = "qt3d-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtactiveqt = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtactiveqt-opensource-src-5.9.0.tar.xz";
+      sha256 = "0d8n4q3r54kkb340ap802cc97jznhffzx1m7h2775q0h2nzvmiyp";
+      name = "qtactiveqt-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtandroidextras = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtandroidextras-opensource-src-5.9.0.tar.xz";
+      sha256 = "0xq3nd8nlbmd617lq60nb2lxblc84lk8wh14n18b3q81nsvc2yln";
+      name = "qtandroidextras-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtbase = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtbase-opensource-src-5.9.0.tar.xz";
+      sha256 = "0v19spxa4sfq0a35nab9n8n2s3jd0443px0k45zhhg103apv4zi6";
+      name = "qtbase-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtcanvas3d = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtcanvas3d-opensource-src-5.9.0.tar.xz";
+      sha256 = "1jrv79rhpqyp4ip5fnf40plqcq9byl1fy8287ghq4jfhpm9bq5yq";
+      name = "qtcanvas3d-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtcharts = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtcharts-opensource-src-5.9.0.tar.xz";
+      sha256 = "17m86csjymvcnprk8m4y6hx1qhlk9811rhqwwkqdymyyswx6xs3l";
+      name = "qtcharts-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtconnectivity = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtconnectivity-opensource-src-5.9.0.tar.xz";
+      sha256 = "0k52acsywr849nw86dfjqcv1lqgnq01akqrm0qjs7ysm1ayg8mcp";
+      name = "qtconnectivity-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtdatavis3d = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtdatavis3d-opensource-src-5.9.0.tar.xz";
+      sha256 = "1wvilla48jlw6zv2hc32ra0bs8p13s68sqbgr91bzbn7h7qaysv9";
+      name = "qtdatavis3d-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtdeclarative = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtdeclarative-opensource-src-5.9.0.tar.xz";
+      sha256 = "1g9yz7q2laqs80m4i6zngxrq3pd7z5khr2f48glma8cmiw4p56rw";
+      name = "qtdeclarative-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtdoc = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtdoc-opensource-src-5.9.0.tar.xz";
+      sha256 = "1k67i67npcjyr89hlnljjxw5jkh49ql8yzw9m9b4gld7nk9dr4kr";
+      name = "qtdoc-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtgamepad = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtgamepad-opensource-src-5.9.0.tar.xz";
+      sha256 = "0lpj2qspidx6s2568m5v40j2zdnrl8zwjdp40zg4y2q6hy2gg597";
+      name = "qtgamepad-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtgraphicaleffects = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtgraphicaleffects-opensource-src-5.9.0.tar.xz";
+      sha256 = "1cz4ykwlm1c0hbv4d8y07bwyz87nkz5l9ss3f65vadm8zcabqw55";
+      name = "qtgraphicaleffects-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtimageformats = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtimageformats-opensource-src-5.9.0.tar.xz";
+      sha256 = "10alm3kz3md835hf5hx7322bak9pp9igi2knvymxsjqr8x87jq94";
+      name = "qtimageformats-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtlocation = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtlocation-opensource-src-5.9.0.tar.xz";
+      sha256 = "1xia1y1pjill9m880rgmsl2zshcg1nvwkyfdb2lz8g8x9fj0pvp3";
+      name = "qtlocation-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtmacextras = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtmacextras-opensource-src-5.9.0.tar.xz";
+      sha256 = "1przk4dbyjdy18a5x1c4m04v40d70nkgwc569zjccpbqz0a0agbx";
+      name = "qtmacextras-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtmultimedia = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtmultimedia-opensource-src-5.9.0.tar.xz";
+      sha256 = "1vk0vlp9wapj1pip5v0v0sxynlig38m3a1qbjhid3rm27f971cqb";
+      name = "qtmultimedia-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtnetworkauth = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtnetworkauth-opensource-src-5.9.0.tar.xz";
+      sha256 = "157byylzir8cr5y407qpjmz9ag0b0qaz99n99nl2xjxkyll8ph0g";
+      name = "qtnetworkauth-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtpurchasing = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtpurchasing-opensource-src-5.9.0.tar.xz";
+      sha256 = "0xcka24qjdydqhf7fhn2i2ycn3zsi4vzqv9s77wzmaksrazwb13q";
+      name = "qtpurchasing-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtquickcontrols = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtquickcontrols-opensource-src-5.9.0.tar.xz";
+      sha256 = "1zjl2wp5407y8iabwi30j4jpxh2j4y0ijb5jvvpdq583nbzgyg8p";
+      name = "qtquickcontrols-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtquickcontrols2 = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtquickcontrols2-opensource-src-5.9.0.tar.xz";
+      sha256 = "170xgk4jw1b1rpq8838dc5sb0dyv1jap3yfgg5hymrjzrk0nzaq9";
+      name = "qtquickcontrols2-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtremoteobjects = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtremoteobjects-opensource-src-5.9.0.tar.xz";
+      sha256 = "0f8dv7sswzck0l2md1zl44cbvi54mm6iiz4qh2hh3vqwyj9k5xyr";
+      name = "qtremoteobjects-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtscript = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtscript-opensource-src-5.9.0.tar.xz";
+      sha256 = "0r697ap324l8lnbqbhrrqzsl9k4nmk6lcijxlaqn3ksxgfzbcciw";
+      name = "qtscript-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtscxml = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtscxml-opensource-src-5.9.0.tar.xz";
+      sha256 = "0f2jnhl30ij6y4wzlvgjsqgpaywq4g0wc4yjw8s888vcfl062nb4";
+      name = "qtscxml-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtsensors = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtsensors-opensource-src-5.9.0.tar.xz";
+      sha256 = "0jdaw0i6rirs66x4cjh8l24fsyp020x1mv1psyf3ffbkdq1pngjx";
+      name = "qtsensors-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtserialbus = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtserialbus-opensource-src-5.9.0.tar.xz";
+      sha256 = "1zw32ha5hz7zsdp8m2dk58kivxd66vkzijbnhi8jvzjp4nf0pm1f";
+      name = "qtserialbus-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtserialport = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtserialport-opensource-src-5.9.0.tar.xz";
+      sha256 = "0zwxfbyn5rg6vyrgpi5c3n852vd32m37ghzyj4l50ljndlz2w0l0";
+      name = "qtserialport-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtspeech = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtspeech-opensource-src-5.9.0.tar.xz";
+      sha256 = "0da7q3j49hn9j2wy0ny4ym4nxy33yi8p62v9vrq9r9lb4xqjipcl";
+      name = "qtspeech-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtsvg = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtsvg-opensource-src-5.9.0.tar.xz";
+      sha256 = "0zpy53vb0ckaj71ffl450qv9kipl8gwwcbbras8kbg6bpl8srl8g";
+      name = "qtsvg-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qttools = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qttools-opensource-src-5.9.0.tar.xz";
+      sha256 = "1vl5lapnbaam51pfw89pshh6rxqwfrbpj0j8gdhzdngr6n79dzk4";
+      name = "qttools-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qttranslations = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qttranslations-opensource-src-5.9.0.tar.xz";
+      sha256 = "0xsgvk8j7zl4infgmrkhdmjkizcihddqn9sc5g1dv2d94gc83jaw";
+      name = "qttranslations-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtvirtualkeyboard = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtvirtualkeyboard-opensource-src-5.9.0.tar.xz";
+      sha256 = "0xks7n70631p5ij7vbww5ihni6iscx9hkdw8c97nnzb1bvvaqx19";
+      name = "qtvirtualkeyboard-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwayland = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwayland-opensource-src-5.9.0.tar.xz";
+      sha256 = "0zlxlxrc15x69jwhcc6h0xi4mfchbb3pf27y3zy22yi3ynv2p04v";
+      name = "qtwayland-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebchannel = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwebchannel-opensource-src-5.9.0.tar.xz";
+      sha256 = "1fg1g2h9s9v6lg10ix59pzws35fyh3hh5x2005pyp84xdg47mvqj";
+      name = "qtwebchannel-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebengine = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz";
+      sha256 = "085qq852kwb8rqw12w96647vfvsgqvw33wc4xn3cb2gwn1wsbm1f";
+      name = "qtwebengine-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebkit = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/community_releases/5.9/5.9.0-final/qtwebkit-opensource-src-5.9.0.tar.xz";
+      sha256 = "012fd8khiasfn8wx5ci310y94ap3y90a011f66cajm80fhxikbcd";
+      name = "qtwebkit-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebkit-examples = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/community_releases/5.9/5.9.0-final/qtwebkit-examples-opensource-src-5.9.0.tar.xz";
+      sha256 = "0zj700z90k4sss1b5zg4rlg5pkq79q72pql1d6zglrgp505s9a7x";
+      name = "qtwebkit-examples-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebsockets = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwebsockets-opensource-src-5.9.0.tar.xz";
+      sha256 = "1ml60p50hr3f68l0fiyqg2pf6n37flzxafzasis42jm4m757m5v2";
+      name = "qtwebsockets-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwebview = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwebview-opensource-src-5.9.0.tar.xz";
+      sha256 = "0ayjsdyymg9hrryn2y0c796cbwdf4hdpjdwjqkib57rblh5g39qw";
+      name = "qtwebview-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtwinextras = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtwinextras-opensource-src-5.9.0.tar.xz";
+      sha256 = "12xh6wqjn1wmvy7rzay6a0wyc31lgv1zida87kr67dbwblmax03j";
+      name = "qtwinextras-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtx11extras = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtx11extras-opensource-src-5.9.0.tar.xz";
+      sha256 = "0smzs29zqi77s1038ddkj3wzcchajqrjymwa5jgva7n2dn2x40wy";
+      name = "qtx11extras-opensource-src-5.9.0.tar.xz";
+    };
+  };
+  qtxmlpatterns = {
+    version = "5.9.0";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/5.9/5.9.0/submodules/qtxmlpatterns-opensource-src-5.9.0.tar.xz";
+      sha256 = "1f2mly7ddw4hpr3x0lpdahcikivwhiwa3238yrg4gz2c3lxj5y21";
+      name = "qtxmlpatterns-opensource-src-5.9.0.tar.xz";
+    };
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ce3f14ba8462..31fc83d45165 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9735,8 +9735,8 @@ with pkgs;
 
   libsForQt56 = recurseIntoAttrs (lib.makeScope qt56.newScope mkLibsForQt5);
 
-  qt58 = recurseIntoAttrs (makeOverridable
-    (import ../development/libraries/qt-5/5.8) {
+  qt59 = recurseIntoAttrs (makeOverridable
+    (import ../development/libraries/qt-5/5.9) {
       inherit newScope;
       inherit stdenv fetchurl makeSetupHook makeWrapper;
       bison = bison2; # error: too few arguments to function 'int yylex(...
@@ -9748,10 +9748,10 @@ with pkgs;
       inherit (gnome3) gtk3 dconf;
     });
 
-  libsForQt58 = recurseIntoAttrs (lib.makeScope qt58.newScope mkLibsForQt5);
+  libsForQt59 = recurseIntoAttrs (lib.makeScope qt59.newScope mkLibsForQt5);
 
-  qt5 = qt58;
-  libsForQt5 = libsForQt58;
+  qt5 = qt59;
+  libsForQt5 = libsForQt59;
 
   qt5ct = libsForQt5.callPackage ../tools/misc/qt5ct { };