gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
index 81334a3..47a7caa 100644 (file)
@@ -2,7 +2,9 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
+;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,7 +22,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages qt)
-  #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ lgpl3 x11-style))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build utils)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml))
 
+(define-public grantlee
+  (package
+    (name "grantlee")
+    (version "5.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/steveire/grantlee/archive/v"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
+    (native-inputs
+     `(("doxygen" ,doxygen)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtscript" ,qtscript)))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+                  (lambda _
+                    (zero? (system* "ctest" ;; exclude 2 tests which require a display
+                                    "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
+    (home-page "https://github.com/steveire/grantlee")
+    (synopsis "Libraries for text templating with Qt")
+    (description "Grantlee Templates can be used for theming and generation of
+other text such as code.  The syntax uses the syntax of the Django template
+system, and the core design of Django is reused in Grantlee.")
+    (license license:lgpl2.0+)))
+
 (define-public qt
   (package
     (name "qt")
-    (version "5.5.1")
+    (version "5.6.2")
     (source (origin
              (method url-fetch)
              (uri
                  version ".tar.xz"))
              (sha256
                (base32
-                 "0615cn4n3n78v48lnmapqz2jizm2pzrjwvsjlnsf4awrsiiqw0kg"))
+                 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
              (modules '((guix build utils)))
              (snippet
               '(begin
        ;; A more structural fix is needed.
        #:parallel-build? #f
        #:phases
-         (alist-replace
-          'configure
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              (substitute* '("configure" "qtbase/configure")
-                (("/bin/pwd") (which "pwd")))
-              (substitute* "qtbase/src/corelib/global/global.pri"
-                (("/bin/ls") (which "ls")))
-              ;; do not pass "--enable-fast-install", which makes the
-              ;; configure process fail
-              (zero? (system*
-                      "./configure"
-                      "-verbose"
-                      "-prefix" out
-                      "-opensource"
-                      "-confirm-license"
-                      ;; Most "-system-..." are automatic, but some use
-                      ;; the bundled copy by default.
-                      "-system-sqlite"
-                      "-system-harfbuzz"
-                      ;; explicitly link with openssl instead of dlopening it
-                      "-openssl-linked"
-                      ;; explicitly link with dbus instead of dlopening it
-                      "-dbus-linked"
-                      ;; drop special machine instructions not supported
-                      ;; on all instances of the target
-                      ,@(if (string-prefix? "x86_64"
-                                            (or (%current-target-system)
-                                                (%current-system)))
-                            '()
-                            '("-no-sse2"))
-                      "-no-sse3"
-                      "-no-ssse3"
-                      "-no-sse4.1"
-                      "-no-sse4.2"
-                      "-no-avx"
-                      "-no-avx2"
-                      "-no-mips_dsp"
-                      "-no-mips_dspr2"))))
-          %standard-phases)))
-    (home-page "http://qt-project.org/")
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-bin-sh
+           (lambda _
+             (substitute* '("qtbase/config.status"
+                            "qtbase/configure"
+                            "qtbase/mkspecs/features/qt_functions.prf"
+                            "qtbase/qmake/library/qmakebuiltins.cpp")
+                          (("/bin/sh") (which "sh")))
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* '("configure" "qtbase/configure")
+                 (("/bin/pwd") (which "pwd")))
+               (substitute* "qtbase/src/corelib/global/global.pri"
+                 (("/bin/ls") (which "ls")))
+               ;; do not pass "--enable-fast-install", which makes the
+               ;; configure process fail
+               (zero? (system*
+                       "./configure"
+                       "-verbose"
+                       "-prefix" out
+                       "-opensource"
+                       "-confirm-license"
+                       ;; Do not build examples; if desired, these could go
+                       ;; into a separate output, but for the time being, we
+                       ;; prefer to save the space and build time.
+                       "-nomake" "examples"
+                       ;; Most "-system-..." are automatic, but some use
+                       ;; the bundled copy by default.
+                       "-system-sqlite"
+                       "-system-harfbuzz"
+                       ;; explicitly link with openssl instead of dlopening it
+                       "-openssl-linked"
+                       ;; explicitly link with dbus instead of dlopening it
+                       "-dbus-linked"
+                       ;; drop special machine instructions not supported
+                       ;; on all instances of the target
+                       ,@(if (string-prefix? "x86_64"
+                                             (or (%current-target-system)
+                                                 (%current-system)))
+                             '()
+                             '("-no-sse2"))
+                       "-no-sse3"
+                       "-no-ssse3"
+                       "-no-sse4.1"
+                       "-no-sse4.2"
+                       "-no-avx"
+                       "-no-avx2"
+                       "-no-mips_dsp"
+                       "-no-mips_dspr2"))))))))
+    (home-page "https://www.qt.io/")
     (synopsis "Cross-platform GUI library")
     (description "Qt is a cross-platform application and UI framework for
 developers using C++ or QML, a CSS & JavaScript like language.")
-    (license lgpl2.1)
+    (license license:lgpl2.1)
 
     ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
     ;; see <http://hydra.gnu.org/build/112828>.
@@ -301,7 +349,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtbase
   (package
     (name "qtbase")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -309,8 +357,8 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  "/submodules/" name "-opensource-src-"
                                  version ".tar.xz"))
              (sha256
-               (base32
-                 "0r3jrqymnnxrig4f11xvs33c26f0kzfakbp3kcbdpv795gpc276h"))
+              (base32
+               "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -327,12 +375,14 @@ developers using C++ or QML, a CSS & JavaScript like language.")
      `(("alsa-lib" ,alsa-lib)
        ("cups" ,cups)
        ("dbus" ,dbus)
+       ("eudev" ,eudev)
        ("expat" ,expat)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("glib" ,glib)
        ("harfbuzz" ,harfbuzz)
        ("icu4c" ,icu4c)
+       ("libinput" ,libinput)
        ("libjpeg" ,libjpeg)
        ("libmng" ,libmng)
        ("libpng" ,libpng)
@@ -390,6 +440,13 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                  (("/bin/pwd") (which "pwd")))
                (substitute* "src/corelib/global/global.pri"
                  (("/bin/ls") (which "ls")))
+               ;; The configuration files for other Qt5 packages are searched
+               ;; through a call to "find_package" in Qt5Config.cmake, which
+               ;; disables the use of CMAKE_PREFIX_PATH via the parameter
+               ;; "NO_DEFAULT_PATH". Re-enable it so that the different
+               ;; components can be installed in different places.
+               (substitute* (find-files "." ".*\\.cmake")
+                 (("NO_DEFAULT_PATH") ""))
                ;; do not pass "--enable-fast-install", which makes the
                ;; configure process fail
                (zero? (system*
@@ -424,17 +481,58 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                        "-no-avx"
                        "-no-avx2"
                        "-no-mips_dsp"
-                       "-no-mips_dspr2"))))))))
+                       "-no-mips_dspr2")))))
+         (add-after 'install 'patch-qt_config.prf
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (qt_config.prf (string-append
+                                    out "/mkspecs/features/qt_config.prf")))
+               ;; For each Qt module, let `qmake' uses search paths in the
+               ;; module directory instead of all in QT_INSTALL_PREFIX.
+               (substitute* qt_config.prf
+                 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
+                  "$$replace(dir, mkspecs/modules, include)")
+                 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
+                  "$$replace(dir, mkspecs/modules, lib)")
+                 (("\\$\\$\\[QT_HOST_LIBS\\]")
+                  "$$replace(dir, mkspecs/modules, lib)")
+                 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
+                  "$$replace(dir, mkspecs/modules, plugins)")
+                 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
+                  "$$replace(dir, mkspecs/modules, libexec)")
+                 (("\\$\\$\\[QT_INSTALL_BINS\\]")
+                  "$$replace(dir, mkspecs/modules, bin)")
+                 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
+                  "$$replace(dir, mkspecs/modules, imports)")
+                 (("\\$\\$\\[QT_INSTALL_QML\\]")
+                  "$$replace(dir, mkspecs/modules, qml)"))
+               #t))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "QMAKEPATH")
+            (files '("")))
+           (search-path-specification
+            (variable "QML2_IMPORT_PATH")
+            (files '("qml")))
+           (search-path-specification
+            (variable "QT_PLUGIN_PATH")
+            (files '("plugins")))
+           (search-path-specification
+            (variable "XDG_DATA_DIRS")
+            (files '("share")))
+           (search-path-specification
+            (variable "XDG_CONFIG_DIRS")
+            (files '("etc/xdg")))))
     (home-page "https://www.qt.io/")
     (synopsis "Cross-platform GUI library")
     (description "Qt is a cross-platform application and UI framework for
 developers using C++ or QML, a CSS & JavaScript like language.")
-    (license (list lgpl2.1 lgpl3))))
+    (license (list license:lgpl2.1 license:lgpl3))))
 
 (define-public qtsvg
   (package (inherit qtbase)
     (name "qtsvg")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -443,7 +541,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "08ca5g46g75acy27jfnvnalmcias5hxmjp7491v3y4k9y7a4ybpi"))))
+               "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h"))))
     (propagated-inputs `())
     (native-inputs `(("perl" ,perl)))
     (inputs
@@ -456,19 +554,27 @@ developers using C++ or QML, a CSS & JavaScript like language.")
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
-               (zero? (system* "qmake" (string-append "PREFIX=" out))))))
+               ;; Valid QT_BUILD_PARTS variables are:
+               ;; libs tools tests examples demos docs translations
+               (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
+                               (string-append "PREFIX=" out))))))
          (add-before 'install 'fix-Makefiles
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out    (assoc-ref outputs "out"))
                    (qtbase (assoc-ref inputs "qtbase")))
                (substitute* (find-files "." "Makefile")
                             (((string-append "INSTALL_ROOT)" qtbase))
-                             (string-append "INSTALL_ROOT)" out)))))))))))
+                             (string-append "INSTALL_ROOT)" out)))
+               #t)))
+            (add-before 'check 'set-display
+              (lambda _
+                (setenv "QT_QPA_PLATFORM" "offscreen")
+                #t)))))))
 
 (define-public qtimageformats
   (package (inherit qtsvg)
     (name "qtimageformats")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -477,10 +583,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "020v1148433zx4g87z2r8fgff32n0laajxqqsja1l3yzz7jbrwvl"))))
+               "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                 (delete-file-recursively "src/3rdparty")))))
     (native-inputs `())
     (inputs
-     `(("libmng" ,libmng)
+     `(("jasper" ,jasper)
+       ("libmng" ,libmng)
        ("libtiff" ,libtiff)
        ("libwebp" ,libwebp)
        ("mesa" ,mesa)
@@ -490,7 +601,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtx11extras
   (package (inherit qtsvg)
     (name "qtx11extras")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -499,7 +610,10 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0l736qiz8adrnh267xz63hv4sph6nhy90h836qfnnmv3p78ipsz8"))))
+               "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (native-inputs `(("perl" ,perl)))
     (inputs
      `(("mesa" ,mesa)
@@ -508,7 +622,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtxmlpatterns
   (package (inherit qtsvg)
     (name "qtxmlpatterns")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -517,14 +631,23 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0q412jv3xbg7v05b8pbahifwx17gzlp96s90akh6zwhpm8i6xx34"))))
+               "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'disable-network-tests
+             (lambda _ (substitute* "tests/auto/auto.pro"
+                         (("qxmlquery") "# qxmlquery")
+                         (("xmlpatterns") "# xmlpatterns"))
+               #t))))))
     (native-inputs `(("perl" ,perl)))
     (inputs `(("qtbase" ,qtbase)))))
 
 (define-public qtdeclarative
   (package (inherit qtsvg)
     (name "qtdeclarative")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -533,7 +656,10 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1d2217kxk85kpi7ls08b41hqzy26hvch8m4cgzq6km5sqi5zvz0j"))))
+               "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -547,7 +673,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtconnectivity
   (package (inherit qtsvg)
     (name "qtconnectivity")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -556,7 +682,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "06fr9321f52kf0nda9zjjfzp5694hbnx0y0v315iw28mnpvandas"))))
+               "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -568,7 +694,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtwebsockets
   (package (inherit qtsvg)
     (name "qtwebsockets")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -577,7 +703,10 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0fkj52i4yi6gmq4jfjgdij08cspxspac6mbpf0fknnllimmkl7jm"))))
+               "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
@@ -586,7 +715,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtsensors
   (package (inherit qtsvg)
     (name "qtsensors")
-    (version "5.6.1")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -595,40 +724,421 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0bll7ll6s5g8w89knyrc0famjwqyfzwpn512m1f96bf6xwacs967"))))
+               "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
     (inputs `(("qtbase" ,qtbase)))))
 
-(define-public qjson
-  (package
-    (name "qjson")
-    (version "0.8.1")
+(define-public qtmultimedia
+  (package (inherit qtsvg)
+    (name "qtmultimedia")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
-             (uri (string-append "https://github.com/flavio/qjson/archive/"
-                                 version ".tar.gz"))
-             (file-name (string-append name "-" version ".tar.gz"))
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
              (sha256
               (base32
-               "163fspi0xc705irv79qw861fmh68pjyla9vx3kqiq6xrdhb9834j"))))
-    (build-system cmake-build-system)
+               "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                 (delete-file-recursively
+                   "examples/multimedia/spectrum/3rdparty")
+                 ;; We also prevent the spectrum example from being built.
+                 (substitute* "examples/multimedia/multimedia.pro"
+                   (("spectrum") "#"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (native-inputs
+     `(("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-2)
+       ("qtdeclarative" ,qtdeclarative)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("mesa" ,mesa)
+       ("pulseaudio" ,pulseaudio)
+       ("qtbase" ,qtbase)))))
+
+(define-public qtwayland
+  (package (inherit qtsvg)
+    (name "qtwayland")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
+    (native-inputs
+     `(("glib" ,glib)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("qtdeclarative" ,qtdeclarative)))
+    (inputs
+     `(("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("libx11" ,libx11)
+       ("libxcomposite" ,libxcomposite)
+       ("libxext" ,libxext)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxrender" ,libxrender)
+       ("mesa" ,mesa)
+       ("mtdev" ,mtdev)
+       ("qtbase" ,qtbase)
+       ("wayland" ,wayland)))))
+
+(define-public qtserialport
+  (package (inherit qtsvg)
+    (name "qtserialport")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
+    (native-inputs `(("perl" ,perl)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("eudev" ,eudev)))))
+
+(define-public qtserialbus
+  (package (inherit qtsvg)
+    (name "qtserialbus")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj"))))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtserialport" ,qtserialport)))))
+
+(define-public qtwebchannel
+  (package (inherit qtsvg)
+    (name "qtwebchannel")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
+    (native-inputs
+     `(("perl" ,perl)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtwebsockets" ,qtwebsockets)))
+    (inputs `(("qtbase" ,qtbase)))))
+
+(define-public qtlocation
+  (package (inherit qtsvg)
+    (name "qtlocation")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (native-inputs
+     `(("perl" ,perl)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtquickcontrols" ,qtquickcontrols)
+       ("qtserialport" ,qtserialport)))
+    (inputs `(("qtbase" ,qtbase)))))
+
+(define-public qttools
+  (package (inherit qtsvg)
+    (name "qttools")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (native-inputs
+     `(("perl" ,perl)
+       ("qtdeclarative" ,qtdeclarative)))
+    (inputs
+     `(("mesa" ,mesa)
+       ("qtbase" ,qtbase)))))
+
+(define-public qtscript
+  (package (inherit qtsvg)
+    (name "qtscript")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
+    (native-inputs
+     `(("perl" ,perl)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("qtbase" ,qtbase)))))
+
+(define-public qtquickcontrols
+  (package (inherit qtsvg)
+    (name "qtquickcontrols")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtquickcontrols2
+  (package (inherit qtsvg)
+    (name "qtquickcontrols2")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
     (inputs
-     `(("qt" ,qt-4)))
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtgraphicaleffects
+  (package (inherit qtsvg)
+    (name "qtgraphicaleffects")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
     (arguments
-     `(#:tests? #f)) ; no test target
-    (home-page "http://qjson.sourceforge.net/")
-    (synopsis "Qt-based library for handling JSON")
-    (description "QJson is a Qt-based library that maps JSON data to QVariant
-objects and vice versa.  JSON arrays are mapped to QVariantList instances,
-while JSON objects are mapped to QVariantMap.")
-    (license lgpl2.1+)))
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtdeclarative-render2d
+  (package (inherit qtsvg)
+    (name "qtdeclarative-render2d")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
+             (modules '((guix build utils)))
+             (snippet
+              '(delete-file-recursively "tools/opengldummy/3rdparty"))))
+    (native-inputs `())
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtgamepad
+  (package (inherit qtsvg)
+    (name "qtgamepad")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv"))))
+    (native-inputs
+     `(("perl" ,perl)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("libxrender" ,libxrender)
+       ("sdl2" ,sdl2)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtscxml
+  (package (inherit qtsvg)
+    (name "qtscxml")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx"))
+             (modules '((guix build utils)))
+             (snippet
+              '(begin
+                 (delete-file-recursively "tests/3rdparty")
+                 ;; the scion test refers to the bundled 3rd party test code.
+                 (substitute* "tests/auto/auto.pro"
+                   (("scion") "#"))))))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtpurchasing
+  (package (inherit qtsvg)
+    (name "qtpurchasing")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n"))))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtcanvas3d
+  (package (inherit qtsvg)
+    (name "qtcanvas3d")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8"))
+             (modules '((guix build utils)))
+             (snippet
+              '(delete-file-recursively "examples/canvas3d/3rdparty"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+      ;; Building the tests depends on the bundled 3rd party javascript files,
+      ;; and the test phase fails to import QtCanvas3D, causing the phase to
+      ;; fail, so we skip building them for now.
+      ((#:phases phases)
+       `(modify-phases ,phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
+                               (string-append "PREFIX=" out))))))))
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (native-inputs `())
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtcharts
+  (package (inherit qtsvg)
+    (name "qtcharts")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
+
+(define-public qtdatavis3d
+  (package (inherit qtsvg)
+    (name "qtdatavis3d")
+    (version "5.7.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://download.qt.io/official_releases/qt/"
+                                 (version-major+minor version) "/" version
+                                 "/submodules/" name "-opensource-src-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1y00p0wyj5cw9c2925y537vpmmg9q3kpf7qr1s7sv67dvvf8bzqv"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments qtsvg)
+       ((#:tests? _ #f) #f))) ; TODO: Enable the tests
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))))
 
 (define-public python-sip
   (package
     (name "python-sip")
-    (version "4.18")
+    (version "4.18.1")
     (source
       (origin
         (method url-fetch)
@@ -637,7 +1147,7 @@ while JSON objects are mapped to QVariantMap.")
                          "sip-" version "/sip-" version ".tar.gz"))
         (sha256
          (base32
-          "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
+          "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-wrapper)))
@@ -680,7 +1190,7 @@ is then compiled to create the bindings extension module.  The SIP Python
 module provides support functions to the automatically generated code.")
     ;; There is a choice between a python like license, gpl2 and gpl3.
     ;; For compatibility with pyqt, we need gpl3.
-    (license gpl3)))
+    (license license:gpl3)))
 
 (define-public python2-sip
   (package (inherit python-sip)
@@ -691,7 +1201,7 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.6")
+    (version "5.7")
     (source
       (origin
         (method url-fetch)
@@ -701,14 +1211,29 @@ module provides support functions to the automatically generated code.")
                          version ".tar.gz"))
         (sha256
          (base32
-          "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
+          "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
        (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("python-sip" ,python-sip)
-       ("qtbase" ,qtbase))) ; for qmake
+     `(("qtbase" ,qtbase))) ; for qmake
+    (propagated-inputs
+     `(("python-sip" ,python-sip)))
     (inputs
-     `(("python" ,python-wrapper)))
+     `(("python" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtconnectivity" ,qtconnectivity)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtlocation" ,qtlocation)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsensors" ,qtsensors)
+       ("qtserialport" ,qtserialport)
+       ("qtsvg" ,qtsvg)
+       ("qttools" ,qttools)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)))
     (arguments
      `(#:modules ((srfi srfi-1)
                   ,@%gnu-build-system-modules)
@@ -731,13 +1256,19 @@ module provides support functions to the automatically generated code.")
                         "."))
                     (lib (string-append out "/lib/python"
                                         python-major+minor
-                                        "/site-packages")))
+                                        "/site-packages"))
+                    (stubs (string-append lib "/PyQt5")))
                (zero? (system* "python" "configure.py"
                                "--confirm-license"
                                "--bindir" bin
                                "--destdir" lib
                                "--designer-plugindir" designer
                                "--qml-plugindir" qml
+                               ; Where to install the PEP 484 Type Hints stub
+                               ; files. Without this the stubs are tried to be
+                               ; installed into the python package's
+                               ; site-package directory, which is read-only.
+                               "--stubsdir" stubs
                                "--sipdir" sip))))))))
     (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
     (synopsis "Python bindings for Qt")
@@ -745,7 +1276,7 @@ module provides support functions to the automatically generated code.")
      "PyQt is a set of Python v2 and v3 bindings for the Qt application
 framework.  The bindings are implemented as a set of Python modules and
 contain over 620 classes.")
-    (license gpl3)))
+    (license license:gpl3)))
 
 (define-public python2-pyqt
   (package (inherit python-pyqt)
@@ -754,7 +1285,8 @@ contain over 620 classes.")
      `(("python-sip" ,python2-sip)
        ("qtbase" ,qtbase)))
     (inputs
-     `(("python" ,python-2)))))
+     `(("python" ,python-2)
+       ,@(alist-delete "python" (package-inputs python-pyqt))))))
 
 (define-public python-pyqt-4
   (package (inherit python-pyqt)
@@ -773,34 +1305,43 @@ contain over 620 classes.")
     (native-inputs
      `(("python-sip" ,python-sip)
        ("qt" ,qt-4)))
+    (inputs `(("python" ,python-wrapper)))
     (arguments
      `(#:tests? #f ; no check target
        #:modules ((srfi srfi-1)
                   ,@%gnu-build-system-modules)
        #:phases
-         (alist-replace
-         'configure
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-           (let* ((out (assoc-ref outputs "out"))
-                  (bin (string-append out "/bin"))
-                  (sip (string-append out "/share/sip"))
-                  (python (assoc-ref inputs "python"))
-                  (python-version
-                    (last (string-split python #\-)))
-                  (python-major+minor
-                    (string-join
-                      (take (string-split python-version #\.) 2)
-                      "."))
-                  (lib (string-append out "/lib/python"
-                                      python-major+minor
-                                      "/site-packages")))
-             (zero? (system* "python" "configure.py"
-                             "--confirm-license"
-                             "--bindir" bin
-                             "--destdir" lib
-                             "--sipdir" sip))))
-         %standard-phases)))
-    (license (list gpl2 gpl3)))) ; choice of either license
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (sip (string-append out "/share/sip"))
+                    (python (assoc-ref inputs "python"))
+                    (python-version
+                      (last (string-split python #\-)))
+                    (python-major+minor
+                      (string-join
+                        (take (string-split python-version #\.) 2)
+                        "."))
+                    (lib (string-append out "/lib/python"
+                                        python-major+minor
+                                        "/site-packages")))
+               (zero? (system* "python" "configure.py"
+                               "--confirm-license"
+                               "--bindir" bin
+                               "--destdir" lib
+                               "--sipdir" sip))))))))
+    (license (list license:gpl2 license:gpl3)))) ; choice of either license
+
+(define-public python2-pyqt-4
+  (package (inherit python-pyqt-4)
+           (name "python2-pyqt")
+           (native-inputs
+            `(("python-sip" ,python2-sip)
+              ("qt" ,qt-4)))
+           (inputs
+            `(("python" ,python-2)))))
 
 (define-public qtkeychain
   (package
@@ -815,8 +1356,10 @@ contain over 620 classes.")
         (sha256
          (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
     (build-system cmake-build-system)
+    (native-inputs
+     `(("qttools" ,qttools)))
     (inputs
-     `(("qt" ,qt)))
+     `(("qtbase" ,qtbase)))
     (arguments
      `(#:tests? #f ; No tests included
        #:phases
@@ -832,4 +1375,201 @@ contain over 620 classes.")
     (description
       "QtKeychain is a Qt library to store passwords and other secret data
 securely.  It will not store any data unencrypted unless explicitly requested.")
-    (license bsd-3)))
+    (license license:bsd-3)))
+
+(define-public qwt
+  (package
+    (name "qwt")
+    (version "6.1.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri
+         (string-append "mirror://sourceforge/qwt/qwt/"
+                        version "/qwt-" version ".tar.bz2"))
+        (sha256
+         (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
+  (build-system gnu-build-system)
+  (inputs
+   `(("qtbase" ,qtbase)
+     ("qtsvg" ,qtsvg)
+     ("qttools" ,qttools)))
+  (arguments
+   `(#:phases
+     (modify-phases %standard-phases
+       (replace 'configure
+         (lambda* (#:key outputs #:allow-other-keys)
+           (let ((out (assoc-ref outputs "out")))
+             (substitute* '("qwtconfig.pri")
+               (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
+             (zero? (system* "qmake")))))
+       (add-after 'install 'install-documentation
+         (lambda* (#:key outputs #:allow-other-keys)
+           (let* ((out (assoc-ref outputs "out"))
+                  (man (string-append out "/share/man")))
+             ;; Remove some incomplete manual pages.
+             (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
+             (mkdir-p man)
+             (copy-recursively "doc/man" man)
+             #t))))))
+  (home-page "http://qwt.sourceforge.net")
+  (synopsis "Qt widgets for plots, scales, dials and other technical software
+GUI components")
+  (description
+   "The Qwt library contains widgets and components which are primarily useful
+for technical and scientific purposes.  It includes a 2-D plotting widget,
+different kinds of sliders, and much more.")
+  (license
+   (list
+    ;; The Qwt license is LGPL2.1 with some exceptions.
+    (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
+    ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
+    license:lgpl2.1 license:gpl3))))
+
+(define-public qtwebkit
+  (package
+    (name "qtwebkit")
+    (version "5.7.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "http://download.qt.io/community_releases/"
+                            (version-major+minor version)
+                            "/" version "/qtwebkit-opensource-src-" version
+                            ".tar.xz"))
+        ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
+        ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
+        (sha256
+         (base32
+          "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("perl" ,perl)
+       ("python" ,python-2.7)
+       ("ruby" ,ruby)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("gperf" ,gperf)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("icu" ,icu4c)
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("libwebp" ,libwebp)
+       ("sqlite" ,sqlite)
+       ("fontconfig" ,fontconfig)
+       ("libxrender", libxrender)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtmultimedia" ,qtmultimedia)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("libx11" ,libx11)
+       ("libxcomposite" ,libxcomposite)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (setenv "QMAKEPATH"
+                              (string-append (getcwd) "/Tools/qmake:"
+                                             (getenv "QMAKEPATH")))
+                      (system* "qmake"))))
+         ;; prevent webkit from trying to install into the qtbase store directory,
+         ;; and replace references to the build directory in linker options:
+         (add-before 'build 'patch-installpaths
+                     (lambda* (#:key outputs inputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (qtbase (assoc-ref inputs "qtbase"))
+                              (builddir (getcwd))
+                              (linkbuild (string-append "-L" builddir))
+                              (linkout (string-append "-L" out))
+                              (makefiles
+                               (map-in-order
+                                (lambda (i)
+                                  (let* ((in (car i))
+                                         (mf (string-append (dirname in) "/"
+                                                            (cdr i))))
+                                    ;; by default, these Makefiles are
+                                    ;; generated during install, but we need
+                                    ;; to generate them now
+                                    (system* "qmake" in "-o" mf)
+                                    mf))
+                                '(("Source/api.pri" . "Makefile.api")
+                                  ("Source/widgetsapi.pri"
+                                   . "Makefile.widgetsapi")
+                                  ("Source/WebKit2/WebProcess.pro"
+                                   . "Makefile.WebProcess")
+                                  ("Source/WebKit2/PluginProcess.pro"
+                                   . "Makefile.PluginProcess")
+                                  ("Source/WebKit/qt/declarative/public.pri"
+                                   . "Makefile.declarative.public")
+                                  ("Source/WebKit/qt/declarative/experimental/experimental.pri"
+                                   . "Makefile.declarative.experimental")
+                                  ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
+                                   . "Makefile")))))
+                         ;; Order of qmake calls and substitutions matters here.
+                         (system* "qmake" "-prl" "Source/widgetsapi.pri"
+                                  "-o" "Source/Makefile")
+                         (substitute* (find-files "lib" "libQt5.*\\.prl")
+                           ((linkbuild) linkout))
+                         (substitute* (find-files "lib"
+                                                  "libQt5WebKit.*\\.la")
+                           (("libdir='.*'")
+                            (string-append "libdir='" out "/lib'"))
+                           ((linkbuild) linkout))
+                         (substitute* (find-files "lib/pkgconfig"
+                                                  "Qt5WebKit.*\\.pc")
+                           (((string-append "prefix=" qtbase))
+                            (string-append "prefix=" out))
+                           ((linkbuild) linkout))
+                         ;; Makefiles must be modified after .prl/.la/.pc
+                         ;; files, lest they get rebuilt:
+                         (substitute* makefiles
+                           (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
+                            out )
+                           (((string-append "-Wl,-rpath," builddir))
+                            (string-append "-Wl,-rpath," out)))))))))
+    (home-page "https://www.webkit.org")
+    (synopsis "Web browser engine and classes to render and interact with web
+content")
+    (description "QtWebKit provides a Web browser engine that makes it easy to
+embed content from the World Wide Web into your Qt application.  At the same
+time Web content can be enhanced with native controls.")
+
+    (license license:lgpl2.1+)))
+
+(define-public dotherside
+  (package
+    (name "dotherside")
+    (version "0.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/filcuc/DOtherSide/"
+                           "archive/v" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))
+    (home-page "https://github.com/frankosterfeld/qtkeychain")
+    (synopsis "C language library for creating bindings for the Qt QML language")
+    (description
+     "DOtherSide is a C language library for creating bindings for the
+QT QML language.  The following features are implementable from
+a binding language:
+@itemize
+@item Creating custom QObject
+@item Creating custom QAbstractListModels
+@item Creating custom properties, signals and slots
+@item Creating from QML QObject defined in the binded language
+@item Creating from Singleton QML QObject defined in the binded language
+@end itemize\n")
+    (license license:lgpl3)))                    ;version 3 only (+ exception)