summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-10-05 19:15:39 +0200
commitcf6db76d2af2f287f12928df160447ab4165b3e5 (patch)
tree49a1309c0e04c00090ab106f7ae3495a6da328c1
parente65b2181e8b436278e3dd0b405602a400fbd0a75 (diff)
parenta6798218bea0d6b2df598042d1ced29f74bb4250 (diff)
downloadguix-cf6db76d2af2f287f12928df160447ab4165b3e5.tar.gz
Merge branch 'master' into core-updates
-rw-r--r--.dir-locals.el1
-rw-r--r--Makefile.am2
-rw-r--r--doc/guix.texi110
-rw-r--r--gnu/local.mk7
-rw-r--r--gnu/packages/admin.scm11
-rw-r--r--gnu/packages/agda.scm51
-rw-r--r--gnu/packages/audio.scm27
-rw-r--r--gnu/packages/aux-files/linux-libre/4.18-i686.conf6
-rw-r--r--gnu/packages/aux-files/linux-libre/4.18-x86_64.conf6
-rw-r--r--gnu/packages/bioinformatics.scm219
-rw-r--r--gnu/packages/ci.scm6
-rw-r--r--gnu/packages/code.scm13
-rw-r--r--gnu/packages/cran.scm361
-rw-r--r--gnu/packages/cups.scm10
-rw-r--r--gnu/packages/databases.scm14
-rw-r--r--gnu/packages/dico.scm11
-rw-r--r--gnu/packages/dictionaries.scm3
-rw-r--r--gnu/packages/disk.scm5
-rw-r--r--gnu/packages/dns.scm75
-rw-r--r--gnu/packages/emacs.scm124
-rw-r--r--gnu/packages/embedded.scm39
-rw-r--r--gnu/packages/emulators.scm17
-rw-r--r--gnu/packages/enlightenment.scm29
-rw-r--r--gnu/packages/file-systems.scm4
-rw-r--r--gnu/packages/fonts.scm4
-rw-r--r--gnu/packages/freedesktop.scm4
-rw-r--r--gnu/packages/game-development.scm17
-rw-r--r--gnu/packages/games.scm81
-rw-r--r--gnu/packages/geo.scm230
-rw-r--r--gnu/packages/gnome.scm6
-rw-r--r--gnu/packages/gnuzilla.scm98
-rw-r--r--gnu/packages/golang.scm4
-rw-r--r--gnu/packages/graph.scm1
-rw-r--r--gnu/packages/gtk.scm58
-rw-r--r--gnu/packages/guile.scm16
-rw-r--r--gnu/packages/hardware.scm114
-rw-r--r--gnu/packages/haskell-check.scm107
-rw-r--r--gnu/packages/haskell-crypto.scm127
-rw-r--r--gnu/packages/haskell-web.scm169
-rw-r--r--gnu/packages/haskell.scm2159
-rw-r--r--gnu/packages/hexedit.scm23
-rw-r--r--gnu/packages/idris.scm62
-rw-r--r--gnu/packages/image-processing.scm8
-rw-r--r--gnu/packages/java.scm128
-rw-r--r--gnu/packages/kde.scm4
-rw-r--r--gnu/packages/libreoffice.scm10
-rw-r--r--gnu/packages/license.scm4
-rw-r--r--gnu/packages/linux.scm47
-rw-r--r--gnu/packages/mail.scm15
-rw-r--r--gnu/packages/maths.scm17
-rw-r--r--gnu/packages/messaging.scm4
-rw-r--r--gnu/packages/mpi.scm5
-rw-r--r--gnu/packages/mtools.scm5
-rw-r--r--gnu/packages/music.scm4
-rw-r--r--gnu/packages/networking.scm8
-rw-r--r--gnu/packages/nickle.scm4
-rw-r--r--gnu/packages/opencl.scm8
-rw-r--r--gnu/packages/package-management.scm38
-rw-r--r--gnu/packages/patches/ghc-haddock-library-unbundle.patch86
-rw-r--r--gnu/packages/patches/icecat-avoid-bundled-libraries.patch14
-rw-r--r--gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch226
-rw-r--r--gnu/packages/patches/icecat-use-system-graphite2.patch248
-rw-r--r--gnu/packages/patches/icecat-use-system-harfbuzz.patch279
-rw-r--r--gnu/packages/patches/icecat-use-system-media-libs.patch381
-rw-r--r--gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch45
-rw-r--r--gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch58
-rw-r--r--gnu/packages/patches/quilt-test-fix-regex.patch41
-rw-r--r--gnu/packages/patchutils.scm22
-rw-r--r--gnu/packages/python.scm2
-rw-r--r--gnu/packages/re2c.scm5
-rw-r--r--gnu/packages/sdl.scm92
-rw-r--r--gnu/packages/syncthing.scm62
-rw-r--r--gnu/packages/syndication.scm4
-rw-r--r--gnu/packages/textutils.scm4
-rw-r--r--gnu/packages/tls.scm36
-rw-r--r--gnu/packages/version-control.scm61
-rw-r--r--gnu/packages/video.scm8
-rw-r--r--gnu/packages/vpn.scm10
-rw-r--r--gnu/packages/web.scm51
-rw-r--r--gnu/packages/wine.scm6
-rw-r--r--gnu/packages/wm.scm13
-rw-r--r--gnu/packages/xml.scm11
-rw-r--r--gnu/services/admin.scm6
-rw-r--r--gnu/services/base.scm32
-rw-r--r--gnu/services/herd.scm20
-rw-r--r--gnu/services/networking.scm16
-rw-r--r--gnu/services/shepherd.scm39
-rw-r--r--gnu/services/version-control.scm180
-rw-r--r--gnu/system.scm2
-rw-r--r--gnu/tests/version-control.scm114
-rw-r--r--gnu/tests/web.scm1
-rw-r--r--guix/build-system/haskell.scm32
-rw-r--r--guix/build/download.scm33
-rw-r--r--guix/build/haskell-build-system.scm12
-rw-r--r--guix/build/lisp-utils.scm7
-rw-r--r--guix/import/stackage.scm11
-rw-r--r--guix/progress.scm110
-rw-r--r--guix/scripts/build.scm13
-rw-r--r--guix/scripts/environment.scm116
-rw-r--r--guix/scripts/pack.scm142
-rw-r--r--guix/scripts/package.scm25
-rw-r--r--guix/scripts/perform-download.scm17
-rw-r--r--guix/scripts/pull.scm66
-rwxr-xr-xguix/scripts/substitute.scm42
-rw-r--r--guix/scripts/system.scm36
-rw-r--r--guix/status.scm501
-rw-r--r--guix/store.scm81
-rw-r--r--guix/ui.scm122
-rw-r--r--nix/libstore/build.cc27
-rw-r--r--nix/libstore/builtins.cc5
-rw-r--r--nix/libstore/globals.cc9
-rw-r--r--nix/libstore/globals.hh12
-rw-r--r--nix/libstore/worker-protocol.hh2
-rw-r--r--nix/libutil/archive.cc31
-rw-r--r--nix/libutil/archive.hh5
-rw-r--r--po/guix/POTFILES.in1
-rw-r--r--tests/gexp.scm4
-rw-r--r--tests/services.scm30
-rw-r--r--tests/status.scm115
119 files changed, 5964 insertions, 2558 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index eb99a5bcc1..793117c0ae 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -59,6 +59,7 @@
    (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1))
    (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1))
    (eval . (put 'with-derivation-substitute 'scheme-indent-function 2))
+   (eval . (put 'with-status-report 'scheme-indent-function 1))
 
    (eval . (put 'mlambda 'scheme-indent-function 1))
    (eval . (put 'mlambdaq 'scheme-indent-function 1))
diff --git a/Makefile.am b/Makefile.am
index 5c8639d665..7fd29b90a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -131,6 +131,7 @@ MODULES =					\
   guix/svn-download.scm				\
   guix/i18n.scm					\
   guix/ui.scm					\
+  guix/status.scm				\
   guix/build/android-ndk-build-system.scm	\
   guix/build/ant-build-system.scm		\
   guix/build/download.scm			\
@@ -340,6 +341,7 @@ SCM_TESTS =					\
   tests/glob.scm				\
   tests/grafts.scm				\
   tests/ui.scm					\
+  tests/status.scm				\
   tests/records.scm				\
   tests/upstream.scm				\
   tests/combinators.scm				\
diff --git a/doc/guix.texi b/doc/guix.texi
index 6b4b06f46d..3c116fc0be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33,7 +33,7 @@ Copyright @copyright{} 2016 Alex ter Weele@*
 Copyright @copyright{} 2017, 2018 Clément Lassieur@*
 Copyright @copyright{} 2017 Mathieu Othacehe@*
 Copyright @copyright{} 2017 Federico Beffa@*
-Copyright @copyright{} 2017 Carlo Zancanaro@*
+Copyright @copyright{} 2017, 2018 Carlo Zancanaro@*
 Copyright @copyright{} 2017 Thomas Danckaert@*
 Copyright @copyright{} 2017 humanitiesNerd@*
 Copyright @copyright{} 2017 Christopher Allan Webber@*
@@ -11614,6 +11614,14 @@ This procedure can be called several times, one for each network
 interface of interest.  Behind the scenes what it does is extend
 @code{static-networking-service-type} with additional network interfaces
 to handle.
+
+For example:
+
+@example
+(static-networking-service "eno1" "192.168.1.82"
+                           #:gateway "192.168.1.2"
+                           #:name-servers '("192.168.1.2"))
+@end example
 @end deffn
 
 @cindex wicd
@@ -21028,6 +21036,100 @@ could instantiate a cgit service like this:
           (cgitrc "")))
 @end example
 
+@subsubheading Gitolite Service
+
+@cindex Gitolite service
+@cindex Git, hosting
+@uref{http://gitolite.com/gitolite/, Gitolite} is a tool for hosting Git
+repositories on a central server.
+
+Gitolite can handle multiple repositories and users, and supports flexible
+configuration of the permissions for the users on the repositories.
+
+The following example will configure Gitolite using the default @code{git}
+user, and the provided SSH public key.
+
+@example
+(service gitolite-service-type
+         (gitolite-configuration
+           (admin-pubkey (plain-file
+                           "yourname.pub"
+                           "ssh-rsa AAAA... guix@@example.com"))))
+@end example
+
+Gitolite is configured through a special admin repository which you can clone,
+for example, if you setup Gitolite on @code{example.com}, you would run the
+following command to clone the admin repository.
+
+@example
+git clone git@@example.com:gitolite-admin
+@end example
+
+When the Gitolite service is activated, the provided @code{admin-pubkey} will
+be inserted in to the @file{keydir} directory in the gitolite-admin
+repository.  If this results in a change in the repository, it will be
+committed using the message ``gitolite setup by GNU Guix''.
+
+@deftp {Data Type} gitolite-configuration
+Data type representing the configuration for @code{gitolite-service-type}.
+
+@table @asis
+@item @code{package} (default: @var{gitolite})
+Gitolite package to use.
+
+@item @code{user} (default: @var{git})
+User to use for Gitolite.  This will be user that you use when accessing
+Gitolite over SSH.
+
+@item @code{group} (default: @var{git})
+Group to use for Gitolite.
+
+@item @code{home-directory} (default: @var{"/var/lib/gitolite"})
+Directory in which to store the Gitolite configuration and repositories.
+
+@item @code{rc-file} (default: @var{(gitolite-rc-file)})
+A ``file-like'' object (@pxref{G-Expressions, file-like objects}),
+representing the configuration for Gitolite.
+
+@item @code{admin-pubkey} (default: @var{#f})
+A ``file-like'' object (@pxref{G-Expressions, file-like objects}) used to
+setup Gitolite.  This will be inserted in to the @file{keydir} directory
+within the gitolite-admin repository.
+
+To specify the SSH key as a string, use the @code{plain-file} function.
+
+@example
+(plain-file "yourname.pub" "ssh-rsa AAAA... guix@@example.com")
+@end example
+
+@end table
+@end deftp
+
+@deftp {Data Type} gitolite-rc-file
+Data type representing the Gitolite RC file.
+
+@table @asis
+@item @code{umask} (default: @code{#o0077})
+This controls the permissions Gitolite sets on the repositories and their
+contents.
+
+A value like @code{#o0027} will give read access to the group used by Gitolite
+(by default: @code{git}). This is necessary when using Gitolite with software
+like cgit or gitweb.
+
+@item @code{git-config-keys} (default: @code{""})
+Gitolite allows you to set git config values using the "config" keyword. This
+setting allows control over the config keys to accept.
+
+@item @code{roles} (default: @code{'(("READERS" . 1) ("WRITERS" . ))})
+Set the role names allowed to be used by users running the perms command.
+
+@item @code{enable} (default: @code{'("help" "desc" "info" "perms" "writable" "ssh-authkeys" "git-config" "daemon" "gitweb")})
+This setting controls the commands and features to enable within Gitolite.
+
+@end table
+@end deftp
+
 
 @node Game Services
 @subsubsection Game Services
@@ -21920,9 +22022,9 @@ systems already running GuixSD.}.
 This effects all the configuration specified in @var{file}: user
 accounts, system services, global package list, setuid programs, etc.
 The command starts system services specified in @var{file} that are not
-currently running; if a service is currently running, it does not
-attempt to upgrade it since this would not be possible without stopping it
-first.
+currently running; if a service is currently running this command will
+arrange for it to be upgraded the next time it is stopped (eg. by
+@code{herd stop X} or @code{herd restart X}).
 
 This command creates a new generation whose number is one greater than
 the current generation (as reported by @command{guix system
diff --git a/gnu/local.mk b/gnu/local.mk
index 9dbb259721..d4e986ce3e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -814,8 +814,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/hydra-disable-darcs-test.patch		\
   %D%/packages/patches/icecat-avoid-bundled-libraries.patch	\
   %D%/packages/patches/icecat-CVE-2018-12383.patch		\
-  %D%/packages/patches/icecat-use-system-graphite2.patch	\
-  %D%/packages/patches/icecat-use-system-harfbuzz.patch		\
+  %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch	\
+  %D%/packages/patches/icecat-use-system-media-libs.patch	\
   %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
@@ -1100,6 +1100,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/qtscript-disable-tests.patch		\
   %D%/packages/patches/quagga-reproducible-build.patch          \
   %D%/packages/patches/quickswitch-fix-dmenu-check.patch	\
+  %D%/packages/patches/quilt-test-fix-regex.patch		\
+  %D%/packages/patches/quilt-compat-getopt-fix-second-separator.patch	\
+  %D%/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch	\
   %D%/packages/patches/qtwebkit-pbutils-include.patch		\
   %D%/packages/patches/rapicorn-isnan.patch			\
   %D%/packages/patches/raptor2-heap-overflow.patch		\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8f504cafef..fa60cadd01 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -173,14 +173,14 @@ and provides a \"top-like\" mode (monitoring).")
 (define-public shepherd
   (package
     (name "shepherd")
-    (version "0.4.0")
+    (version "0.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://alpha.gnu.org/gnu/shepherd/shepherd-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1lgmsbxn8i8xdasxzkdp2cml75n128pplw6icvmspl6s0n9xmw8n"))))
+                "1wmciqml9yplnx1s4ynn00giqyk06rbrcsgvpjj2df47sawk2jp8"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--localstatedir=/var")))
@@ -613,7 +613,7 @@ connection alive.")
          (bind-minor-version "11")
          (bind-patch-version "4")
          (bind-release-type "-P")         ; for patch release, use "-P"
-         (bind-release-version "1")      ; for patch release, e.g. "6"
+         (bind-release-version "2")      ; for patch release, e.g. "6"
          (bind-version (string-append bind-major-version
                                       "."
                                       bind-minor-version
@@ -730,7 +730,7 @@ connection alive.")
                                         "/bind-" bind-version ".tar.gz"))
                     (sha256
                      (base32
-                      "08zyy13b8ydfbg26b3y6mw299qs89ba90gymraqqjsgjicydrq5h"))))
+                      "04fq17zksd2b3w6w6padps5n7b6s2lasxpksbhl4378h56vgfnm8"))))
 
                 ;; When cross-compiling, we need the cross Coreutils and sed.
                 ;; Otherwise just use those from %FINAL-INPUTS.
@@ -1194,9 +1194,6 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out"))
                             (qt '("qtbase" "qtsvg")))
-                        (substitute* "wpa_gui.desktop"
-                          (("Exec=wpa_gui")
-                           (string-append "Exec=" out "/bin/wpa_gui")))
                         (install-file "wpa_gui" (string-append out "/bin"))
                         (install-file "wpa_gui.desktop"
                                       (string-append out "/share/applications"))
diff --git a/gnu/packages/agda.scm b/gnu/packages/agda.scm
index df4968c445..6bb38aac4d 100644
--- a/gnu/packages/agda.scm
+++ b/gnu/packages/agda.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,7 +31,7 @@
 (define-public agda
   (package
     (name "agda")
-    (version "2.5.3")
+    (version "2.5.4.1")
     (source
      (origin
        (method url-fetch)
@@ -39,7 +40,7 @@
              version ".tar.gz"))
        (sha256
         (base32
-         "0r80vw7vnvbgq47y50v050malv7zvv2p2kg6f47i04r0b2ix855a"))))
+         "0bxpibsk98n9xp42d92ma5vj2fam8rsnl61fbhr3askfjdvalnbp"))))
     (build-system haskell-build-system)
     (inputs
      `(("cpphs" ,cpphs)
@@ -51,14 +52,13 @@
        ("ghc-edisoncore" ,ghc-edisoncore)
        ("ghc-edit-distance" ,ghc-edit-distance)
        ("ghc-equivalence" ,ghc-equivalence)
+       ("ghc-filemanip" ,ghc-filemanip)
        ("ghc-geniplate-mirror" ,ghc-geniplate-mirror)
        ("ghc-gitrev" ,ghc-gitrev)
        ("ghc-happy" ,ghc-happy)
        ("ghc-hashable" ,ghc-hashable)
        ("ghc-hashtables" ,ghc-hashtables)
        ("ghc-ieee754" ,ghc-ieee754)
-       ("ghc-monadplus" ,ghc-monadplus)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-murmur-hash" ,ghc-murmur-hash)
        ("ghc-uri-encode" ,ghc-uri-encode)
        ("ghc-parallel" ,ghc-parallel)
@@ -71,9 +71,50 @@
     (arguments
      `(#:modules ((guix build haskell-build-system)
                   (guix build utils)
-                  (srfi srfi-26))
+                  (srfi srfi-26)
+                  (ice-9 match))
        #:phases
        (modify-phases %standard-phases
+         ;; FIXME: This is a copy of the standard configure phase with a tiny
+         ;; difference: this package needs the -package-db flag to be passed
+         ;; to "runhaskell" in addition to the "configure" action, because
+         ;; Setup.hs depends on filemanip.  Without this option the Setup.hs
+         ;; file cannot be evaluated.  The haskell-build-system should be
+         ;; changed to pass "-package-db" to "runhaskell" in any case.
+         (replace 'configure
+           (lambda* (#:key outputs inputs tests? (configure-flags '())
+                     #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (input-dirs (match inputs
+                                  (((_ . dir) ...)
+                                   dir)
+                                  (_ '())))
+                    (ghc-path (getenv "GHC_PACKAGE_PATH"))
+                    (params (append `(,(string-append "--prefix=" out))
+                                    `(,(string-append "--libdir=" out "/lib"))
+                                    `(,(string-append "--bindir=" out "/bin"))
+                                    `(,(string-append
+                                        "--docdir=" out
+                                        "/share/doc/" ((@@ (guix build haskell-build-system)
+                                                           package-name-version) out)))
+                                    '("--libsubdir=$compiler/$pkg-$version")
+                                    '("--package-db=../package.conf.d")
+                                    '("--global")
+                                    `(,@(map
+                                         (cut string-append "--extra-include-dirs=" <>)
+                                         (search-path-as-list '("include") input-dirs)))
+                                    `(,@(map
+                                         (cut string-append "--extra-lib-dirs=" <>)
+                                         (search-path-as-list '("lib") input-dirs)))
+                                    (if tests?
+                                        '("--enable-tests")
+                                        '())
+                                    configure-flags)))
+               (unsetenv "GHC_PACKAGE_PATH")
+               (apply invoke "runhaskell" "-package-db=../package.conf.d"
+                      "Setup.hs" "configure" params)
+               (setenv "GHC_PACKAGE_PATH" ghc-path)
+               #t)))
          (add-after 'compile 'agda-compile
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index bcb4c1dfc8..72f46f903a 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -321,7 +321,7 @@ engineers, musicians, soundtrack editors and composers.")
               ;; "sbsms"
               ))
            #t))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (inputs
      `(("wxwidgets" ,wxwidgets)
        ("gtk+" ,gtk+)
@@ -410,16 +410,12 @@ engineers, musicians, soundtrack editors and composers.")
                (("../lib-src/portmidi/porttime/porttime.h") "porttime.h"))
              (substitute* "src/prefs/MidiIOPrefs.cpp"
                (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))
-             #t))
-         (add-after 'install 'wrap-program
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/audacity")
-               ;; For GtkFileChooserDialog.
-               `("GSETTINGS_SCHEMA_DIR" =
-                 (,(string-append (assoc-ref inputs "gtk+")
-                                  "/share/glib-2.0/schemas"))))
              #t)))
+       ;; The translation Makefile generation is performed improperly for
+       ;; out-of-tree builds.
+       ;; XXX This can be removed if the glib-or-gkt-build-system
+       ;; switches to #:out-of-source? #t. See <https://bugs.gnu.org/32887>.
+       #:out-of-source? #f
        ;; The test suite is not "well exercised" according to the developers,
        ;; and fails with various errors.  See
        ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
@@ -453,7 +449,14 @@ tools.")
              "CXXFLAGS=-std=gnu++11"
              "CFLAGS=-std=gnu++11"
              (string-append "prefix=" %output)
-             (string-append "pkgdatadir=" %output "/share/azr3-jack"))))
+             (string-append "pkgdatadir=" %output "/share/azr3-jack"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'fix-timestamp
+           (lambda _
+             (let ((early-1980 315619200)) ; 1980-01-02 UTC
+               (utime "azr3.1" early-1980 early-1980))
+             #t)))))
     (inputs
      `(("gtkmm" ,gtkmm-2)
        ("lvtk" ,lvtk)
@@ -2244,7 +2247,7 @@ aimed at audio/musical applications.")
        ("vamp" ,vamp)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
-    (home-page "http://breakfastquay.com/rubberband/")
+    (home-page "https://breakfastquay.com/rubberband/")
     (synopsis "Audio time-stretching and pitch-shifting library")
     (description
      "Rubber Band is a library and utility program that permits changing the
diff --git a/gnu/packages/aux-files/linux-libre/4.18-i686.conf b/gnu/packages/aux-files/linux-libre/4.18-i686.conf
index 606616b9fa..859b8b10b6 100644
--- a/gnu/packages/aux-files/linux-libre/4.18-i686.conf
+++ b/gnu/packages/aux-files/linux-libre/4.18-i686.conf
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/x86 4.18.0-gnu Kernel Configuration
+# Linux/x86 4.18.9-gnu Kernel Configuration
 #
 
 #
@@ -255,6 +255,7 @@ CONFIG_PROFILING=y
 CONFIG_TRACEPOINTS=y
 CONFIG_CRASH_CORE=y
 CONFIG_KEXEC_CORE=y
+CONFIG_HOTPLUG_SMT=y
 CONFIG_OPROFILE=m
 # CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
 CONFIG_HAVE_OPROFILE=y
@@ -294,6 +295,7 @@ CONFIG_HAVE_PERF_REGS=y
 CONFIG_HAVE_PERF_USER_STACK_DUMP=y
 CONFIG_HAVE_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_RCU_TABLE_FREE=y
+CONFIG_HAVE_RCU_TABLE_INVALIDATE=y
 CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_CMPXCHG_LOCAL=y
@@ -853,7 +855,7 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m
 CONFIG_HOTPLUG_PCI_CPCI=y
 CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
 CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HOTPLUG_PCI_SHPC=y
 
 #
 # PCI controller drivers
diff --git a/gnu/packages/aux-files/linux-libre/4.18-x86_64.conf b/gnu/packages/aux-files/linux-libre/4.18-x86_64.conf
index 81fd822756..2a66c483d6 100644
--- a/gnu/packages/aux-files/linux-libre/4.18-x86_64.conf
+++ b/gnu/packages/aux-files/linux-libre/4.18-x86_64.conf
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/x86 4.18.0-gnu Kernel Configuration
+# Linux/x86 4.18.9-gnu Kernel Configuration
 #
 
 #
@@ -265,6 +265,7 @@ CONFIG_PROFILING=y
 CONFIG_TRACEPOINTS=y
 CONFIG_CRASH_CORE=y
 CONFIG_KEXEC_CORE=y
+CONFIG_HOTPLUG_SMT=y
 CONFIG_OPROFILE=m
 # CONFIG_OPROFILE_EVENT_MULTIPLEX is not set
 CONFIG_HAVE_OPROFILE=y
@@ -304,6 +305,7 @@ CONFIG_HAVE_PERF_REGS=y
 CONFIG_HAVE_PERF_USER_STACK_DUMP=y
 CONFIG_HAVE_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_RCU_TABLE_FREE=y
+CONFIG_HAVE_RCU_TABLE_INVALIDATE=y
 CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_CMPXCHG_LOCAL=y
@@ -869,7 +871,7 @@ CONFIG_HOTPLUG_PCI_ACPI_IBM=m
 CONFIG_HOTPLUG_PCI_CPCI=y
 CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
 CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HOTPLUG_PCI_SHPC=y
 
 #
 # PCI controller drivers
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e74abf005f..d48f484e03 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -288,34 +288,25 @@ BAM files.")
 (define-public bcftools
   (package
     (name "bcftools")
-    (version "1.8")
+    (version "1.9")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/samtools/bcftools/releases/download/"
-                    version "/bcftools-" version ".tar.bz2"))
+              (uri (string-append "https://github.com/samtools/bcftools/"
+                                  "releases/download/"
+                                  version "/bcftools-" version ".tar.bz2"))
               (sha256
                (base32
-                "1vgw2mwngq20c530zim52zvgmw1lci8rzl33pvh44xqk3xlzvjsa"))
+                "1j3h638i8kgihzyrlnpj82xg1b23sijibys9hvwari3fy7kd0dkg"))
               (modules '((guix build utils)))
               (snippet '(begin
                           ;; Delete bundled htslib.
-                          (delete-file-recursively "htslib-1.8")
+                          (delete-file-recursively "htslib-1.9")
                           #t))))
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "test"
-       #:configure-flags (list "--with-htslib=system")
-       #:make-flags
-       (list
-        "USE_GPL=1"
-        "LIBS=-lgsl -lgslcblas"
-        (string-append "prefix=" (assoc-ref %outputs "out"))
-        (string-append "HTSDIR=" (assoc-ref %build-inputs "htslib") "/include")
-        (string-append "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.so")
-        (string-append "BGZIP=" (assoc-ref %build-inputs "htslib") "/bin/bgzip")
-        (string-append "TABIX=" (assoc-ref %build-inputs "htslib") "/bin/tabix")
-        (string-append "PACKAGE_VERSION=" ,version))
+     `(#:configure-flags
+       (list "--enable-libgsl")
+       #:test-target "test"
        #:phases
        (modify-phases %standard-phases
          (add-before 'check 'patch-tests
@@ -1445,17 +1436,17 @@ multiple sequence alignments.")
 (define-public python-pysam
   (package
     (name "python-pysam")
-    (version "0.13.0")
+    (version "0.15.1")
     (source (origin
-              (method url-fetch)
+              (method git-fetch)
               ;; Test data is missing on PyPi.
-              (uri (string-append
-                    "https://github.com/pysam-developers/pysam/archive/v"
-                    version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (uri (git-reference
+                    (url "https://github.com/pysam-developers/pysam.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0dzap2axin9cbbl0d825w294bpn00zagfm1sigamm4v2pm5bj9lp"))
+                "1vj367w6xbn9bpmksm162l1aipf7cj97h1q83y7jcpm33ihwpf7x"))
               (modules '((guix build utils)))
               (snippet '(begin
                           ;; Drop bundled htslib. TODO: Also remove samtools
@@ -1482,6 +1473,11 @@ multiple sequence alignments.")
              #t))
          (replace 'check
            (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; This file contains tests that require a connection to the
+             ;; internet.
+             (delete-file "tests/tabix_test.py")
+             ;; FIXME: This test fails
+             (delete-file "tests/AlignmentFile_test.py")
              ;; Add first subdirectory of "build" directory to PYTHONPATH.
              (setenv "PYTHONPATH"
                      (string-append
@@ -1492,28 +1488,26 @@ multiple sequence alignments.")
              ;; Step out of source dir so python does not import from CWD.
              (with-directory-excursion "tests"
                (setenv "HOME" "/tmp")
-               (and (zero? (system* "make" "-C" "pysam_data"))
-                    (zero? (system* "make" "-C" "cbcf_data"))
-                    ;; Running nosetests without explicitly asking for a
-                    ;; single process leads to a crash.  Running with multiple
-                    ;; processes fails because the tests are not designed to
-                    ;; run in parallel.
-
-                    ;; FIXME: tests keep timing out on some systems.
-                    ;; (zero? (system* "nosetests" "-v"
-                    ;;                 "--processes" "1"))
-                    )))))))
-    (propagated-inputs
-     `(("htslib"            ,htslib))) ; Included from installed header files.
+               (invoke "make" "-C" "pysam_data")
+               (invoke "make" "-C" "cbcf_data")
+               ;; Running nosetests without explicitly asking for a single
+               ;; process leads to a crash.  Running with multiple processes
+               ;; fails because the tests are not designed to run in parallel.
+
+               ;; FIXME: tests keep timing out on some systems.
+               (invoke "nosetests" "-v" "--processes" "1")))))))
+    (propagated-inputs
+     `(("htslib" ,htslib))) ; Included from installed header files.
     (inputs
-     `(("ncurses"           ,ncurses)
-       ("zlib"              ,zlib)))
+     `(("ncurses" ,ncurses)
+       ("curl" ,curl)
+       ("zlib" ,zlib)))
     (native-inputs
-     `(("python-cython"     ,python-cython)
+     `(("python-cython" ,python-cython)
        ;; Dependencies below are are for tests only.
-       ("samtools"          ,samtools)
-       ("bcftools"          ,bcftools)
-       ("python-nose"       ,python-nose)))
+       ("samtools" ,samtools)
+       ("bcftools" ,bcftools)
+       ("python-nose" ,python-nose)))
     (home-page "https://github.com/pysam-developers/pysam")
     (synopsis "Python bindings to the SAMtools C API")
     (description
@@ -2012,18 +2006,25 @@ with Python.")
 (define-public deeptools
   (package
     (name "deeptools")
-    (version "2.5.1")
+    (version "3.1.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/deeptools/deepTools/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/deeptools/deepTools.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1q8i12l2gvk4n2s8lhyzwhh9g4qbc8lrk5l7maz00yvd5g6z5540"))))
+                "06fdpp6cg3xiwryxjhixvfysl4z0ps1crjgia587qa9ikqpsa7fd"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; This phase fails, but it's not needed.
+         (delete 'reset-gzip-timestamps))))
     (inputs
-     `(("python-scipy" ,python-scipy)
+     `(("python-plotly" ,python-plotly)
+       ("python-scipy" ,python-scipy)
        ("python-numpy" ,python-numpy)
        ("python-numpydoc" ,python-numpydoc)
        ("python-matplotlib" ,python-matplotlib)
@@ -3512,7 +3513,7 @@ performance.")
 (define-public htslib
   (package
     (name "htslib")
-    (version "1.8")
+    (version "1.9")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3520,7 +3521,7 @@ performance.")
                     version "/htslib-" version ".tar.bz2"))
               (sha256
                (base32
-                "18bw0mn9pj5wgarnlaxmf1bb8pdqgl1zd6czirqcr62ajpn1xvy0"))))
+                "16ljv43sc3fxmv63w7b2ff8m1s7h89xhazwmbm1bicz8axq8fjz0"))))
     (build-system gnu-build-system)
     (inputs
      `(("openssl" ,openssl)
@@ -4997,7 +4998,7 @@ to the user's query of interest.")
 (define-public samtools
   (package
     (name "samtools")
-    (version "1.8")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
@@ -5006,15 +5007,19 @@ to the user's query of interest.")
                        version "/samtools-" version ".tar.bz2"))
        (sha256
         (base32
-         "05myg7bs90i68qbqab9cdg9rqj2xh39azibrx82ipzc5kcfvqhn9"))))
+         "10ilqbmm7ri8z431sn90lvbjwizd0hhkf9rcqw8j823hf26nhgq8"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Delete bundled htslib.
+                   (delete-file-recursively "htslib-1.9")
+                   #t))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules ((ice-9 ftw)
                   (ice-9 regex)
                   (guix build gnu-build-system)
                   (guix build utils))
-       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
-       #:configure-flags (list "--with-ncurses" "--with-htslib=system")
+       #:configure-flags (list "--with-ncurses")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-tests
@@ -5068,9 +5073,9 @@ viewer.")
         (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h"))))
     (arguments
      `(#:tests? #f ;no "check" target
+       #:make-flags
+       (list "LIBCURSES=-lncurses")
        ,@(substitute-keyword-arguments (package-arguments samtools)
-           ((#:make-flags flags)
-            `(cons "LIBCURSES=-lncurses" ,flags))
            ((#:phases phases)
             `(modify-phases ,phases
                (replace 'install
@@ -13869,3 +13874,99 @@ single-cell transcriptomic map of the human and mouse pancreas reveals inter-
 and intra-cell population structure.\" Baron et al. Cell Systems (2016)
 @url{https://www.ncbi.nlm.nih.gov/pubmed/27667365}.")
       (license license:gpl2+))))
+
+(define-public porechop
+  ;; The recommended way to install is to clone the git repository
+  ;; https://github.com/rrwick/Porechop#installation
+  (let ((commit "289d5dca4a5fc327f97b3f8cecb68ecaf1014861")
+        (revision "1"))
+    (package
+      (name "porechop")
+      (version (git-version "0.2.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/rrwick/Porechop.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "05ps43gig0d3ia9x5lj84lb00hbsl6ba9n7y7jz927npxbr2ym23"))))
+      (build-system python-build-system)
+      (home-page "https://github.com/rrwick/porechop")
+      (synopsis "Finding, trimming or splitting adapters, in Oxford Nanopore reads")
+      (description
+       "The porechop package is a tool for finding and removing adapters from Oxford
+Nanopore reads.  Adapters on the ends of reads are trimmed off, and when a read
+has an adapter in its middle, it is treated as chimeric and chopped into
+separate reads.  Porechop performs thorough alignments to effectively find
+adapters, even at low sequence identity.  Porechop also supports demultiplexing
+of Nanopore reads that were barcoded with the Native Barcoding Kit, PCR
+Barcoding Kit or Rapid Barcoding Kit.")
+      (license license:gpl3+))))
+
+(define-public poretools
+  ;; The latest release was in 2016 and the latest commit is from 2017
+  ;; the recommended way to install is to clone the git repository
+  ;; https://poretools.readthedocs.io/en/latest/content/installation.html
+  (let ((commit "e426b1f09e86ac259a00c261c79df91510777407")
+        (revision "1"))
+    (package
+      (name "poretools")
+      (version (git-version "0.6.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/arq5x/poretools.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0bglj833wxpp3cq430p1d3xp085ls221js2y90w7ir2x5ay8l7am"))))
+      (build-system python-build-system)
+      ;; requires python >=2.7, <3.0, and the same for python dependencies
+      (arguments `(#:python ,python-2))
+      (inputs
+       `(("hdf5" ,hdf5)))
+      (propagated-inputs
+       `(("python-dateutil" ,python2-dateutil)
+         ("python-h5py" ,python2-h5py)
+         ("python-matplotlib" ,python2-matplotlib)
+         ("python-pandas" ,python2-pandas)
+         ("python-seaborn" ,python2-seaborn)))
+      (home-page "https://poretools.readthedocs.io")
+      (synopsis "Toolkit for working with nanopore sequencing data")
+      (description
+       "The MinION from Oxford Nanopore Technologies is a nanopore sequencer.
+This @code{poretools} package is a flexible toolkit for exploring datasets
+generated by nanopore sequencing devices for the purposes of quality control and
+downstream analysis.  Poretools operates directly on the native FAST5, a variant
+of the Hierarchical Data Format (HDF5) standard.")
+      (license license:expat))))
+
+(define-public r-absfiltergsea
+  (package
+    (name "r-absfiltergsea")
+    (version "1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "AbsFilterGSEA" version))
+       (sha256
+        (base32 "15srxkxsvn38kd5frdrwfdf0ad8gskrd0h01wmdf9hglq8fjrp7w"))))
+    (properties `((upstream-name . "AbsFilterGSEA")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-biobase" ,r-biobase)
+       ("r-deseq" ,r-deseq)
+       ("r-limma" ,r-limma)
+       ("r-rcpp" ,r-rcpp)
+       ("r-rcpparmadillo" ,r-rcpparmadillo)))
+    (home-page "https://cran.r-project.org/web/packages/AbsFilterGSEA/")
+    (synopsis "Improved false positive control of gene-permuting with absolute filtering")
+    (description
+     "This package provides a function that performs gene-permuting of a gene-set
+enrichment analysis (GSEA) calculation with or without the absolute filtering.
+  Without filtering, users can perform (original) two-tailed or one-tailed
+absolute GSEA.")
+    (license license:gpl2)))
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 067a288004..1cac8b9fb4 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -186,8 +186,8 @@ their dependencies.")
       (license l:gpl3+))))
 
 (define-public cuirass
-  (let ((commit "8d40c49170971ad7bbf8b97336934dbb3d949fc1")
-        (revision "19"))
+  (let ((commit "fe2b73c2353d106431ed0659345391f14ed64600")
+        (revision "20"))
     (package
       (name "cuirass")
       (version (string-append "0.0.1-" revision "." (string-take commit 7)))
@@ -199,7 +199,7 @@ their dependencies.")
                 (file-name (string-append name "-" version))
                 (sha256
                  (base32
-                  "0xxcapf9ag3zx6131v128vhin5m2j3w2gjbjbpdwr0qkaysh0gvf"))))
+                  "00ldbig2p14qpwrl2i2hnhb9idgbbf0kqnlh4n79rmz96blm7463"))))
       (build-system gnu-build-system)
       (arguments
        '(#:modules ((guix build utils)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 4264e292bd..98a86b763f 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -403,13 +403,13 @@ functionality such as HTML output.")
   (package
     (name "rtags")
     (version "2.18")
-    (home-page "https://github.com/Andersbakken/rtags")
     (source
      (origin
-       (method url-fetch)
-       (uri
-        (string-append home-page "/archive/v" version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Andersbakken/rtags.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (patches (search-patches "rtags-separate-rct.patch"))
        (modules '((guix build utils)))
        (snippet
@@ -424,7 +424,7 @@ functionality such as HTML output.")
              #t)))
        (sha256
         (base32
-         "0scjbp1z201q8njvrxqz7lk2m9b6k2rxd5q1shrng6532r7ndif2"))))
+         "0raqjbkl1ykga4ahgl9xw49cgh3cyqcf42z36z7d6fz1fw192kg0"))))
     (build-system cmake-build-system)
     (arguments
      '(#:build-type "RelWithDebInfo"
@@ -442,6 +442,7 @@ functionality such as HTML output.")
        ("lua" ,lua)
        ("rct" ,rct)
        ("selene" ,selene)))
+    (home-page "https://github.com/Andersbakken/rtags")
     (synopsis "Indexer for the C language family with Emacs integration")
     (description
      "RTags is a client/server application that indexes C/C++ code and keeps a
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 58e9ad09c7..efcc2dccb5 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -5895,3 +5895,364 @@ hemoglobin to reticulocytes (OFF-score), as well as example data.")
 based on entropy estimates from k-nearest neighbors distances and algorithms
 for the reconstruction of gene regulatory networks.")
     (license license:agpl3+)))
+
+(define-public r-pscl
+  (package
+    (name "r-pscl")
+    (version "1.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "pscl" version))
+       (sha256
+        (base32 "1phf3awsfr4ncqfqzin5m1pz0g7y1zhbcm2sz7358ssw914fd7rc"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-mass" ,r-mass)))
+    (home-page "https://github.com/atahk/pscl/")
+    (synopsis "Political science computational laboratory")
+    (description
+     "The @code{pscl} is an R package providing classes and methods for:
+@enumerate
+@item Bayesian analysis of roll call data (item-response models);
+@item elementary Bayesian statistics;
+@item maximum likelihood estimation of zero-inflated and hurdle models for count
+data;
+@item utility functions.
+@end enumerate")
+    (license license:gpl2)))
+
+(define-public r-accelmissing
+  (package
+    (name "r-accelmissing")
+    (version "1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "accelmissing" version))
+       (sha256
+        (base32 "1nql9inx6azdzi3z4sfm2vdml2mms6krl8wzlf1dn1c97ahn57fy"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-mice" ,r-mice)
+       ("r-pscl" ,r-pscl)))
+    (home-page "https://cran.r-project.org/web/packages/accelmissing/")
+    (synopsis "Missing value imputation for accelerometer data")
+    (description
+     "This package provides a statistical method to impute the missing values in
+accelerometer data.  The methodology includes both parametric and
+semi-parametric multiple imputations under the zero-inflated Poisson lognormal
+model.  It also provides multiple functions to preprocess the accelerometer data
+previous to the missing data imputation.  These include detecting the wearing
+and the non-wearing time, selecting valid days and subjects, and creating plots.")
+    (license license:gpl2+)))
+
+(define-public r-mhsmm
+  (package
+    (name "r-mhsmm")
+    (version "0.4.16")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "mhsmm" version))
+       (sha256
+        (base32 "009dj0zkj1zry7jr9hf4cknb686z50a2l967if64xm0dvjmp7dgs"))))
+    (build-system r-build-system)
+    (propagated-inputs `(("r-mvtnorm" ,r-mvtnorm)))
+    (home-page "https://github.com/jaredo/mhsmm/")
+    (synopsis "Inference for hidden Markov and semi-Markov models")
+    (description
+     "The @code{r-mhsmm} package implements estimation and prediction methods for
+hidden Markov and semi-Markov models for multiple observation sequences.  Such
+techniques are of interest when observed data is thought to be dependent on some
+unobserved (or hidden) state.  Also, this package is suitable for equidistant
+time series data, with multivariate and/or missing data.  Allows user defined
+emission distributions.")
+    (license license:gpl2+)))
+
+(define-public r-nleqslv
+  (package
+    (name "r-nleqslv")
+    (version "3.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "nleqslv" version))
+       (sha256
+        (base32 "1v9znvncyigw9r25wx2ma0b7ib179b488dl0qsrhp5zrcz7mcjgm"))))
+    (build-system r-build-system)
+    (native-inputs `(("gfortran" ,gfortran)))
+    (home-page "https://cran.r-project.org/web/packages/nleqslv/")
+    (synopsis "Solve systems of nonlinear equations")
+    (description
+     "The @code{r-nleqslv} package solves a system of nonlinear equations using a
+Broyden or a Newton method with a choice of global strategies such as line
+search and trust region.  There are options for using a numerical or user
+supplied Jacobian, for specifying a banded numerical Jacobian and for allowing a
+singular or ill-conditioned Jacobian.")
+    (license license:gpl2+)))
+
+(define-public r-physicalactivity
+  (package
+    (name "r-physicalactivity")
+    (version "0.2-2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "PhysicalActivity" version))
+       (sha256
+        (base32 "14z6plgwyr46vs9m997rvlz8sdglfs9g087an8668zqkzzs2w4ln"))))
+    (properties
+     `((upstream-name . "PhysicalActivity")))
+    (build-system r-build-system)
+    (home-page "https://cran.r-project.org/web/packages/PhysicalActivity/")
+    (synopsis "Procesing accelerometer data for physical activity measurement")
+    (description
+     "This @code{r-physicalactivity} package provides a function @code{wearingMarking}
+for classification of monitor wear and nonwear time intervals in accelerometer
+data collected to assess physical activity.  The package also contains functions
+for making plots of accelerometer data and obtaining the summary of various
+information including daily monitor wear time and the mean monitor wear time
+during valid days.  The revised package version 0.2-1 improved the functions
+regarding speed, robustness and add better support for time zones and daylight
+saving.  In addition, several functions were added:
+@enumerate
+@item the @code{markDelivery} can classify days for ActiGraph delivery by mail;
+@item the @code{markPAI} can categorize physical activity intensity level based
+on user-defined cut-points of accelerometer counts.
+@end enumerate
+  It also supports importing ActiGraph (AGD) files with @code{readActigraph} and
+@code{queryActigraph} functions.")
+    (license license:gpl3+)))
+
+(define-public r-acc
+  (package
+    (name "r-acc")
+    (version "1.3.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "acc" version))
+       (sha256
+        (base32 "1ii2vm47djxbixa75h690q1s2f9m9x6i8nkygik93j6dayr6kr1m"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-circlize" ,r-circlize)
+       ("r-dbi" ,r-dbi)
+       ("r-ggplot2" ,r-ggplot2)
+       ("r-iterators" ,r-iterators)
+       ("r-mhsmm" ,r-mhsmm)
+       ("r-nleqslv" ,r-nleqslv)
+       ("r-physicalactivity" ,r-physicalactivity)
+       ("r-plyr" ,r-plyr)
+       ("r-r-utils" ,r-r-utils)
+       ("r-rcpp" ,r-rcpp)
+       ("r-rcpparmadillo" ,r-rcpparmadillo)
+       ("r-rsqlite" ,r-rsqlite)
+       ("r-zoo" ,r-zoo)))
+    (home-page "https://cran.r-project.org/web/packages/acc/")
+    (synopsis "Exploring accelerometer data")
+    (description
+     "This package processes accelerometer data from uni-axial and tri-axial devices
+and generates data summaries.  Also, includes functions to plot, analyze, and
+simulate accelerometer data.")
+    (license license:gpl2+)))
+
+(define-public r-rbenchmark
+  (package
+    (name "r-rbenchmark")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "rbenchmark" version))
+       (sha256
+        (base32 "010fn3qwnk2k411cbqyvra1d12c3bhhl3spzm8kxffmirj4p2al9"))))
+    (build-system r-build-system)
+    (home-page "https://cran.r-project.org/web/packages/rbenchmark/")
+    (synopsis "Benchmarking routine for R")
+    (description
+     "This @code{r-rbenchmark} package is inspired by the Perl module Benchmark,
+and is intended to facilitate benchmarking of arbitrary R code.  The library
+consists of just one function, benchmark, which is a simple wrapper around
+system.time.  Given a specification of the benchmarking process (counts of
+replications, evaluation environment) and an arbitrary number of expressions,
+benchmark evaluates each of the expressions in the specified environment,
+replicating the evaluation as many times as specified, and returning the results
+conveniently wrapped into a data frame.")
+    (license license:gpl2+)))
+
+(define-public r-dvmisc
+  (package
+    (name "r-dvmisc")
+    (version "1.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "dvmisc" version))
+       (sha256
+        (base32 "1dy0yykskwhkql19bhzmbwsgv028afc8jh9yqwbczj6f3vpv31zh"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-mass" ,r-mass)
+       ("r-rbenchmark" ,r-rbenchmark)
+       ("r-rcpp" ,r-rcpp)))
+    (home-page "https://cran.r-project.org/web/packages/dvmisc/")
+    (synopsis "Faster computation of common statistics and miscellaneous functions")
+    (description
+     "This package implements faster versions of base R functions (e.g. mean, standard
+deviation, covariance, weighted mean), mostly written in C++, along with
+miscellaneous functions for various purposes (e.g. create the histogram with
+fitted probability density function or probability mass function curve, create
+the body mass index groups, assess the linearity assumption in logistic
+regression).")
+    (license license:gpl2)))
+
+(define-public r-accelerometry
+  (package
+    (name "r-accelerometry")
+    (version "3.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "accelerometry" version))
+       (sha256
+        (base32 "13xzrwhr4i1nj9c8vrmfdg2rmrc8n446iihcyxmy99sm99hpzyip"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-dvmisc" ,r-dvmisc)
+       ("r-rcpp" ,r-rcpp)))
+    (home-page "https://cran.r-project.org/web/packages/accelerometry/")
+    (synopsis "Functions for processing accelerometer data")
+    (description
+     "This package provides a collection of functions that perform operations on
+time-series accelerometer data, such as identify the non-wear time, flag minutes
+that are part of an activity bout, and find the maximum 10-minute average count
+value.  The functions are generally very flexible, allowing for a variety of
+algorithms to be implemented.")
+    (license license:gpl3)))
+
+(define-public r-absim
+  (package
+    (name "r-absim")
+    (version "0.2.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "AbSim" version))
+       (sha256
+        (base32 "16ddjk8b6xw80ch4jis1y751i9561wdxh0gifbf15qiz3vjckq8m"))))
+    (properties `((upstream-name . "AbSim")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-ape" ,r-ape)
+       ("r-powerlaw" ,r-powerlaw)))
+    (home-page "https://cran.r-project.org/web/packages/AbSim/")
+    (synopsis "Time resolved simulations of antibody repertoires")
+    (description
+     "This package provides simulation methods for the evolution of antibody repertoires.
+  The heavy and light chain variable region of both human and C57BL/6 mice can
+be simulated in a time-dependent fashion.  Both single lineages using one set of
+V-, D-, and J-genes or full repertoires can be simulated.  The algorithm begins
+with an initial V-D-J recombination event, starting the first phylogenetic tree.
+  Upon completion, the main loop of the algorithm begins, with each iteration
+representing one simulated time step.  Various mutation events are possible at
+each time step, contributing to a diverse final repertoire.")
+    (license license:gpl2)))
+
+(define-public r-ac3net
+  (package
+    (name "r-ac3net")
+    (version "1.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "Ac3net" version))
+       (sha256
+        (base32 "1ns4n0xxz6p34c11bj0k7nzgmyqr9mis2b0g5nfz37dbikndyqyz"))))
+    (properties `((upstream-name . "Ac3net")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-data-table" ,r-data-table)))
+    (home-page "https://cran.r-project.org/web/packages/Ac3net/")
+    (synopsis "Inferring directional conservative causal core gene networks")
+    (description "This package infers directional Conservative causal core
+(gene) networks (C3NET).  This is a version of the algorithm C3NET with
+directional network.")
+    (license license:gpl3+)))
+
+(define-public r-aca
+  (package
+    (name "r-aca")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "ACA" version))
+       (sha256
+        (base32 "1i3hm27nvnkvc39xlh0d1blq8q0q02czmvgi3cazmjx3jvxay0vq"))))
+    (properties `((upstream-name . "ACA")))
+    (build-system r-build-system)
+    (home-page "https://cran.r-project.org/web/packages/ACA/")
+    (synopsis "Abrupt change-point or aberration detection in point series")
+    (description
+     "This package offers an interactive function for the detection of breakpoints in
+series.")
+    ;; Any version of the GPL
+    (license (list license:gpl2+ license:gpl3+))))
+
+(define-public r-acceptancesampling
+  (package
+    (name "r-acceptancesampling")
+    (version "1.0-5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "AcceptanceSampling" version))
+       (sha256
+        (base32 "18krmmyn8pn11aqd81kbvka68lnd36mnpdh7p3pz9r4m4vjj007x"))))
+    (properties
+     `((upstream-name . "AcceptanceSampling")))
+    (build-system r-build-system)
+    (home-page "https://cran.r-project.org/web/packages/AcceptanceSampling/")
+    (synopsis "Creation and evaluation of acceptance sampling plans")
+    (description
+     "This @code{r-acceptancesampling} provides functionality for creating and evaluating
+acceptance sampling plans.  Acceptance sampling is a methodology commonly used
+in quality control and improvement.  International standards of acceptance
+sampling provide sampling plans for specific circumstances.  The aim of this
+package is to provide an easy-to-use interface to visualize single, double or
+multiple sampling plans.  In addition, methods have been provided to enable the
+user to assess sampling plans against pre-specified levels of performance, as
+measured by the probability of acceptance for a given level of quality in the
+lot.")
+    (license license:gpl3+)))
+
+(define-public r-acclma
+  (package
+    (name "r-acclma")
+    (version "1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "ACCLMA" version))
+       (sha256
+        (base32 "1na27sp18fq12gp6vxgqw1ffsz2yi1d8xvrxbrzx5g1kqxrayy0v"))))
+    (properties `((upstream-name . "ACCLMA")))
+    (build-system r-build-system)
+    (home-page "https://cran.r-project.org/web/packages/ACCLMA/")
+    (synopsis "ACC & LMA graph plotting")
+    (description
+     "This package contains a function that imports data from a @acronym{CSV,
+Comma-Separated Values} file, or uses manually entered data from the format (x,
+y, weight) and plots the appropriate @acronym{ACC, Absolute Concentration
+Curve} vs @acronym{LOI, Line of Independence} graph and
+@acronym{LMA, @acronym{LOI} Minus @acronym{ACC}} graph.  The main
+function is @code{plotLMA} (source file, header) that takes a data set and plots the
+appropriate @acronym{LMA} and @acronym{ACC} graphs.  If no source file (a
+string) was passed, a manual data entry window is opened.  The header parameter
+indicates by TRUE/FALSE (false by default) if the source @acronym{CSV} file has
+a header row or not.  The dataset should contain only one independent variable
+(x) and one dependent variable (y) and can contain a weight for each
+observation.")
+    (license license:gpl2)))
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index a704915157..0655e8f393 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -642,7 +642,7 @@ HP@tie{}LaserJet, and possibly other printers.  See @file{README} for details.")
 (define-public escpr
   (package
     (name "escpr")
-    (version "1.6.20")
+    (version "1.6.30")
     ;; XXX: This currently works.  But it will break as soon as a newer
     ;; version is available since the URLs for older versions are not
     ;; preserved.  An alternative source will be added as soon as
@@ -650,12 +650,12 @@ HP@tie{}LaserJet, and possibly other printers.  See @file{README} for details.")
     (source (origin
               (method url-fetch)
               ;; The uri has to be chopped up in order to satisfy guix lint.
-              (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/07/16/23/"
-                                  "804253d188a31ae6a0f2722648248ef952afedfb/"
-                                  "epson-inkjet-printer-escpr-1.6.20-1lsb3.2.tar.gz"))
+              (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/08/18/20/"
+                                  "e94de600e28e510c1cfa158929d8b2c0aadc8aa0/"
+                                  "epson-inkjet-printer-escpr-1.6.30-1lsb3.2.tar.gz"))
               (sha256
                (base32
-                "19800pl7kbbgdzbsy9ijmd7dm3ly4kr2h1dxypqpd075g6n0i770"))))
+                "0m8pyfkixisp0vclwxj340isn15zzisal0v2xvv66kxfd68dzf12"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index fecf661833..5c8934e89e 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2685,12 +2685,14 @@ parsing code in hiredis.  It primarily speeds up parsing of multi bulk replies."
      `(#:tests? #f))
     (home-page "https://github.com/jamesls/fakeredis")
     (synopsis "Fake implementation of redis API for testing purposes")
-    (description "Fakeredis is a pure python implementation of the redis-py
-python client that simulates talking to a redis server.  This was created for a
-single purpose: to write unittests.  Setting up redis is not hard, but many time
- you want to write unittests that do not talk to an external server (such as
-redis).  This module now allows tests to simply use this module as a reasonable
-substitute for redis.")
+    (description
+     "Fakeredis is a pure-Python implementation of the redis-py Python client
+that simulates talking to a redis server.  It was created for a single purpose:
+to write unit tests.
+
+Setting up redis is not hard, but one often wants to write unit tests that don't
+talk to an external server such as redis.  This module can be used as a
+reasonable substitute.")
     (license license:bsd-3)))
 
 (define-public python2-fakeredis
diff --git a/gnu/packages/dico.scm b/gnu/packages/dico.scm
index a85987d9b1..d96dbb86d9 100644
--- a/gnu/packages/dico.scm
+++ b/gnu/packages/dico.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,14 +38,14 @@
 (define-public dico
   (package
     (name "dico")
-    (version "2.6")
+    (version "2.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/dico/dico-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0zmi041gv5nd5fmyzgdrgrsy2pvjaq9p8dvvhxwi842hiyng5b7i"))))
+               "0dg4aacnmlf3ljssd7dwh8z5644xzq8k1501mbsx8nz8p8a9mbsq"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags (list (string-append "--with-guile-site-dir=" %output
@@ -57,7 +58,11 @@
                       ;; infrastructure.  Gag it.
                       (setenv "GUILE_AUTO_COMPILE" "0")
                       (setenv "GUILE_WARN_DEPRECATED" "no")
-                      #t)))))
+                      #t))
+                  (replace 'check
+                    (lambda _
+                      ;; Test '71: append + dooffs + env' fails if $V is not 2.
+                      (invoke "make" "check" "V=2"))))))
     (inputs
      `(("m4" ,m4)                                 ;used at run time
        ("pcre" ,pcre)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 9f63223453..ce7ef1cf75 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -219,7 +220,7 @@ It comes with a German-English dictionary with approximately 270,000 entries.")
                            "Grammalecte-fr-v" version ".zip"))
        (sha256
         (base32
-         "1flsahqw2r0cmg0bixpl5w0acricmdh2cf4lf9zr66ydgmjnmv2s"))))
+         "11byjs3ggdhia5f4vyfqfvbbczsfqimll98h98g7hlsrm7vrifb0"))))
     (build-system python-build-system)
     (home-page "https://www.dicollecte.org")
     (synopsis  "French spelling and grammar checker")
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 206f9c71bb..b4d4fbafb8 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -631,14 +631,15 @@ passphrases.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'autogen
+         (add-after 'unpack 'patch-FHS-file-names
            (lambda _
              (substitute* "autogen.sh"
                (("/bin/sh") (which "sh")))
              (substitute* "git-version-gen"
                (("/bin/sh") (which "sh")))
              (substitute* "git-version"
-               (("/bin/bash") (which "bash"))))))
+               (("/bin/bash") (which "bash")))
+             #t)))
        #:make-flags
        (let ((out (assoc-ref %outputs "out")))
          (list (string-append "BASH_COMPLETION_DIR=" out
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 00135294be..ad1a8638bc 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -104,7 +104,7 @@ and BOOTP/TFTP for network booting of diskless machines.")
 (define-public isc-bind
   (package
     (name "bind")
-    (version "9.12.2-P1")
+    (version "9.12.2-P2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -112,7 +112,7 @@ and BOOTP/TFTP for network booting of diskless machines.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "192ld6w8f4n46hvdmmzzrfkd28apf4dwmbpbi3j2q1d2p315ajww"))))
+                "0gk9vwqlbdmn10m21f2awvmiccfbadvcwi8zsgm91awbx4k7h0l7"))))
     (build-system gnu-build-system)
     (outputs `("out" "utils"))
     (inputs
@@ -289,6 +289,77 @@ asynchronous fashion.")
                    (license:non-copyleft "file://LICENSE") ; includes.h
                    license:openssl))))
 
+(define-public nsd
+  (package
+    (name "nsd")
+    (version "4.1.25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.nlnetlabs.nl/downloads/nsd/nsd-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0zyzjd3wmq258jiry62ci1z23qfd0rc5ggnpmybc60xvpddgynwg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--enable-pie"             ; fully benefit from ASLR
+             "--enable-ratelimit"
+             "--enable-recvmmsg"
+             "--enable-relro-now"       ; protect GOT and .dtor areas
+             "--disable-radix-tree"
+             (string-append "--with-libevent="
+                            (assoc-ref %build-inputs "libevent"))
+             (string-append "--with-ssl="
+                            (assoc-ref %build-inputs "openssl"))
+             "--with-configdir=/etc"
+             "--with-nsd_conf_file=/etc/nsd/nsd.conf"
+             "--with-logfile=/var/log/nsd.log"
+             "--with-pidfile=/var/db/nsd/nsd.pid"
+             "--with-dbfile=/var/db/nsd/nsd.db"
+             "--with-zonesdir=/etc/nsd"
+             "--with-xfrdfile=/var/db/nsd/xfrd.state"
+             "--with-zonelistfile=/var/db/nsd/zone.list")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-installation-paths
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (string-append out "/share/doc/" ,name "-" ,version)))
+               ;; The ‘make install’ target tries to create the parent
+               ;; directories of run-time things like ‘pidfile’ above, and
+               ;; useless empty directories like 'configdir'.  Remove such
+               ;; '$(INSTALL)' lines and install the example configuration file
+               ;; in an appropriate location.
+               (substitute* "Makefile.in"
+                 ((".*INSTALL.*\\$\\((config|pid|xfr|db)dir" command)
+                  (string-append "#" command))
+                 (("\\$\\(nsdconfigfile\\)\\.sample" file-name)
+                  (string-append doc "/examples/" file-name)))
+               #t))))
+       #:tests? #f))                    ; no tests
+    (inputs
+     `(("libevent" ,libevent)
+       ("openssl" ,openssl)))
+    (home-page "https://www.nlnetlabs.nl/projects/nsd/about/")
+    (synopsis "Authoritative DNS name server")
+    (description "@dfn{NSD}, short for Name Server Daemon, is an authoritative
+name server for the Domain Name System (@dfn{DNS}).  It aims to be a fast and
+RFC-compliant nameserver.
+
+NSD uses zone information compiled via @command{zonec} into a binary database
+file (@file{nsd.db}).  This allows fast startup of the name service daemon and
+allows syntax-structural errors in zone files to be flagged at compile time,
+before being made available to NSD service itself.  However, most traditional
+BIND-style zone files can be directly imported into NSD without modification.
+
+The collection of programs and processes that make up NSD are designed so that
+the daemon itself runs as a non-privileged user and can be easily configured to
+run in a @code{chroot} jail, thus making any security flaws in NSD less likely
+to result in system-wide compromise.")
+    (license (list license:bsd-3))))
+
 (define-public unbound
   (package
     (name "unbound")
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f29040c372..1df3456e4a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -458,7 +458,7 @@ on stdout instead of using a socket as the Emacsclient does.")
              (method url-fetch)
              (uri (string-append
                    "https://github.com/magit/magit/releases/download/"
-                   version "/" name "-" version ".tar.gz"))
+                   version "/magit-" version ".tar.gz"))
              (sha256
               (base32
                "1ygaah3dd3nxpyd17297xgvdcgr7pgzzwlmpnmchki0kiwgg3sbc"))))
@@ -782,9 +782,6 @@ different tools.  It highlights errors and warnings inline in the buffer, and
 provides an optional IDE-like error list.")
     (license license:gpl3+)))                     ;+GFDLv1.3+ for the manual
 
-(define-public flycheck
-  (deprecated-package "flycheck" emacs-flycheck))
-
 
 ;;;
 ;;; Web browsing.
@@ -1066,9 +1063,6 @@ light user interface.")
     (home-page "https://www.gnu.org/software/emms/")
     (license license:gpl3+)))
 
-(define-public emms
-  (deprecated-package "emacs-emms" emacs-emms))
-
 (define-public emacs-emms-player-mpv
   ;; A new mpv backend is included in Emms from 5.0.
   (deprecated-package "emacs-emms-player-mpv" emacs-emms))
@@ -1088,7 +1082,7 @@ light user interface.")
          "0ifszi930pnaxk1x8pcydmvnp06868gc7nfx14q17zbajbx735k6"))))
     (build-system emacs-build-system)
     (propagated-inputs
-     `(("emms" ,emms)))
+     `(("emms" ,emacs-emms)))
     (home-page "https://github.com/momomo5717/emms-mode-line-cycle")
     (synopsis "Display the EMMS mode line as a ticker")
     (description
@@ -2722,9 +2716,6 @@ view the build status of those servers' build jobs, and possibly to trigger
 build jobs.")
     (license license:gpl3+)))
 
-(define-public butler
-  (deprecated-package "emacs-butler" emacs-butler))
-
 (define-public emacs-company
   (package
     (name "emacs-company")
@@ -2874,9 +2865,6 @@ automatically inserts a Unicode opening or closing quotation mark, depending
 on context.")
     (license license:gpl3+)))
 
-(define-public typo
-  (deprecated-package "emacs-typo" emacs-typo))
-
 (define-public emacs-scheme-complete
   (let ((commit "9b5cf224bf2a5994bc6d5b152ff487517f1a9bb5"))
     (package
@@ -6994,8 +6982,8 @@ Emacs.")
                (substitute* "bin/ert-runner"
                  (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
                   (string-append "ERT_RUNNER=\"" out
-                                 "/share/emacs/site-lisp/guix.d/"
-                                 ,name "-" ,version)))
+                                 "/share/emacs/site-lisp/guix.d/ert-runner-"
+                                 ,version)))
                (install-file "bin/ert-runner" (string-append out "/bin"))
                (wrap-program (string-append out "/bin/ert-runner")
                  (list "EMACSLOADPATH" ":" 'prefix
@@ -8019,7 +8007,7 @@ supports multiple backends such as @code{vlc}, @code{mpg123},
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "https://github.com/Groovy-Emacs-Modes/" name
+                    "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes"
                     "/archive/" version ".tar.gz"))
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
@@ -8061,9 +8049,6 @@ navigation with the grails mode.")
 @kbd{C-<} to jump to the next and previous slide.")
       (license license:gpl3+))))
 
-(define-public org-tree-slide
-  (deprecated-package "emacs-org-tree-slide" emacs-org-tree-slide))
-
 (define-public emacs-scratch-el
   (let ((commit "2cdf2b841ce7a0987093f65b0cc431947549f897")
         (revision "1"))
@@ -10425,8 +10410,8 @@ perform regression test for packages that provide font-lock rules.")
       (license license:gpl3+))))
 
 (define-public emacs-racket-mode
-  (let ((commit "92c33487f6c707880ac3f6169e7ea65ddffd1463")
-        (revision "1"))
+  (let ((commit "b977873e6128f8399432dcd60cc39f6a6f803d9c")
+        (revision "2"))
     (package
       (name "emacs-racket-mode")
       (version (string-append "0.0.2" "-" revision "."
@@ -10440,7 +10425,7 @@ perform regression test for packages that provide font-lock rules.")
          (file-name (string-append name "-" version "-checkout"))
          (sha256
           (base32
-           "19q6ym10gj2xdzzcgh3wdbq1xv8cv7nlrhv2b0bjvvdjzhiki472"))))
+           "0vp4bbbplqvmnhjpl6ajrlydmrhqzil56cfbs18m5c5fddx0zlh7"))))
       (build-system emacs-build-system)
       (arguments
        `(#:include '("\\.el$" "\\.rkt$")))
@@ -12277,3 +12262,96 @@ execute its commands and resize images.")
       (description "Synosaurus is a thesaurus fontend for Emacs with pluggable
 backends, including the @command{wordnet} offline backend.")
       (license license:gpl3+))))
+
+(define-public emacs-all-the-icons
+  (package
+    (name "emacs-all-the-icons")
+    (version "3.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/domtronn/all-the-icons.el.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1sdl33117lccznj38021lwcdnpi9nxmym295q6y460y4dm4lx0jn"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:include '("\\.el$" "^data/" "^fonts/")
+       ;; Compiling "test/" fails with "Symbol’s value as variable is void:
+       ;; all-the-icons--root-code".  Ignoring tests.
+       #:exclude '("^test/")
+       #:tests? #f))
+    (propagated-inputs
+     `(("f" ,emacs-f)
+       ("memoize" ,emacs-memoize)))
+    (home-page "https://github.com/domtronn/all-the-icons.el")
+    (synopsis "Collect icon fonts and propertize them within Emacs")
+    (description "All-the-icons is a utility package to collect various icon
+fonts and propertize them within Emacs.  Icon fonts allow you to propertize
+and format icons the same way you would normal text.  This enables things such
+as better scaling of and anti aliasing of the icons.")
+    ;; Package is released under Expat license.  Elisp files are licensed
+    ;; under GPL3+.  Fonts come with various licenses: Expat for
+    ;; "all-the-icons.ttf" and "file-icons.ttf", Apache License 2.0 for
+    ;; "material-design-icons.ttf", and SIL OFL 1.1 for "fontawesome.ttf",
+    ;; "ocitcons.ttf" and "weathericons.ttf".
+    (license
+     (list license:expat license:gpl3+ license:silofl1.1 license:asl2.0))))
+
+(define-public emacs-powerline
+  (package
+    (name "emacs-powerline")
+    (version "2.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/milkypostman/powerline.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1hp3xp18943n0rlggz55150020ivw8gvi1vyxkr4z8xhpwq4gaar"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/milkypostman/powerline/")
+    (synopsis "Mode-line plugin for Emacs")
+    (description "Powerline is a utility plugin which allows you to create
+a better-looking, more functional Emacs mode-line.  A collection of predefined
+themes comes with the package.")
+    (license license:gpl3+)))
+
+(define-public emacs-spaceline
+  (package
+    (name "emacs-spaceline")
+    (version "2.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/TheBB/spaceline.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1q8r95zfrh0vxna5ml2pq9b9f66clfqcl4d2qy2aizkvzyxg6skl"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("dash" ,emacs-dash)
+       ("powerline" ,emacs-powerline)
+       ("s" ,emacs-s)))
+    (home-page "https://github.com/TheBB/spaceline")
+    (synopsis "Powerline theme from Spacemacs")
+    (description "Spaceline provides Spacemacs' mode-line theme.
+This package provides features for three kinds of users.
+
+@itemize
+@item You just want to use the Spacemacs mode-line theme and forget about it.
+@item You want to use something similar to the Spacemacs mode-line theme, but
+with a handful of easy tweaks.
+@item You want an easy-to-use library for building your own mode-line from
+scratch, and you think the Spacemacs theme looks good.
+@end itemize")
+    (license license:gpl3+)))
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 0174224616..38c76cd737 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build utils)
@@ -1104,3 +1106,40 @@ and displaying decoded target responses.
 @end enumerate")
     (home-page "https://www.freecalypso.org/")
     (license license:public-domain)))
+
+(define-public stlink
+  (package
+    (name "stlink")
+    (version "1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/texane/stlink/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "01z1cz1a5xbbhd163qrqcgp4bi1k145pb80jmwdz50g7sfzmy570"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no tests
+       #:configure-flags
+       (let* ((out (assoc-ref %outputs "out"))
+              (etc (in-vicinity out "etc"))
+              (modprobe (in-vicinity etc "modprobe.d"))
+              (udev-rules (in-vicinity etc "udev/rules.d")))
+         (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
+               (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
+    (inputs
+     `(("libusb" ,libusb)))
+    (synopsis "Programmer for STM32 Discovery boards")
+    (description "This package provides a firmware programmer for the STM32
+Discovery boards.  It supports two versions of the chip: ST-LINK/V1 (on
+STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
+Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
+commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
+raw USB commands.")
+    (home-page "https://github.com/texane/stlink")
+    ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
+    ;; licensed under the GPLv2+.
+    (license (list license:bsd-3 license:gpl2+))))
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 782bff5b18..438e9df1fc 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1055,15 +1055,16 @@ emulation community.  It provides highly accurate emulation.")
 (define-public retroarch
   (package
     (name "retroarch")
-    (version "1.7.4")
+    (version "1.7.5")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/libretro/RetroArch/archive/v"
-                           version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/libretro/RetroArch.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "0h6y2hpjg4b470jvn9ghwp0k3a527sbb6xhia17frlm9w9v5028w"))))
+        (base32 "1jfpgl34jjxn3dvxd1kd564swkw7v98hnn562v998b7vllz3dxdm"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no tests
@@ -1184,7 +1185,7 @@ play them on systems for which they were never designed!")
 (define-public mame
   (package
     (name "mame")
-    (version "0.201")
+    (version "0.202")
     (source
      (origin
        (method git-fetch)
@@ -1194,7 +1195,7 @@ play them on systems for which they were never designed!")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "00whiig4ld3d4fkl34q48vlf28ygvvp5g7fp0rb5n31ymhl4kajk"))
+         "1v9gm124p65nbj678gfkcvwphp9qc15ky2p12ca6g3rllma94di5"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled libraries.
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 45dc1dbbeb..1a0ebba304 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Timo Eisenmann <eisenmann@fn.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -268,13 +269,23 @@ Libraries with some extra bells and whistles.")
          (add-before 'configure 'set-system-actions
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((xkeyboard (assoc-ref inputs "xkeyboard-config"))
-                   (utils     (assoc-ref inputs "util-linux")))
+                   (setxkbmap (assoc-ref inputs "setxkbmap"))
+                   (utils     (assoc-ref inputs "util-linux"))
+                   (libc      (assoc-ref inputs "libc")))
                ;; We need to patch the path to 'base.lst' to be able
                ;; to switch the keyboard layout in E.
-               (substitute* "src/modules/xkbswitch/e_mod_parse.c"
+               (substitute* (list "src/modules/xkbswitch/e_mod_parse.c"
+                                  "src/modules/wizard/page_011.c")
                  (("/usr/share/X11/xkb/rules/xorg.lst")
                   (string-append xkeyboard
                                  "/share/X11/xkb/rules/base.lst")))
+               (substitute* "src/bin/e_xkb.c"
+                 (("\"setxkbmap \"")
+                  (string-append "\"" setxkbmap "/bin/setxkbmap \"")))
+               (substitute* (list "src/bin/e_intl.c"
+                                  "src/modules/conf_intl/e_int_config_intl.c"
+                                  "src/modules/wizard/page_010.c")
+                 (("locale -a") (string-append libc "/bin/locale -a")))
                (substitute* "src/modules/everything/evry_plug_apps.c"
                  (("/usr/bin/") ""))
                (substitute* "configure"
@@ -298,6 +309,7 @@ Libraries with some extra bells and whistles.")
        ("libxcb" ,libxcb)
        ("libxext" ,libxext)
        ("linux-pam" ,linux-pam)
+       ("setxkbmap" ,setxkbmap)
        ("xcb-util-keysyms" ,xcb-util-keysyms)
        ("xkeyboard-config" ,xkeyboard-config)))
     (home-page "https://www.enlightenment.org/about-enlightenment")
@@ -452,19 +464,22 @@ and in creating applications based on the Enlightenment Foundation Library suite
     (home-page "http://smhouston.us/ephoto/")
     (synopsis "EFL image viewer/editor/manipulator/slideshow creator")
     (description "Ephoto is an image viewer and editor written using the
-@dfn{Enlightenment Foundation Libraries} (EFL).  It focuses on simplicity and ease
-of use, while taking advantage of the speed and small footprint the EFL provide.
+@dfn{Enlightenment Foundation Libraries} (EFL).  It focuses on simplicity and
+ease of use, while taking advantage of the speed and small footprint the EFL
+provide.
 
 Ephoto’s features include:
 @enumerate
-@item Browsing the filesystem and displaying images in an easy to use grid view.
+@item Browsing the file system and displaying images in an easy-to-use grid view.
 @item Browsing images in a single image view format.
 @item Viewing images in a slideshow.
 @item Editing your image with features such as cropping, auto enhance,
 blurring, sharpening, brightness/contrast/gamma adjustments, hue/saturation/value
 adjustments, and color level adjustment.
-@item Applying artistic filters to your image such as black and white and old photo.
-@item Drag And Drop along with file operations to easy maintain your photo directories.
+@item Applying artistic filters to your image such as black and white and old
+photo.
+@item Drag And Drop along with file operations to easily maintain your photo
+directories.
 @end enumerate\n")
     (license (list
                license:bsd-2 ; Ephoto's thumbnailing code
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 3c9d7d49c1..b195019866 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -107,7 +107,7 @@ single file can be mounted.")
 (define-public disorderfs
   (package
     (name "disorderfs")
-    (version "0.5.3")
+    (version "0.5.4")
     (source
      (origin
        (method git-fetch)
@@ -117,7 +117,7 @@ single file can be mounted.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1nmhfvxpvz3xsfxl9wqnh6r2l5m7hjq6n0vpblsl5xdcvwaqcf50"))))
+         "1mw4ix9h17ikki8p2rxdvzp87rcm1c7by5lvfn5gxlxr7hlj9f8g"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 218b04baa1..6d4abc637b 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1210,7 +1210,7 @@ ExtraLight, Light, Book, Medium, Semibold, Bold & ExtraBold")
 (define-public font-culmus
   (package
     (name "font-culmus")
-    (version "0.132")
+    (version "0.133")
     (source
      (origin
        (method url-fetch)
@@ -1219,7 +1219,7 @@ ExtraLight, Light, Book, Medium, Semibold, Bold & ExtraBold")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1djxalm26r7bcq33ckmfa15xfs6pmqzvcl64d5lqa1dl01bl4j4z"))))
+         "02akysgsqhi15cck54xcacm16q5raf4l7shgb8fnj7xr3c1pbfyp"))))
     (build-system font-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index c6bccd452d..cf8047e5fe 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -349,7 +349,7 @@ of a the system to know what users are logged in, and where.")
 (define-public packagekit
   (package
     (name "packagekit")
-    (version "1.1.10")
+    (version "1.1.11")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -358,7 +358,7 @@ of a the system to know what users are logged in, and where.")
                    "PackageKit-" version ".tar.xz"))
              (sha256
               (base32
-               "1msfmb22cm4s3l6vsbr86b8s0v897sy6gcga3qg87z7640a0di2b"))))
+               "0fi6wn54y03zh5sn92nmmxkh4cd8yn44cyk0l8phw60ivfwmkh1q"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 86f2877f82..bfebcc433e 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -397,7 +397,7 @@ support.")
 (define-public tiled
   (package
     (name "tiled")
-    (version "1.1.6")
+    (version "1.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/bjorn/tiled/archive/v"
@@ -405,7 +405,7 @@ support.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "194ciw8688mikndvxivzb8ql5vm405pkwnn4srzm7ymwfc4xygb0"))))
+                "13dlf5kzvhhjkhy19118x3diakmraz4m9kxrsdam8dms6xivb6lp"))))
     (build-system gnu-build-system)
     (inputs
      `(("qtbase" ,qtbase)
@@ -1256,17 +1256,24 @@ a 2D editor view.")
 (define-public guile-chickadee
   (package
     (name "guile-chickadee")
-    (version "0.2.0")
+    (version "0.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://files.dthompson.us/chickadee/"
                                   "chickadee-" version ".tar.gz"))
               (sha256
                (base32
-                "10qx0ha5gsayybd186r1my7vc7rf5fbzp9jvmc4xg9a8wz8rqhah"))))
+                "0jl223dybsj5gvs7z4q60gnafj1b7kgi5mx0kj58m5knrp8qwg5h"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:make-flags '("GUILE_AUTO_COMPILE=0")))
+     '(#:make-flags '("GUILE_AUTO_COMPILE=0")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-godir
+           (lambda _
+             ;; Install compiled '.go' files into the site directory.
+             (substitute* "Makefile.in"
+               (("/ccache") "/site-ccache")))))))
     (propagated-inputs
      `(("guile-opengl" ,guile-opengl)
        ("guile-sdl2" ,guile-sdl2)))
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8be87f6f55..ec92f508bc 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -364,6 +364,59 @@ played.  Freedoom complements the Doom engine with free levels, artwork, sound
 effects and music to make a completely free game.")
    (license license:bsd-3)))
 
+(define-public freedroidrpg
+  (package
+    (name "freedroidrpg")
+    (version "0.16.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://ftp.osuosl.org/pub/freedroid/"
+                           "freedroidRPG-" (version-major+minor version) "/"
+                           "freedroidRPG-" version ".tar.gz"))
+       (sha256
+        (base32 "0n4kn38ncmcy3lrxmq8fjry6c1z50z4q1zcqfig0j4jb0dsz2va2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "CFLAGS="
+                       "-I" (assoc-ref %build-inputs "sdl-gfx") "/include/SDL "
+                       "-I" (assoc-ref %build-inputs "sdl-image") "/include/SDL "
+                       "-I" (assoc-ref %build-inputs "sdl-mixer") "/include/SDL")
+        "--enable-opengl")
+       ;; FIXME: the test suite fails with the following error output:
+       ;;   4586 Segmentation fault      env SDL_VIDEODRIVER=dummy \
+       ;;   SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
+       #:tests? #f))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glu" ,glu)
+       ("libjpeg" ,libjpeg)
+       ("libogg" ,libogg)
+       ("libpng" ,libpng)
+       ("libvorbis" ,libvorbis)
+       ("mesa" ,mesa)
+       ("python" ,python-wrapper)
+       ("sdl" ,sdl)
+       ("sdl-gfx" ,sdl-gfx)
+       ("sdl-image" ,sdl-image)
+       ("sdl-mixer" ,sdl-mixer)
+       ("zlib" ,zlib)))
+    (home-page "http://www.freedroid.org/")
+    (synopsis "Isometric role-playing game against killer robots")
+    (description
+     "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
+The game tells the story of a world destroyed by a conflict between robots and
+their human masters.  To restore peace to humankind, the player must complete
+numerous quests while fighting off rebelling robots---either by taking control
+of them, or by simply blasting them to pieces with melee and ranged weapons in
+real-time combat.")
+    (license (list license:expat        ; lua/
+                   license:gpl3         ; src/gen_savestruct.py
+                   license:gpl2+))))    ; the rest
+
 (define-public golly
   (package
     (name "golly")
@@ -2122,28 +2175,36 @@ on the screen and keyboard to display letters.")
 (define-public raincat
   (package
     (name "raincat")
-    (version "1.1.1.3")
+    (version "1.2.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "http://hackage.haskell.org/package/Raincat/Raincat-"
-             version
-             ".tar.gz"))
+       (uri (string-append "http://hackage.haskell.org/package/Raincat/"
+                           "Raincat-" version ".tar.gz"))
        (sha256
         (base32
-         "1aalh68h6799mv4vyg30zpskl5jkn6x2j1jza7p4lrflyifxzar8"))))
+         "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/raincat")
+                 `("LD_LIBRARY_PATH" ":" =
+                   (,(string-append (assoc-ref inputs "freeglut")
+                                    "/lib"))))
+               #t))))))
     (inputs
      `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-random" ,ghc-random)
        ("ghc-glut" ,ghc-glut)
        ("freeglut" ,freeglut)
        ("ghc-opengl" ,ghc-opengl)
-       ("ghc-sdl" ,ghc-sdl)
-       ("ghc-sdl-image" ,ghc-sdl-image)
-       ("ghc-sdl-mixer" ,ghc-sdl-mixer)))
+       ("ghc-sdl2" ,ghc-sdl2)
+       ("ghc-sdl2-image" ,ghc-sdl2-image)
+       ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
     (home-page "http://www.bysusanlin.com/raincat/")
     (synopsis "Puzzle game with a cat in lead role")
     (description "Project Raincat is a game developed by Carnegie Mellon
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index ae6ba024e0..4481e21ddf 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -24,8 +24,10 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages geo)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system python)
   #:use-module (guix build-system scons)
   #:use-module (guix build-system r)
@@ -37,6 +39,8 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages cran)
   #:use-module (gnu packages glib)
@@ -44,6 +48,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -57,7 +62,7 @@
 (define-public geos
   (package
     (name "geos")
-    (version "3.6.2")
+    (version "3.7.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.osgeo.org/geos/geos-"
@@ -65,7 +70,7 @@
                                   ".tar.bz2"))
               (sha256
                (base32
-                "0ak5szby29l9l0vy43dm5z2g92xzdky20q1gc1kah1fnhkgi6nh4"))))
+                "1mrz778m6bd1x9k6sha5kld43kalhq79h2lynlx2jx7xjakl3gsg"))))
     (build-system gnu-build-system)
     (arguments `(#:phases
                  (modify-phases %standard-phases
@@ -760,3 +765,224 @@ location queries to be run in SQL.")
                license:bsd-3 ; files only say "BSD"
                ;; doc
                license:cc-by-sa3.0))))
+
+(define-public tegola
+  (package
+    (name "tegola")
+    (version "0.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                     "https://github.com/go-spatial/tegola/archive/v"
+                     version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
+       #:unpack-path "github.com/go-spatial"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-version
+           (lambda _
+             (with-directory-excursion
+               (string-append "src/github.com/go-spatial/tegola-" ,version)
+               (substitute* '("cmd/tegola/cmd/root.go"
+                              "cmd/tegola_lambda/main.go")
+                 (("version not set") ,version)))
+             #t))
+         (add-before 'build 'rename-import
+           (lambda _
+             (rename-file (string-append "src/github.com/go-spatial/tegola-" ,version)
+                          "src/github.com/go-spatial/tegola")
+             #t)))))
+    (home-page "http://tegola.io")
+    (synopsis "Vector tile server for maps")
+    (description "Tegola is a free vector tile server written in Go.  Tegola
+takes geospatial data and slices it into vector tiles that can be efficiently
+delivered to any client.")
+    (license (list
+               license:expat
+               ;; Some packages in vendor have other licenses
+               license:asl2.0
+               license:bsd-2
+               license:bsd-3
+               license:wtfpl2))))
+
+(define-public imposm3
+  (package
+    (name "imposm3")
+    (version "0.6.0-alpha.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
+                            version ".tar.gz"))
+    (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
+       #:unpack-path "github.com/omniscale"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'rename-import
+           (lambda _
+             (rename-file (string-append "src/github.com/omniscale/imposm3-" ,version)
+                          "src/github.com/omniscale/imposm3")
+             #t))
+         (add-before 'build 'set-version
+           (lambda _
+             (substitute* "src/github.com/omniscale/imposm3/version.go"
+               (("0.0.0-dev") ,version))
+             #t)))))
+    (inputs
+     `(("geos" ,geos)
+       ("leveldb" ,leveldb)))
+    (home-page "https://imposm.org/")
+    (synopsis "OpenStreetMap importer for PostGIS")
+    (description "Imposm is an importer for OpenStreetMap data.  It reads PBF
+files and imports the data into PostgreSQL/PostGIS databases.  It is designed
+to create databases that are optimized for rendering/tile/map-services.")
+    (license (list
+               license:asl2.0
+               ;; Some dependencies in vendor have different licenses
+               license:expat
+               license:bsd-2
+               license:bsd-3))))
+
+(define-public protozero
+  (package
+    (name "protozero")
+    (version "1.6.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/mapbox/protozero/archive/v"
+                            version ".tar.gz"))
+    (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1xaj4phz1r7xn0vgdfvfkz8b0bizgb6mavjky1zqcvdmbwgwgly5"))))
+    (build-system cmake-build-system)
+    (home-page "https://github.com/mapbox/protozero")
+    (synopsis "Minimalistic protocol buffer decoder and encoder in C++")
+    (description "Protozero is a minimalistic protocol buffer decored and
+encoder in C++.  The developer using protozero has to manually translate the
+@file{.proto} description into code.")
+    (license (list
+               license:asl2.0; for folly
+               license:bsd-2))))
+
+(define-public libosmium
+  (package
+    (name "libosmium")
+    (version "2.14.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/osmcode/libosmium/archive/v"
+                version ".tar.gz"))
+    (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0d9b46qiw7zkw1h9lygjdwqxnbhm3c7v8kydzw9f9f778cyagc94"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("boost" ,boost)
+       ("expat" ,expat)
+       ("gdal" ,gdal)
+       ("geos" ,geos)
+       ("proj.4" ,proj.4)
+       ("protozero" ,protozero)
+       ("sparsehash" ,sparsehash)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("doxygen" ,doxygen)))
+    (home-page "https://osmcode.org/libosmium/")
+    (synopsis "C++ library for working with OpenStreetMap data")
+    (description "Libosmium is a fast and flexible C++ library for working with
+OpenStreetMap data.")
+    (license license:boost1.0)))
+
+(define-public osm2pgsql
+  (package
+    (name "osm2pgsql")
+    (version "0.96.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/openstreetmap/osm2pgsql/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "08y7776r4l9v9177a4q6cfdri0lpirky96m6g699hwl7v1vhw0mn"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (delete-file-recursively "contrib/protozero")
+                  (delete-file-recursively "contrib/libosmium")
+                  #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f; tests fail because we need to setup a database
+       #:configure-flags
+       (list (string-append "-DOSMIUM_INCLUDE_DIR="
+                            (assoc-ref %build-inputs "libosmium")
+                            "/include")
+             (string-append "-DPROTOZERO_INCLUDE_DIR="
+                            (assoc-ref %build-inputs "protozero")
+                            "/include"))))
+    (inputs
+     `(("boost" ,boost)
+       ("expat" ,expat)
+       ("libosmium" ,libosmium)
+       ("lua" ,lua)
+       ("postgresql" ,postgresql)
+       ("proj.4" ,proj.4)
+       ("protozero" ,protozero)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("python2-psycopg2" ,python2-psycopg2)))
+    (home-page "https://github.com/openstreetmap/osm2pgsql")
+    (synopsis "OSM data importer to postgresql")
+    (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
+PostgreSQL / PostGIS database suitable for applications like rendering into a
+map, geocoding with Nominatim, or general analysis.")
+    (license license:gpl2+)))
+
+(define-public tippecanoe
+  (package
+    (name "tippecanoe")
+    (version "1.31.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mapbox/tippecanoe/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1057na1dkgjaryr7jr15lqkxpam111d3l5zdpdkqzzzpxmdjxqcf"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases (delete 'configure))
+       #:test-target "test"
+       #:make-flags
+       (list "CC=gcc"
+             (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (inputs
+     `(("perl" ,perl)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+    (home-page "https://github.com/mapbox/tippecanoe")
+    (synopsis "Vector tile server for maps")
+    (description "Tippecanoe creates scale-independent view of data, so that
+the texture and density of features is visible at every zoom level, instead of
+dropping features at lower levels.")
+    (license license:bsd-2)))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 86989f9dc9..bdf4dfe711 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4096,15 +4096,15 @@ work and the interface is well tested.")
 (define-public eolie
   (package
     (name "eolie")
-    (version "0.9.37")
+    (version "0.9.38")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://gitlab.gnome.org/World/eolie/"
-                                  "uploads/4341cb428b7a45670308ee3fb3fa07dd/"
+                                  "uploads/9814c06a1bc83ea09c3da8719a9ed11b/"
                                   "eolie-" version ".tar.xz"))
               (sha256
                (base32
-                "126m0nwwy3lqv7z8aj9hiwangih03b1nlkg3xja9p7wbf7zcvp2n"))))
+                "10vrh91rapgfmqwc6jkcybpmlvn4q0y8bnklw3rddzigf9kvqsff"))))
     (build-system meson-build-system)
     (arguments
      `(#:glib-or-gtk? #t
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 653cee93d5..d2110f3290 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -36,6 +36,7 @@
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cargo)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages databases)
@@ -62,6 +63,7 @@
   #:use-module (gnu packages rust)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages readline))
 
@@ -495,12 +497,28 @@ security standards.")
         "0lqx7g79x15941rhjr3qsfwsny6vzc7d7abdmvjy6jjbqkqlc1zl"))
       (patches
        (list
-        (search-patch "icecat-avoid-bundled-libraries.patch")
-        ;; FIXME (search-patch "icecat-use-system-harfbuzz.patch")
-        ;; FIXME (search-patch "icecat-use-system-graphite2.patch")
+        (search-patch  "icecat-avoid-bundled-libraries.patch")
+        (search-patch  "icecat-use-system-graphite2+harfbuzz.patch")
+        (search-patch  "icecat-use-system-media-libs.patch")
         (mozilla-patch "icecat-CVE-2018-12385.patch"      "80a4a7ef2813" "1vgcbimpnfjqj934v0cryq1g13xac3wfmd4jyhcb5s60x8xyssf5")
         (search-patch  "icecat-CVE-2018-12383.patch")
-        (mozilla-patch "icecat-bug-1489744.patch"         "6546ee839d30" "11mhvj77r789b428bfxqq5wdx8yr7lbrdjzr8qjj6fw197pldn51")))
+        (mozilla-patch "icecat-bug-1489744.patch"         "6546ee839d30" "11mhvj77r789b428bfxqq5wdx8yr7lbrdjzr8qjj6fw197pldn51")
+        (mozilla-patch "icecat-CVE-2018-12386.patch"      "4808fcb2e6ca" "05sc881l7sh8bag8whd2ggdn198lskqcxq8f41scfpqscw6xs5d5")
+        (mozilla-patch "icecat-CVE-2018-12387.patch"      "b8f5c37486e1" "0lvmbh126m695kgdbasy1y5xh9n1j08cwdhn071mgvj6yn8cns5z")
+        (mozilla-patch "icecat-bug-1464751.patch"         "d5d00faf0465" "1mj7dbb06brwrk0mvap0z4lfl2hwz1cj6dwjvdrisxm046pdw98i")
+        (mozilla-patch "icecat-bug-1472538.patch"         "11462f2b98f2" "1nxgh0plzilylx8r73r7d74pv66qwjqxmd7nqii33p0snl2jjfzs")
+        (mozilla-patch "icecat-bug-1478685.patch"         "098585dc86fc" "1b0x4qdh6isvffmibvc8ad8z62m3iky9q6jq0z6gyvn8q252cqal")
+        (mozilla-patch "icecat-bug-1486080.patch"         "3f8d57d936ea" "0pz2c18wcgj44v0j8my9xbm90m4bsjcvzmavj569fi8bh6s6zz8p")
+        (mozilla-patch "icecat-bug-1423278.patch"         "878ceaee5634" "0i47s5nvrx9vqbnj6s9y9f4ffww20p8nviqa6frg676y1188xlyl")
+        (mozilla-patch "icecat-bug-1442010.patch"         "87be1b98ec9a" "15f4l18c7hz9aqn89gg3dwmdidfwgn10dywgpzydm8mps45amx7j")
+        (mozilla-patch "icecat-bug-1484559.patch"         "99e58b5307ce" "02fdgbliwzi2r2376wg6k1rky1isfka0smac4ii2cll01jhpfrn6")
+        (mozilla-patch "icecat-bug-1487098.patch"         "f25ce451a492" "18nzg39iyxza1686180qk9cc88l5j2hf1h35d62lrqmdgd9vcj33")
+        (mozilla-patch "icecat-bug-1484905.patch"         "35c26bc231df" "0qh8d4z6y03h5xh7djci26a01l6zq667lg2k11f6zzg7z2j0h67x")
+        (mozilla-patch "icecat-bug-1488061.patch"         "050d0cfa8e3d" "05ql798ynbyz5pvyri4b95j4ixmgnny3zl7sd2ckfrrbm9mxh627")
+        (mozilla-patch "icecat-bug-1434963-pt1.patch"     "1e6dad87efed" "1v00a6cmgswjk54041jyv1ib129fxshpzwk6mn6lr0v5hylk3bx9")
+        (mozilla-patch "icecat-bug-1434963-pt2.patch"     "6558c46df9ea" "0vdy9dm9w5k1flhcfxwvvff0aa415b5mgmmq5r37i83686768xfb")
+        (mozilla-patch "icecat-bug-1434963-pt3.patch"     "686fcfa8abd6" "0ihqr11aq4b0y7mx7bwn8yzn25mv3k2gdphm951mj1g85qg35ann")
+        (mozilla-patch "icecat-bug-1491132.patch"         "14120e0c74d6" "188c5fbhqqhmlk88p70l6d97skh7xy4jhqdby1ri3h9ix967515j")))
       (modules '((guix build utils)))
       (snippet
        '(begin
@@ -517,26 +535,37 @@ security standards.")
                       ;; FIXME: A script from the bundled nspr is used.
                       ;;"nsprpub"
                       ;;
-                      ;; TODO: Use system media libraries.  Waiting for:
+                      ;; FIXME: With the update to IceCat 60, using system NSS
+                      ;;        broke certificate validation.  See
+                      ;;        <https://bugs.gnu.org/32833>.  For now, we use
+                      ;;        the bundled NSPR and NSS.  TODO: Investigate,
+                      ;;        and try to unbundle these libraries again.
+                      ;; UNBUNDLE-ME! "security/nss"
+                      ;;
+                      ;; TODO: Use more system media libraries.  See:
                       ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>
-                      ;;   * libogg
-                      ;;   * libtheora
-                      ;;   * libvorbis
-                      ;;   * libtremor (not yet in guix)
+                      ;;   * libtheora: esr60 wants v1.2, not yet released.
+                      ;;   * soundtouch: avoiding the bundled library would
+                      ;;     result in some loss of functionality.  There's
+                      ;;     also an issue with exception handling
+                      ;;     configuration.  It seems that this is needed in
+                      ;;     some moz.build:
+                      ;;       DEFINES['ST_NO_EXCEPTION_HANDLING'] = 1
                       ;;   * libopus
                       ;;   * speex
-                      ;;   * soundtouch (not yet in guix)
                       ;;
                       "modules/freetype2"
                       "modules/zlib"
                       "modules/libbz2"
-                      ;; UNBUNDLE-ME "ipc/chromium/src/third_party/libevent"
+                      "ipc/chromium/src/third_party/libevent"
                       "media/libjpeg"
                       "media/libvpx"
-                      "security/nss"
-                      ;; UNBUNDLE-ME "gfx/cairo"
-                      ;; UNBUNDLE-ME "gfx/harfbuzz"
-                      ;; UNBUNDLE-ME "gfx/graphite2"
+                      "media/libogg"
+                      "media/libvorbis"
+                      ;; "media/libtheora" ; wants theora-1.2, not yet released
+                      "media/libtremor"
+                      "gfx/harfbuzz"
+                      "gfx/graphite2"
                       "js/src/ctypes/libffi"
                       "db/sqlite3"))
           ;; Delete .pyc files, typically present in icecat source tarballs
@@ -550,23 +579,25 @@ security standards.")
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("bzip2" ,bzip2)
-       ;; UNBUNDLE-ME ("cairo" ,cairo)
        ("cups" ,cups)
        ("dbus-glib" ,dbus-glib)
        ("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("gtk+" ,gtk+)
        ("gtk+-2" ,gtk+-2)
-       ;; UNBUNDLE-ME ("graphite2" ,graphite2)
+       ("graphite2" ,graphite2)
        ("pango" ,pango)
        ("freetype" ,freetype)
-       ;; UNBUNDLE-ME ("harfbuzz" ,harfbuzz)
+       ("harfbuzz" ,harfbuzz)
        ("hunspell" ,hunspell)
        ("libcanberra" ,libcanberra)
        ("libgnome" ,libgnome)
        ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libogg" ,libogg)
+       ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released
+       ("libvorbis" ,libvorbis)
        ("libxft" ,libxft)
-       ;; UNBUNDLE-ME ("libevent" ,libevent-2.0)
+       ("libevent" ,libevent)
        ("libxinerama" ,libxinerama)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libxcomposite" ,libxcomposite)
@@ -579,8 +610,10 @@ security standards.")
        ("pulseaudio" ,pulseaudio)
        ("mesa" ,mesa)
        ("mit-krb5" ,mit-krb5)
-       ("nspr" ,nspr)
-       ("nss" ,nss)
+       ;; See <https://bugs.gnu.org/32833>
+       ;;   and related comments in the 'snippet' above.
+       ;; UNBUNDLE-ME! ("nspr" ,nspr)
+       ;; UNBUNDLE-ME! ("nss" ,nss)
        ("sqlite" ,sqlite)
        ("startup-notification" ,startup-notification)
        ("unzip" ,unzip)
@@ -638,15 +671,21 @@ security standards.")
                            "--with-system-zlib"
                            "--with-system-bz2"
                            "--with-system-jpeg"        ; must be libjpeg-turbo
-                           ;; UNBUNDLE-ME "--with-system-libevent"
+                           "--with-system-libevent"
+                           "--with-system-ogg"
+                           "--with-system-vorbis"
+                           ;; "--with-system-theora" ; wants theora-1.2, not yet released
                            "--with-system-libvpx"
                            "--with-system-icu"
-                           "--with-system-nspr"
-                           "--with-system-nss"
-                           ;; UNBUNDLE-ME "--with-system-harfbuzz"
-                           ;; UNBUNDLE-ME "--with-system-graphite2"
+                           
+                           ;; See <https://bugs.gnu.org/32833>
+                           ;;   and related comments in the 'snippet' above.
+                           ;; UNBUNDLE-ME! "--with-system-nspr"
+                           ;; UNBUNDLE-ME! "--with-system-nss"
+                           
+                           "--with-system-harfbuzz"
+                           "--with-system-graphite2"
                            "--enable-system-pixman"
-                           ;; UNBUNDLE-ME "--enable-system-cairo"
                            "--enable-system-ffi"
                            "--enable-system-hunspell"
                            "--enable-system-sqlite"
@@ -696,8 +735,11 @@ security standards.")
     'avcodec', 'avutil', 'pulse' ]\n\n"
                               all)))
             #t))
+         (replace 'bootstrap
+           (lambda _
+             (invoke "sh" "-c" "autoconf old-configure.in > old-configure")))
          (add-after 'patch-source-shebangs 'patch-cargo-checksums
-           (lambda* _
+           (lambda _
              (use-modules (guix build cargo-build-system))
              (let ((null-file "/dev/null")
                    (null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index bba03e77f2..7a049e39e1 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -504,7 +504,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
   (package
     (inherit go-1.10)
     (name "go")
-    (version "1.11")
+    (version "1.11.1")
     (source
      (origin
        (method url-fetch)
@@ -512,7 +512,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "1ysj04jzds6xa8kdflkdsgyv3mg9fdn90zdf78g4g6p4bwpy3hdg"))))
+         "05qivf2f59pv4bfrmdr4m0xvswkmvvl9c5a2h5dy45g2k8b8r3sm"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.10)
        ((#:phases phases)
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 245ee8f956..cb314719b7 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -224,6 +224,7 @@ lines.")
     (propagated-inputs
      `(("python-decorator" ,python-decorator)
        ("python-nbformat" ,python-nbformat)
+       ("python-pandas" ,python-pandas)
        ("python-pytz" ,python-pytz)
        ("python-requests" ,python-requests)
        ("python-six" ,python-six)))
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index d65eb547ad..ccedec6398 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -774,54 +774,26 @@ application suites.")
 (define-public guile-cairo
   (package
     (name "guile-cairo")
-    (version "1.4.1")
+    (version "1.10.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "http://download.gna.org/guile-cairo/guile-cairo-"
-                    version
-                    ".tar.gz"))
+              (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
+                                  version ".tar.gz"))
               (sha256
                (base32
-                "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
+                "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
+              (modules '((guix build utils)))
+              (snippet
+               (begin
+                 '(begin
+                    ;; Install Scheme files in …/guile/site/X.Y.
+                    (substitute* (find-files "." "^Makefile\\.in$")
+                      (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
+                       (string-append name "dir = " prefix
+                                      "/guile/site/@GUILE_EFFECTIVE_VERSION@"
+                                      suffix)))
+                    #t)))))
     (build-system gnu-build-system)
-    (arguments
-     '(#:modules ((guix build utils)
-                  (guix build gnu-build-system)
-                  (ice-9 popen)
-                  (ice-9 rdelim))
-
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'set-module-directory
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; Install modules under $out/share/guile/site/2.0.
-                      (let ((out (assoc-ref outputs "out"))
-                            (effective
-                             (read-line
-                              (open-pipe* OPEN_READ "guile" "-c"
-                                          "(display (effective-version))"))))
-                        (substitute* "Makefile.in"
-                          (("scmdir = ([[:graph:]]+).*" _ value)
-                           (string-append "scmdir = " value "/" effective "\n")))
-                        (substitute* "cairo/Makefile.in"
-                          (("moduledir = ([[:graph:]]+).*" _ value)
-                           (string-append "moduledir = "
-                                          "$(prefix)/share/guile/site/"
-                                          effective "/cairo\n'")))
-                        #t)))
-                  (add-after 'install 'install-missing-file
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; By default 'vector-types.scm' is not installed, so do
-                      ;; it here.
-                      (let ((out (assoc-ref outputs "out"))
-                            (effective
-                             (read-line
-                              (open-pipe* OPEN_READ "guile" "-c"
-                                          "(display (effective-version))"))))
-                        (install-file "cairo/vector-types.scm"
-                                      (string-append out "/share/guile/site/"
-                                                     effective "/cairo"))
-                        #t))))))
     (inputs
      `(("guile-lib" ,guile-lib)
        ("expat" ,expat)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 39d1ebe681..83cb75d315 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -287,8 +287,8 @@ without requiring the source code to be rewritten.")
 
 (define-public guile-next
   ;; This is the upcoming Guile 3.0, with JIT support.
-  (let ((commit "a74b4a45fab1a78e34954bce5f031e8a9765f827")
-        (revision "0"))
+  (let ((commit "6f3357b0df64c4be17e72079864c09a542f1c779")
+        (revision "1"))
     (package
       (inherit guile-2.2)
       (name "guile-next")
@@ -300,7 +300,7 @@ without requiring the source code to be rewritten.")
                       (commit commit)))
                 (sha256
                  (base32
-                  "0kq6mabv7j4gdlwmpz3iaddv98sc7awkl2358sg8j50sg10yw8nx"))
+                  "1c2xy5cflg0hws48914rz3z8mdmf8w3lblfic0kxnymcmdv9cbhv"))
                 (file-name (git-file-name name version))))
       (native-inputs
        `(("autoconf", autoconf)
@@ -324,7 +324,15 @@ without requiring the source code to be rewritten.")
                (lambda _
                  ;; Remove this test that's bound to fail.
                  (delete-file "test-suite/tests/version.test")
-                 #t)))))))))
+                 #t))))))
+      (native-search-paths
+       (list (search-path-specification
+              (variable "GUILE_LOAD_PATH")
+              (files '("share/guile/site/3.0")))
+             (search-path-specification
+              (variable "GUILE_LOAD_COMPILED_PATH")
+              (files '("lib/guile/3.0/site-ccache"
+                       "share/guile/site/3.0"))))))))
 
 (define (make-guile-readline guile)
   (package
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index f77336e504..52bc3d0527 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -18,6 +18,7 @@
 
 (define-module (gnu packages hardware)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
@@ -35,14 +36,14 @@
 (define-public ddcutil
   (package
     (name "ddcutil")
-    (version "0.9.1")
+    (version "0.9.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.ddcutil.com/tarballs/"
                            name "-" version ".tar.gz"))
        (sha256
-        (base32 "1b4bm3zhk5vnad6fxf0mn8nrlj3fngifl7nzxgxw0n56hlv7ccv0"))))
+        (base32 "0nhi261vf2n3jpi0a0n6659911kxi3lj7a4h7cmv0ip6sbb8rk88"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -74,6 +75,115 @@ calibrated, and restored when the calibration is applied.")
     (license (list license:bsd-3        ; FindDDCUtil.cmake
                    license:gpl2+))))    ; everything else
 
+;; Distinct from memtest86, which is obsolete.
+(define-public memtest86+
+  (package
+    (name "memtest86+")
+    ;; Update the description when/if UEFI support is released.
+    (version "5.01")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.memtest.org/download/5.01/memtest86+-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:system "i686-linux"            ; the result runs outside of any OS
+       #:tests? #f                      ; no way to test this
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (replace 'build
+           ;; The default 'make all' does wonderful things, like scp(1) a file to
+           ;; 192.168.0.12. Build the bootable images and nothing more.
+           (lambda _
+             (invoke "make"
+                     "memtest"          ; ELF executable
+                     "memtest.bin")))   ; DOS/MBR boot sector
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib/memtest86+"))
+                    (doc (string-append out "/share/doc/memtest86+-" ,version)))
+               (for-each
+                (lambda (file)
+                  (install-file file lib))
+                (list "memtest"
+                      "memtest.bin"))
+               (for-each
+                (lambda (file)
+                  (install-file file doc))
+                (list "FAQ"
+                      "README"))
+               #t))))))
+    (native-inputs
+     ;; Newer GCCs fail with a deluge of "multiple definition of `__foo'" errors.
+     `(("gcc" ,gcc-4.9)))
+    (supported-systems (list "i686-linux" "x86_64-linux"))
+    (home-page "https://www.memtest.org/")
+    (synopsis "Thorough real-mode memory tester")
+    (description
+     "Memtest86+ is a thorough, stand-alone memory test for x86 systems.  It
+repeatedly writes different patterns to all memory locations, reads them back
+again, and verifies whether the result is the same as what was written.  This
+can help debug even intermittent and non-deterministic errors.
+
+It runs independently of any operating system, at computer boot-up, so that it
+can scan as much of your RAM as possible for hardware defects.
+
+Memtest86+ cannot currently be used on computers booted with UEFI.")
+    (license license:gpl2)))
+
+(define-public memtester
+  (package
+    (name "memtester")
+    (version "4.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       ;; Even the latest release is available under 'old-versions/'.
+       (uri (string-append "http://pyropus.ca/software/memtester/old-versions/"
+                           "memtester-" version ".tar.gz"))
+       (sha256
+        (base32 "127xymmyzb9r6dxqrwd69v7gf8csv8kv7fjvagbglf3wfgyy5pzr"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           ;; This is a home-brewed configuration system where the cc/ld command
+           ;; lines are stored in one-line files.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (substitute* (list "conf-cc" "conf-ld")
+                 (("^cc") "gcc"))
+               (substitute* "Makefile"
+                 (("(INSTALLPATH.*=).*" _ assignment)
+                  (string-append assignment out)))
+               #t)))
+         (replace 'check
+           ;; There is no test suite. Test some RAM for a single iteration.
+           (lambda _
+             (invoke "./memtester" "64K" "1"))))))
+    (home-page "http://pyropus.ca/software/memtester/")
+    (synopsis "User-space memory subsystem tester")
+    (description
+     "Memtester stress-tests the memory subsystem of your operating system and
+computer.  It repeatedly writes different patterns to all memory locations,
+reads them back again, and verifies whether the result is the same as what was
+written.  This can help debug even intermittent and non-deterministic errors.
+
+Memtester runs entirely in user space.  This means that you don't need to reboot
+to test your memory, but also that it's not possible to test all of the RAM
+installed in the system.
+
+It can also be told to test memory starting at a particular physical address.")
+    (license license:gpl2)))
+
 (define-public msr-tools
   (package
     (name "msr-tools")
diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm
index 31407ca259..0d4501df86 100644
--- a/gnu/packages/haskell-check.scm
+++ b/gnu/packages/haskell-check.scm
@@ -54,7 +54,6 @@
     (inputs
      `(("ghc-generic-deriving" ,ghc-generic-deriving)
        ("ghc-xml" ,ghc-xml)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-stm" ,ghc-stm)
        ("ghc-tagged" ,ghc-tagged)
        ("ghc-tasty" ,ghc-tasty)))
@@ -97,7 +96,7 @@ Haskell test framework.")
 (define-public ghc-tasty-quickcheck
   (package
     (name "ghc-tasty-quickcheck")
-    (version "0.8.4")
+    (version "0.10")
     (source
      (origin
        (method url-fetch)
@@ -106,7 +105,7 @@ Haskell test framework.")
              "tasty-quickcheck-" version ".tar.gz"))
        (sha256
         (base32
-         "15rjxib5jmjq0hzj47x15kgp3awc73va4cy1pmpf7k3hvfv4qprn"))))
+         "0vr6szbbz3s5461i0zr8zpq347zfvidfzv5gf3xwxhm0yk731z8h"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -125,7 +124,7 @@ Haskell test framework.")
 (define-public ghc-tasty-golden
   (package
     (name "ghc-tasty-golden")
-    (version "2.3.1.1")
+    (version "2.3.2")
     (source
      (origin
        (method url-fetch)
@@ -135,12 +134,11 @@ Haskell test framework.")
              ".tar.gz"))
        (sha256
         (base32
-         "0pcf5hsyp5mmbqn7krdm49jxpkjm6rb4j83j28f76h7q55dzm1wy"))))
+         "0k3ibjhjc9vcwzrjnl4rnwvfm8l81q347nb7dgvcib6n5wm3s404"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-temporary" ,ghc-temporary)
        ("ghc-tasty" ,ghc-tasty)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-tagged" ,ghc-tagged)
        ("ghc-async" ,ghc-async)
@@ -183,7 +181,7 @@ timer functions of different operating systems via a unified API.")
 (define-public ghc-tasty
   (package
     (name "ghc-tasty")
-    (version "0.11.0.4")
+    (version "1.1.0.3")
     (source
      (origin
        (method url-fetch)
@@ -193,19 +191,18 @@ timer functions of different operating systems via a unified API.")
              ".tar.gz"))
        (sha256
         (base32
-         "05pxjzgbgjdn7477xry0ssjrnmnsydqiq6nm6ck8n2da1baliqp0"))))
+         "14riid753hjqr6lca1kgxpnvq0wykf0k3qc5jpag42hh8bszav22"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-stm" ,ghc-stm)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-tagged" ,ghc-tagged)
        ("ghc-regex-tdfa" ,ghc-regex-tdfa)
-       ("ghc-regex-tdfa-rc" ,ghc-regex-tdfa-rc)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-unbounded-delays" ,ghc-unbounded-delays)
        ("ghc-async" ,ghc-async)
        ("ghc-ansi-terminal" ,ghc-ansi-terminal)
-       ("ghc-clock-bootstrap" ,ghc-clock-bootstrap)))
+       ("ghc-clock-bootstrap" ,ghc-clock-bootstrap)
+       ("ghc-wcwidth" ,ghc-wcwidth-bootstrap)))
     (home-page "http://documentup.com/feuerbach/tasty")
     (synopsis "Modern and extensible testing framework")
     (description "Tasty is a modern testing framework for Haskell.  It lets
@@ -216,7 +213,7 @@ and any other types of tests into a single test suite.")
 (define-public ghc-tasty-hunit
   (package
     (name "ghc-tasty-hunit")
-    (version "0.9.2")
+    (version "0.10.0.1")
     (source
      (origin
        (method url-fetch)
@@ -226,10 +223,11 @@ and any other types of tests into a single test suite.")
              ".tar.gz"))
        (sha256
         (base32
-         "08qnxaw34wfnzi9irs1jd4d0zczqm3k5ffkd4zwhkz0dflmgq7mf"))))
+         "0j3hgga6c3s8h5snzivb8a75h96207ia2rlbxzj07xbf4zpkp44g"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-tasty" ,ghc-tasty)))
+     `(("ghc-call-stack" ,ghc-call-stack-boot)
+       ("ghc-tasty" ,ghc-tasty)))
     (home-page "http://documentup.com/feuerbach/tasty")
     (synopsis "HUnit support for the Tasty test framework")
     (description "This package provides HUnit support for the Tasty Haskell
@@ -250,7 +248,6 @@ test framework.")
     (build-system haskell-build-system)
     (inputs
      `(("ghc-tasty" ,ghc-tasty)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
        ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "https://github.com/vincenthz/tasty-kat")
@@ -263,7 +260,7 @@ tasty.")
 (define-public ghc-tasty-th
   (package
     (name "ghc-tasty-th")
-    (version "0.1.4")
+    (version "0.1.7")
     (source
      (origin
        (method url-fetch)
@@ -272,10 +269,12 @@ tasty.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0dff9si8i1qp0s7p4hlk0l29vq7wxfglw6mvlgmld43h7rllv88q"))))
+         "0b2ivrw2257m4cy4rjnkwqlarh83j1y3zywnmaqqqbvy667sqnj3"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-tasty" ,ghc-tasty)))
+     `(("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "https://github.com/bennofs/tasty-th")
     (synopsis "Automatically generate tasty TestTrees")
     (description
@@ -288,7 +287,7 @@ test-framework.")
 (define-public ghc-tasty-rerun
   (package
     (name "ghc-tasty-rerun")
-    (version "1.1.8")
+    (version "1.1.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -296,11 +295,10 @@ test-framework.")
                     "tasty-rerun-" version ".tar.gz"))
               (sha256
                (base32
-                "0yg8cicfn3qaazvp4rbanzy3dyk95k3y1kkd4bykvkl9v4076788"))))
+                "05lp4zy6lwd916snq6hs43848n62j9vdfl3s8sfivqydrax0vvd8"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+     `(("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-reducers" ,ghc-reducers)
        ("ghc-split" ,ghc-split)
        ("ghc-stm" ,ghc-stm)
@@ -317,7 +315,7 @@ been added since previous test run.")
 (define-public ghc-tasty-expected-failure
   (package
     (name "ghc-tasty-expected-failure")
-    (version "0.11.0.4")
+    (version "0.11.1.1")
     (source
      (origin
        (method url-fetch)
@@ -326,7 +324,7 @@ been added since previous test run.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0r555f18d2gj96pjyc13chn1nxaxl81am4xgip3mvvjhw8s5mva1"))))
+         "1i2s809m644b7hgiblqay9j364r3fjj1rwbrahsn1pgr5q6mr6ji"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-tagged" ,ghc-tagged)
@@ -356,7 +354,8 @@ development.")
          "1bh1pzz5fdcqvzdcirqxna6fnjms02min5md716299g5niz46w55"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=base-compat")))
+     `(#:cabal-revision
+       ("1" "1sngfq3v71bvgjsl8cj5kh65m3fziwy8dkvwjzs0kxfrzr87faly")))
     (inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-base-compat" ,ghc-base-compat)
@@ -426,7 +425,7 @@ use HUnit assertions as QuickCheck properties.")
 (define-public ghc-quickcheck
   (package
     (name "ghc-quickcheck")
-    (version "2.10.1")
+    (version "2.11.3")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -437,11 +436,10 @@ use HUnit assertions as QuickCheck properties.")
              ".tar.gz"))
        (sha256
         (base32
-         "1rfmns3lj3hl93k1jws85ajkkw7z9ll8cw292n9m7zald1w5dfqx"))))
+         "0xhqk35fkzlbjcqbabg6962jkv8d688nzmz7ng4bm84x2d95d328"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:tests? #f  ; FIXME: currently missing libraries used for tests.
-       #:configure-flags '("-f base4")))
+     `(#:tests? #f))  ; FIXME: currently missing libraries used for tests.
     (inputs
      `(("ghc-random" ,ghc-random)
        ("ghc-tf-random" ,ghc-tf-random)))
@@ -455,37 +453,10 @@ hold in a large number of randomly generated cases.  Specifications are
 expressed in Haskell, using combinators defined in the QuickCheck library.")
     (license license:bsd-3)))
 
-(define-public ghc-quickcheck-2.9
-  (package
-    (inherit ghc-quickcheck)
-    (name "ghc-quickcheck")
-    (version "2.9.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/QuickCheck-2.9.2/QuickCheck-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "119np67qvx8hyp9vkg4gr2wv3lj3j6ay2vl4hxspkg43ymb1cp0m"))))))
-
-(define-public ghc-quickcheck-latest
-  (package (inherit ghc-quickcheck)
-    (version "2.11.3")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/QuickCheck/QuickCheck-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "0xhqk35fkzlbjcqbabg6962jkv8d688nzmz7ng4bm84x2d95d328"))))))
-
 (define-public ghc-test-framework
   (package
     (name "ghc-test-framework")
-    (version "0.8.1.1")
+    (version "0.8.2.0")
     (source
      (origin
        (method url-fetch)
@@ -493,10 +464,17 @@ expressed in Haskell, using combinators defined in the QuickCheck library.")
                            "test-framework-" version ".tar.gz"))
        (sha256
         (base32
-         "0wxjgdvb1c4ykazw774zlx86550848wbsvgjgcrdzcgbb9m650vq"))))
+         "1hhacrzam6b8f10hyldmjw8pb7frdxh04rfg3farxcxwbnhwgbpm"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=time")))
+     `(#:tests? #f  ; FIXME: Tests do not build.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "test-framework.cabal"
+               (("QuickCheck     >= 2\\.3 && < 2\\.10")
+                "QuickCheck     >= 2.3 && < 2.12")))))))
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)
        ("ghc-quickcheck" ,ghc-quickcheck)))
@@ -508,7 +486,8 @@ expressed in Haskell, using combinators defined in the QuickCheck library.")
        ("ghc-random" ,ghc-random)
        ("ghc-regex-posix" ,ghc-regex-posix)
        ("ghc-xml" ,ghc-xml)
-       ("ghc-libxml" ,ghc-libxml)))
+       ("ghc-libxml" ,ghc-libxml)
+       ("ghc-semigroups" ,ghc-semigroups-bootstrap)))
     (home-page "https://batterseapower.github.io/test-framework/")
     (synopsis "Framework for running and organising tests")
     (description
@@ -533,9 +512,9 @@ reporting and test statistics output.")
         (base32
          "1y0b6vg8nfm43v90lxxcydhi6qlxhfy4vpxbzm5ic2w55bh8xjwm"))))
     (build-system haskell-build-system)
-    ;; The official revision of the cabal file allows for HUnit lower than 1.7
     (arguments
-     `(#:configure-flags (list "--allow-newer=HUnit")))
+     `(#:cabal-revision
+       ("3" "0i9mlalv7cl1iq43ld5myrnpszq5rxmd79hk495dcb08rglhgl3z")))
     (inputs
      `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
        ("ghc-hunit" ,ghc-hunit)
@@ -560,6 +539,9 @@ reporting and test statistics output.")
         (base32
          "0vj834337r6jzr3258cv68ly2sv5999mklpsrfngyk51kywsyqyp"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "147ngmfdkskyg7mwsp5w73a4dbx3rp5s38bci3z03kn1m093lxff")))
     (inputs
      `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
        ("ghc-quickcheck" ,ghc-quickcheck)
@@ -827,7 +809,6 @@ minimal dependencies.")
          "19wqignlq90qwpam01hnmmrxaxh5lkax9l1l6rlbi4a07nvp1dnz"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-quickcheck" ,ghc-quickcheck)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-hunit" ,ghc-hunit)
               ("ghc-test-framework" ,ghc-test-framework)
               ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
diff --git a/gnu/packages/haskell-crypto.scm b/gnu/packages/haskell-crypto.scm
index b0be30cb6b..9bdcdb2f9e 100644
--- a/gnu/packages/haskell-crypto.scm
+++ b/gnu/packages/haskell-crypto.scm
@@ -70,8 +70,7 @@ format.")
     (inputs
      `(("ghc-hourglass" ,ghc-hourglass)
        ("ghc-asn1-types" ,ghc-asn1-types)
-       ("ghc-text" ,ghc-text)
-       ("ghc-mtl" ,ghc-mtl)))
+       ("ghc-text" ,ghc-text)))
     (native-inputs
      `(("ghc-tasty" ,ghc-tasty)
        ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
@@ -108,7 +107,7 @@ when ASN1 pattern matching is not convenient.")
 (define-public ghc-crypto-api
   (package
     (name "ghc-crypto-api")
-    (version "0.13.2")
+    (version "0.13.3")
     (source
      (origin
        (method url-fetch)
@@ -117,7 +116,7 @@ when ASN1 pattern matching is not convenient.")
                            "crypto-api-" version ".tar.gz"))
        (sha256
         (base32
-         "1vc27qcgbg7hf50rkqhlrs58zn1888ilh4b6wrrm07bnm48xacak"))))
+         "19bsmkqkpnvh01b77pmyarx00fic15j4hvg4pzscrj4prskrx2i9"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-cereal" ,ghc-cereal)
               ("ghc-tagged" ,ghc-tagged)
@@ -211,7 +210,9 @@ that hides the C implementation.")
          "1y8q7s2bn4gdknw1wjikdnar2b5pgz3nv3220lxrlgpsf23x82vi"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
+     `(#:cabal-revision
+       ("2" "0vyb9cfvpfxpslxvvhd48gw37i9g8ry5x63xwxd9q7xfiqhs7p3a")
+       #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
     (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
                      ("ghc-puremd5" ,ghc-puremd5)
                      ("ghc-tasty" ,ghc-tasty)
@@ -237,7 +238,9 @@ that hides the C implementation.")
          "1aqdxdhxhl9jldh951djpwxx8z7gzaqspxl7iwpl84i5ahrsyy9w"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:tests? #f)) ; tests require old version of ghc-hunit (0.9)
+     `(#:cabal-revision
+       ("2" "0xas0nbq9bfdzlj6k565ibizv1cqvzfzsdj6q9pdiiwyxqblqc3m")
+       #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
     (native-inputs `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
                      ("ghc-sha" ,ghc-sha)
                      ("ghc-tasty" ,ghc-tasty)
@@ -254,6 +257,42 @@ The implementation is made in C with a haskell FFI wrapper that hides
 the C implementation.")
     (license license:bsd-3)))
 
+(define-public ghc-cryptohash-sha256
+  (package
+    (name "ghc-cryptohash-sha256")
+    (version "0.11.101.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "cryptohash-sha256-" version "/"
+                           "cryptohash-sha256-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1p85vajcgw9hmq8zsz9krzx0vxh7aggwbg5w9ws8w97avcsn8xaj"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "19birnmwga1yh82l4jqc3fygqkqcf5y8dlldnxfswngkzc3rvwp3")
+       #:tests? #f)) ; tests require old version of ghc-hunit (0.9)
+    (inputs
+     `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
+    (native-inputs
+     `(("ghc-sha" ,ghc-sha)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-hunit" ,ghc-hunit)))
+    (home-page "https://github.com/hvr/cryptohash-sha1")
+    (synopsis "SHA-256 implementation for Haskell")
+    (description "This Haskell package provides an incremental and
+one-pass, pure API to the @uref{https://en.wikipedia.org/wiki/SHA-2,
+SHA-256 cryptographic hash algorithm}, with performance close to the
+fastest implementations available in other languages.
+
+The implementation is made in C with a haskell FFI wrapper that hides
+the C implementation.")
+    (license license:bsd-3)))
+
 (define-public ghc-cryptonite
   (package
     (name "ghc-cryptonite")
@@ -315,7 +354,7 @@ are implemented as FFI bindings to efficient code from zlib.")
 (define-public ghc-entropy
   (package
     (name "ghc-entropy")
-    (version "0.3.8")
+    (version "0.4.1.1")
     (source
      (origin
        (method url-fetch)
@@ -324,7 +363,7 @@ are implemented as FFI bindings to efficient code from zlib.")
                            "entropy-" version ".tar.gz"))
        (sha256
         (base32
-         "1l3lfigqvdlmxkz1wl7zdkmc0i2r5p6z4xzhiw8xdsbsw7aljfkl"))))
+         "1ahz5g148l6sax3dy505na2513i99c7bxix68jja5kbx4f271zcf"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/TomMD/entropy")
     (synopsis "Provides platform independent entropy source for Haskell")
@@ -335,18 +374,18 @@ to obtain cryptographically strong entropy.")
 (define-public ghc-pem
   (package
     (name "ghc-pem")
-    (version "0.2.2")
+    (version "0.2.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "pem/pem-" version ".tar.gz"))
               (sha256
                (base32
-                "162sk5sg22w21wqz5qv8kx6ibxp99v5p20g3nknhm1kddk3hha1p"))))
+                "1m7qjsxrd8m88cvkqmr8kscril500j2a9y0iynvksjyjkhdlq33p"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-base64-bytestring" ,ghc-base64-bytestring)))
+     `(("ghc-basement" ,ghc-basement)
+       ("ghc-memory" ,ghc-memory)))
     (native-inputs
      `(("ghc-test-framework" ,ghc-test-framework)
        ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
@@ -393,14 +432,14 @@ interface.")
 (define-public ghc-sha
   (package
     (name "ghc-sha")
-    (version "1.6.4.2")
+    (version "1.6.4.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "SHA/SHA-" version ".tar.gz"))
               (sha256
                (base32
-                "134ajm87fm4lpsw86m9q8apv20dw4bpk46raa389zr6bcdpifw64"))))
+                "0i4b2wjisivdy72synal711ywhx05mfqfba5n65rk8qidggm1nbb"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -420,18 +459,17 @@ libraries, like OpenSSL.")
 (define-public ghc-x509
   (package
     (name "ghc-x509")
-    (version "1.6.4")
+    (version "1.7.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "x509/x509-" version ".tar.gz"))
               (sha256
                (base32
-                "0hixx76wpb4qxida017ka5zr6lrsycahrqyw8z90q9mxvndpy3my"))))
+                "0mkk29g32fs70bqkikg83v45h9jig9c8aail3mrdqwxpkfa0yx21"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-memory" ,ghc-memory)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-hourglass" ,ghc-hourglass)
        ("ghc-pem" ,ghc-pem)
        ("ghc-asn1-types" ,ghc-asn1-types)
@@ -450,7 +488,7 @@ libraries, like OpenSSL.")
 (define-public ghc-x509-store
   (package
     (name "ghc-x509-store")
-    (version "1.6.2")
+    (version "1.6.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -458,15 +496,17 @@ libraries, like OpenSSL.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0yw09nwkvr324qz4sc27c0p28bz2h6gns6lkaz9mz92mgqf2dza9"))))
+                "0dbndqmnmyixxc7308nyq3zlkhz9dff4rbcw2a49c77rbicny9va"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-pem" ,ghc-pem)
+     `(("ghc-pem" ,ghc-pem)
        ("ghc-asn1-types" ,ghc-asn1-types)
        ("ghc-asn1-encoding" ,ghc-asn1-encoding)
        ("ghc-cryptonite" ,ghc-cryptonite)
        ("ghc-x509" ,ghc-x509)))
+    (native-inputs
+     `(("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "https://github.com/vincenthz/hs-certificate")
     (synopsis "X.509 collection accessing and storing methods")
     (description
@@ -477,7 +517,7 @@ collections, certificates, revocation lists, and exception lists.")
 (define-public ghc-x509-validation
   (package
     (name "ghc-x509-validation")
-    (version "1.6.5")
+    (version "1.6.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -485,12 +525,11 @@ collections, certificates, revocation lists, and exception lists.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "190w1sr3w6w49v3yvqz4grb0v09ym4gll3n8bxwijvbvcybk3xyi"))))
+                "1ms51scawldgyfcim5a2qlgyn3rnrclyh205d6djaa1569vrs73n"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-memory" ,ghc-memory)
        ("ghc-byteable" ,ghc-byteable)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-hourglass" ,ghc-hourglass)
        ("ghc-data-default-class" ,ghc-data-default-class)
        ("ghc-pem" ,ghc-pem)
@@ -499,6 +538,9 @@ collections, certificates, revocation lists, and exception lists.")
        ("ghc-x509" ,ghc-x509)
        ("ghc-x509-store" ,ghc-x509-store)
        ("ghc-cryptonite" ,ghc-cryptonite)))
+    (native-inputs
+     `(("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "https://github.com/vincenthz/hs-certificate")
     (synopsis "X.509 certificate and revocation list validation")
     (description
@@ -509,7 +551,7 @@ list validation.")
 (define-public ghc-x509-system
   (package
     (name "ghc-x509-system")
-    (version "1.6.4")
+    (version "1.6.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -517,11 +559,10 @@ list validation.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0k7zc0xp7r6kqmi39rpiicvq78xb0pr2cq6q5s3kmmsshllg13nr"))))
+                "06a4m9c7vlr9nhp9gmqbb46arf0yj1dkdm4nip03hzy67spdmp20"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-pem" ,ghc-pem)
+     `(("ghc-pem" ,ghc-pem)
        ("ghc-x509" ,ghc-x509)
        ("ghc-x509-store" ,ghc-x509-store)))
     (home-page "https://github.com/vincenthz/hs-certificate")
@@ -660,3 +701,33 @@ percent.
 @item Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
 @end itemize")
     (license license:bsd-3)))
+
+(define-public ghc-ed25519
+  (package
+    (name "ghc-ed25519")
+    (version "0.0.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/ed25519/ed25519-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0v8msqvgzimhs7p5ri25hrb1ni2wvisl5rmdxy89fc59py79b9fq"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "1cq6h3jqkb1kvd9fjfhsllg5gq78sdiyf2gy9862xhlbv6wil19f")
+       ;; We omit these test suites because they require old versions of
+       ;; packages and packages we do not have.
+       #:configure-flags
+       '("--flags=-test-hlint -test-doctests -test-properties")))
+    (home-page "http://thoughtpolice.github.com/hs-ed25519")
+    (synopsis "Ed25519 cryptographic signatures")
+    (description "This package provides a simple, fast, self-contained
+copy of the Ed25519 public-key signature system with a clean interface.
+It also includes support for detached signatures, and thorough
+documentation on the design and implementation, including usage
+guidelines.")
+    (license license:expat)))
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index a043ffcc0d..eaa7e6a9ec 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -23,6 +23,7 @@
 
 (define-module (gnu packages haskell-web)
   #:use-module (gnu packages)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages haskell)
   #:use-module (gnu packages haskell-check)
   #:use-module (gnu packages haskell-crypto)
@@ -64,7 +65,7 @@ for screen-scraping.")
 (define-public ghc-cookie
   (package
     (name "ghc-cookie")
-    (version "0.4.3")
+    (version "0.4.4")
     (source
      (origin
        (method url-fetch)
@@ -74,7 +75,7 @@ for screen-scraping.")
              ".tar.gz"))
        (sha256
         (base32
-         "0qpdydhb9gw590ffabqg70x7xvjpg8l74idqnrfbhv5yrr7hryzv"))))
+         "1qy09i0jh2z9i9avy2khf8a8afq4fqgnv0fyrszgfg4kmq2fsi9j"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-old-locale" ,ghc-old-locale)
@@ -171,7 +172,6 @@ both client and server code).")
        ("ghc-old-time" ,ghc-old-time)
        ("ghc-parsec" ,ghc-parsec)
        ("ghc-puremd5" ,ghc-puremd5)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-network" ,ghc-network)
        ("ghc-network-uri" ,ghc-network-uri)
        ("ghc-split" ,ghc-split)))
@@ -230,7 +230,7 @@ for more user-friendly packages.")
 (define-public ghc-http-client-tls
   (package
     (name "ghc-http-client-tls")
-    (version "0.3.5.1")
+    (version "0.3.5.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -238,7 +238,7 @@ for more user-friendly packages.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0n4mi8z77qaggfyq17z79cl304nf1f4h6gag60v4wjwghvmj7yn1"))))
+                "0qj3pcpgbsfsc4m52dz35khhl4hf1i0nmcpa445z82d9567vy6j7"))))
     (build-system haskell-build-system)
     ;; Tests require Internet access
     (arguments `(#:tests? #f))
@@ -262,7 +262,7 @@ libraries, such as http-conduit.")
 (define-public ghc-http-date
   (package
     (name "ghc-http-date")
-    (version "0.0.6.1")
+    (version "0.0.8")
     (source
      (origin
        (method url-fetch)
@@ -271,7 +271,7 @@ libraries, such as http-conduit.")
                            "http-date-" version ".tar.gz"))
        (sha256
         (base32
-         "0dknh28kyarnzqrsc80ssalxjrq0qbv7ir49247p2grb7rh0dqgj"))))
+         "09slbzqayjnqqz9zybk7slgzvizgplikqgg4b2flzgks91466k0g"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-attoparsec" ,ghc-attoparsec)))
@@ -350,7 +350,6 @@ and HPACK.  Currently HTTP/2 16 framing and HPACK 10 is supported.")
        ("ghc-http-client" ,ghc-http-client)
        ("ghc-http-client-tls" ,ghc-http-client-tls)
        ("ghc-monad-control" ,ghc-monad-control)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-exceptions" ,ghc-exceptions)
        ("ghc-unliftio" ,ghc-unliftio)))
     (native-inputs
@@ -387,7 +386,7 @@ which allow you to avoid direct usage of conduits.")
 (define-public ghc-wai
   (package
     (name "ghc-wai")
-    (version "3.2.1.1")
+    (version "3.2.1.2")
     (source
      (origin
        (method url-fetch)
@@ -397,7 +396,7 @@ which allow you to avoid direct usage of conduits.")
              ".tar.gz"))
        (sha256
         (base32
-         "08afasnirja21vr0bmzcywz4w29x736dmdv7h8nnh1l8bn7sd02x"))))
+         "0jr3b2789wa4m6mxkz12ynz4lfsqmgbrcy0am8karyqr3x3528r8"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-bytestring-builder" ,ghc-bytestring-builder)
@@ -422,7 +421,7 @@ communication between web applications and web servers.")
 (define-public ghc-wai-logger
   (package
     (name "ghc-wai-logger")
-    (version "2.3.0")
+    (version "2.3.2")
     (source
      (origin
        (method url-fetch)
@@ -432,7 +431,7 @@ communication between web applications and web servers.")
              ".tar.gz"))
        (sha256
         (base32
-         "1w0b0vinsyqr37wciljkz8g5dcmfi2r210lq194a0wkycly9kkch"))))
+         "0w5ldq4gplc16zzk5ikmbbjw79imaqvw8p6lylaw3hlsbn3zzm4d"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: Tests cannot find libraries exported
                                ; by propagated-inputs.
@@ -455,7 +454,7 @@ communication between web applications and web servers.")
 (define-public ghc-wai-extra
   (package
     (name "ghc-wai-extra")
-    (version "3.0.18")
+    (version "3.0.24.2")
     (source
      (origin
        (method url-fetch)
@@ -465,7 +464,7 @@ communication between web applications and web servers.")
              ".tar.gz"))
        (sha256
         (base32
-         "0r079mqqdv14fp97w0rigdpwk6b88grpjlqsjc5y8bbc0skf5za2"))))
+         "07gcgq59dki5drkjci9ka34xjsy3bqilbsx0lsc4905w9jlyfbci"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
@@ -504,7 +503,7 @@ functionality.")
 (define-public ghc-wai-conduit
   (package
     (name "ghc-wai-conduit")
-    (version "3.0.0.3")
+    (version "3.0.0.4")
     (source
      (origin
        (method url-fetch)
@@ -513,7 +512,7 @@ functionality.")
                            "wai-conduit-" version ".tar.gz"))
        (sha256
         (base32
-         "1zvsiwjq2mvkb9sjgp3ly9m968m7a2jjzr4id6jpi3mmqykj15z4"))))
+         "07yn41rn2skd5p3wqqa09wa761vj7ibl8l19gh4bi4i8slxhk417"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-conduit" ,ghc-conduit)
@@ -526,10 +525,34 @@ functionality.")
 Haskell's Web Application Interface (WAI).")
     (license license:expat)))
 
+(define-public ghc-bsb-http-chunked
+  (package
+    (name "ghc-bsb-http-chunked")
+    (version "0.0.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/"
+             "bsb-http-chunked/bsb-http-chunked-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1x6m6xkrcw6jiaig1bb2wb5pqyw31x8xr9k9pxgq2g3ng44pbjr8"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-bytestring-builder" ,ghc-bytestring-builder)))
+    (home-page "http://github.com/sjakobi/bsb-http-chunked")
+    (synopsis "Chunked HTTP transfer encoding for bytestring builders")
+    (description "This Haskell library contains functions for encoding
+bytestring builders for chunked Hypertext Transfer Protocol (HTTP) 1.1
+transfers.")
+    (license license:bsd-3)))
+
 (define-public ghc-warp
   (package
     (name "ghc-warp")
-    (version "3.2.11.1")
+    (version "3.2.23")
     (source
      (origin
        (method url-fetch)
@@ -538,15 +561,12 @@ Haskell's Web Application Interface (WAI).")
                            ".tar.gz"))
        (sha256
         (base32
-         "1zp5cy0bbj508vdvms1n5z80z37m253kwsqc5a83cfc990n6fgw5"))))
+         "12v9qhi4hyp0sb90yddsax16jj7x47nmqwn53sv7b5nszcxgzam0"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:tests? #f)) ; FIXME: Test-Suite `spec` fails.
     (inputs
      `(("ghc-async" ,ghc-async)
        ("ghc-auto-update" ,ghc-auto-update)
-       ("ghc-blaze-builder" ,ghc-blaze-builder)
-       ("ghc-bytestring-builder" ,ghc-bytestring-builder)
+       ("ghc-bsb-http-chunked" ,ghc-bsb-http-chunked)
        ("ghc-case-insensitive" ,ghc-case-insensitive)
        ("ghc-hashable" ,ghc-hashable)
        ("ghc-http-types" ,ghc-http-types)
@@ -559,18 +579,18 @@ Haskell's Web Application Interface (WAI).")
        ("ghc-vault" ,ghc-vault)
        ("ghc-wai" ,ghc-wai)
        ("ghc-word8" ,ghc-word8)
-       ("ghc-lifted-base" ,ghc-lifted-base)
        ("ghc-http-date" ,ghc-http-date)
        ("ghc-simple-sendfile" ,ghc-simple-sendfile)
        ("ghc-http2" ,ghc-http2)))
     (native-inputs
-     `(("ghc-silently" ,ghc-silently)
+     `(("curl" ,curl)
+       ("ghc-silently" ,ghc-silently)
        ("ghc-hspec" ,ghc-hspec)
-       ("ghc-auto-update" ,ghc-auto-update)
        ("ghc-doctest" ,ghc-doctest)
+       ("ghc-lifted-base" ,ghc-lifted-base)
        ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-hunit" ,ghc-hunit)
-       ("ghc-http" ,ghc-http)
+       ("ghc-http-client" ,ghc-http-client)
        ("hspec-discover" ,hspec-discover)))
     (home-page "http://github.com/yesodweb/wai")
     (synopsis "HTTP server library for Haskell's WAI")
@@ -578,10 +598,36 @@ Haskell's Web Application Interface (WAI).")
 based WAI (Web Application Interface in Haskell).")
     (license license:expat)))
 
+(define-public ghc-tls-session-manager
+  (package
+  (name "ghc-tls-session-manager")
+  (version "0.0.0.2")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+            "https://hackage.haskell.org/package/"
+            "tls-session-manager/tls-session-manager-"
+             version ".tar.gz"))
+      (sha256
+        (base32
+          "0rvmln545vghsx8zhxp44f0f6pzma8cylarmfhhysy55ipywr1n5"))))
+  (build-system haskell-build-system)
+  (inputs
+    `(("ghc-auto-update" ,ghc-auto-update)
+      ("ghc-clock" ,ghc-clock)
+      ("ghc-psqueues" ,ghc-psqueues)
+      ("ghc-tls" ,ghc-tls)))
+  (home-page "http://hackage.haskell.org/package/tls-session-manager")
+  (synopsis "In-memory TLS session manager")
+  (description "This Haskell library provides a TLS session manager with
+limitation, automatic pruning, energy saving and replay resistance.")
+  (license license:bsd-3)))
+
 (define-public ghc-warp-tls
   (package
     (name "ghc-warp-tls")
-    (version "3.2.3")
+    (version "3.2.4.3")
     (source
      (origin
        (method url-fetch)
@@ -590,7 +636,7 @@ based WAI (Web Application Interface in Haskell).")
                            "warp-tls-" version ".tar.gz"))
        (sha256
         (base32
-         "14m2bzk5ivz9gdpxlcj6qnh46f2lycm1ybdjnfkj2876zrqwii7m"))))
+         "17gj295fr98l7mkz2gdz6kahdnmja0sql3kvy2zab6q168g53kc4"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-cryptonite" ,ghc-cryptonite)
@@ -598,6 +644,7 @@ based WAI (Web Application Interface in Haskell).")
        ("ghc-network" ,ghc-network)
        ("ghc-streaming-commons" ,ghc-streaming-commons)
        ("ghc-tls" ,ghc-tls)
+       ("ghc-tls-session-manager" ,ghc-tls-session-manager)
        ("ghc-wai" ,ghc-wai)
        ("ghc-warp" ,ghc-warp)))
     (home-page "http://github.com/yesodweb/wai")
@@ -609,7 +656,7 @@ a WAI handler, via the native Haskell TLS implementation.")
 (define-public ghc-xss-sanitize
   (package
     (name "ghc-xss-sanitize")
-    (version "0.3.5.7")
+    (version "0.3.6")
     (source
      (origin
        (method url-fetch)
@@ -618,7 +665,7 @@ a WAI handler, via the native Haskell TLS implementation.")
              version ".tar.gz"))
        (sha256
         (base32
-         "005cmhaw9xbzkcn42jmhvcvk63bzmg4lml368xwmqdvh7r0mcn4m"))))
+         "1d72s3a6520iwwc1wbn9v2znqgbw6a5wwzb23iq8ny9ccnjyx1dk"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-tagsoup" ,ghc-tagsoup)
@@ -666,7 +713,7 @@ Haskell.")
 (define-public ghc-mime-types
   (package
     (name "ghc-mime-types")
-    (version "0.1.0.7")
+    (version "0.1.0.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -674,7 +721,7 @@ Haskell.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1fg9cqpp5lswk8ajlq4f41n12c2v2naz179l8dsz6zisjqj4l5l3"))))
+                "14ccl2842ya17zyj0bpc7vzklbyqvvydpbypn69h2fmhgji192x8"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-text" ,ghc-text)))
@@ -710,7 +757,7 @@ documents.")
 (define-public ghc-xhtml
   (package
     (name "ghc-xhtml")
-    (version "3000.2.1")
+    (version "3000.2.2.1")
     (source
      (origin
        (method url-fetch)
@@ -720,7 +767,7 @@ documents.")
              ".tar.gz"))
        (sha256
         (base32
-         "1n6wgzxbj8xf0wf1il827qidphnffb5vzhwzqlxhh70c2y10f0ik"))))
+         "0939kwpinq6l4n3nyvd1gzyl7f83gymw0wzqndlgy1yc7q0nkj2w"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/haskell/xhtml")
     (synopsis "XHTML combinator library")
@@ -732,7 +779,7 @@ Strict, Transitional and Frameset variants.")
 (define-public ghc-blaze-html
   (package
     (name "ghc-blaze-html")
-    (version "0.9.0.1")
+    (version "0.9.1.1")
     (source
      (origin
        (method url-fetch)
@@ -741,11 +788,8 @@ Strict, Transitional and Frameset variants.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0r0acv47nh75bmf7kjyfvhcwz8f02rn9x0a1l80pzgyczfrsmkmf"))))
+         "06xv8fqhclfjj61z74cgggn4lmx1s7diakxg84mnkgfvk11983pa"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=HUnit")))
     (inputs
      `(("ghc-blaze-builder" ,ghc-blaze-builder)
        ("ghc-text" ,ghc-text)
@@ -764,7 +808,7 @@ Strict, Transitional and Frameset variants.")
 (define-public ghc-aeson
   (package
     (name "ghc-aeson")
-    (version "1.2.4.0")
+    (version "1.3.1.1")
     (source
      (origin
        (method url-fetch)
@@ -774,7 +818,7 @@ Strict, Transitional and Frameset variants.")
              ".tar.gz"))
        (sha256
         (base32
-         "16zwpd07cmhs58wwsqbhxy3b58gqw8w5nr7nf6lwi4nvznjdn09l"))))
+         "1i1ig840fvsb1lnklcv32zsc0zscirc301lw1mpfxhc6h4pk0gw4"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: testing libraries are missing.
     (inputs
@@ -808,22 +852,10 @@ for Haskell, optimized for ease of use and high performance.  (A note on
 naming: in Greek mythology, Aeson was the father of Jason.)")
     (license license:bsd-3)))
 
-(define-public ghc-aeson-for-pandoc-1
-  (package (inherit ghc-aeson)
-    (version "1.1.2.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/aeson/aeson-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "1zy5z8pzvh53qkjm0nm3f4rwqfqg3867ck8ncd6mrxpcyvxqqj1p"))))))
-
 (define-public ghc-aeson-pretty
   (package
     (name "ghc-aeson-pretty")
-    (version "0.8.5")
+    (version "0.8.7")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -831,7 +863,7 @@ naming: in Greek mythology, Aeson was the father of Jason.)")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1yd98972srlbkn0f2jhrb3f443j9wnq2fnw5gbxjxzmkcinfh5yx"))))
+                "1m977gs0s9gf3lwzlbs5y7bl6ansc5pywmn2qjk09l5bwg2yrhf1"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-aeson" ,ghc-aeson)
@@ -889,7 +921,7 @@ of a JSON value into a @code{Data.Aeson.Value}.")
 (define-public ghc-multipart
   (package
     (name "ghc-multipart")
-    (version "0.1.2")
+    (version "0.1.3")
     (source
      (origin
        (method url-fetch)
@@ -899,9 +931,11 @@ of a JSON value into a @code{Data.Aeson.Value}.")
              ".tar.gz"))
        (sha256
         (base32
-         "0g04jhyw1ib1s7c9bcldyyn4n90qd9x7dmvic4vgq57bgcqgnhz5"))))
+         "1x4n4yyva22dhfr1pg5ki112qvvzb4hyd7bwpm189iq4gcp52q4z"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-parsec" ,ghc-parsec)))
+    (inputs
+     `(("ghc-parsec" ,ghc-parsec)
+       ("ghc-stringsearch" ,ghc-stringsearch)))
     (home-page
      "http://www.github.com/silkapp/multipart")
     (synopsis
@@ -1023,7 +1057,7 @@ avoid any issues with characters.")
 (define-public ghc-yesod-core
   (package
     (name "ghc-yesod-core")
-    (version "1.4.37")
+    (version "1.6.6")
     (source
      (origin
        (method url-fetch)
@@ -1032,18 +1066,18 @@ avoid any issues with characters.")
                            "yesod-core-" version ".tar.gz"))
        (sha256
         (base32
-         "0ww8hl0cx2g58zrdx3j6d5m2xwhssbajdqws1xk6rzl7rpfm1b9j"))))
+         "0xahf6m5c7mkl74p0gimy4wb5w4s3lh92wwxmk517fbq666c92kb"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-wai" ,ghc-wai)
               ("ghc-extra" ,ghc-extra)
               ("ghc-text" ,ghc-text)
               ("ghc-shakespeare" ,ghc-shakespeare)
               ("ghc-blaze-builder" ,ghc-blaze-builder)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-clientsession" ,ghc-clientsession)
               ("ghc-random" ,ghc-random)
               ("ghc-cereal" ,ghc-cereal)
               ("ghc-old-locale" ,ghc-old-locale)
+              ("ghc-unliftio" ,ghc-unliftio)
               ("ghc-unordered-containers" ,ghc-unordered-containers)
               ("ghc-monad-control" ,ghc-monad-control)
               ("ghc-transformers-base" ,ghc-transformers-base)
@@ -1058,6 +1092,7 @@ avoid any issues with characters.")
               ("ghc-monad-logger" ,ghc-monad-logger)
               ("ghc-conduit" ,ghc-conduit)
               ("ghc-resourcet" ,ghc-resourcet)
+              ("ghc-rio" ,ghc-rio)
               ("ghc-lifted-base" ,ghc-lifted-base)
               ("ghc-blaze-html" ,ghc-blaze-html)
               ("ghc-blaze-markup" ,ghc-blaze-markup)
@@ -1093,7 +1128,7 @@ functions, widgets, etc.")
 (define-public ghc-yesod-persistent
   (package
     (name "ghc-yesod-persistent")
-    (version "1.4.3")
+    (version "1.6.0")
     (source
      (origin
        (method url-fetch)
@@ -1102,7 +1137,7 @@ functions, widgets, etc.")
                            "yesod-persistent-" version ".tar.gz"))
        (sha256
         (base32
-         "0kiksw46c8ww9yiwl28pkrppx8d6fhsasr0hvmsliqbrp16likj8"))))
+         "1gd59xf7b6v3cald58mzwnfbdzjr49cz60rm4wc5w9pvfx12pgj2"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: hspec-discover not available in PATH.
     (inputs `(("ghc-yesod-core" ,ghc-yesod-core)
@@ -1126,7 +1161,7 @@ from Yesod.")
 (define-public ghc-yesod-form
     (package
     (name "ghc-yesod-form")
-    (version "1.4.16")
+    (version "1.6.2")
     (source
       (origin
         (method url-fetch)
@@ -1136,7 +1171,7 @@ from Yesod.")
                ".tar.gz"))
         (sha256
           (base32
-            "0lij3m5vn8nvh6y88r1dhk03xmmjwmjzazm307nc2wvc5fmx9p2j"))))
+            "1p1x1hffvarplc82ykdk7rm6p5isqgqf78bvxzpfhncxs4kwx057"))))
     (build-system haskell-build-system)
     (inputs
       `(("ghc-yesod-core" ,ghc-yesod-core)
@@ -1169,7 +1204,7 @@ providing richtext field using Nic editor. ")
 (define-public ghc-yesod
   (package
     (name "ghc-yesod")
-    (version "1.4.5")
+    (version "1.6.0")
     (source
      (origin
        (method url-fetch)
@@ -1178,7 +1213,7 @@ providing richtext field using Nic editor. ")
              version ".tar.gz"))
        (sha256
         (base32
-         "1sg66nq8yaas2m5nqsdrxricvcizd1ik02zqk60sxh3wna08fz16"))))
+         "0wx77nbpzdh40p1bm527kimfj48vs9d2avpvvz2w42zi3pz2y94a"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-yesod-core" ,ghc-yesod-core)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 6b774c358a..a140985eba 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -559,7 +559,7 @@ interactive environment for the functional language Haskell.")
                                 (file-pattern ".*\\.conf\\.d$")
                                 (file-type 'directory))))))
 
-(define-public ghc ghc-8.0)
+(define-public ghc ghc-8)
 
 (define-public ghc-hostname
   (package
@@ -596,7 +596,6 @@ determine the hostname.")
     (inputs
      `(("ghc-old-time" ,ghc-old-time)
        ("ghc-old-locale" ,ghc-old-locale)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-text" ,ghc-text)))
     (home-page "https://hackage.haskell.org/package/convertible")
     (synopsis "Typeclasses and instances for converting between types")
@@ -649,8 +648,7 @@ between double precision floating point and text.")
          "01zvk86kg726lf2vnlr7dxiz7g3xwi5a4ak9gcfbwyhynkzjmsfi"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("libxml2" ,libxml2)))
+     `(("libxml2" ,libxml2)))
     (arguments
      `(#:configure-flags
        `(,(string-append "--extra-include-dirs="
@@ -825,10 +823,119 @@ code pages on Windows.  On all other operating systems, the library does
 nothing.")
   (license license:bsd-3)))
 
+(define-public ghc-newtype-generics
+  (package
+    (name "ghc-newtype-generics")
+    (version "0.5.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "newtype-generics/newtype-generics-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0igyisw2djg19v9vkna1rwf47k97mvkvk4bbkmswznvbm00z15gj"))))
+    (build-system haskell-build-system)
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "http://github.com/sjakobi/newtype-generics")
+    (synopsis "Typeclass and set of functions for working with newtypes")
+    (description "The @code{Newtype} typeclass represents the packing and
+unpacking of a newtype, and allows you to operate under that newtype with
+functions such as @code{ala}.  Generics support was added in version 0.4,
+making this package a full replacement for the original newtype package,
+and an alternative to newtype-th.")
+    (license license:bsd-3)))
+
+(define-public ghc-memotrie
+  (package
+    (name "ghc-memotrie")
+    (version "0.6.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/MemoTrie/MemoTrie-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "157p0pi6rrq74a35mq6zkkycv4ah7xhkbrcmnkb9xf7pznw4aq0x"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-newtype-generics" ,ghc-newtype-generics)))
+    (home-page "https://github.com/conal/MemoTrie")
+    (synopsis "Trie-based memo functions")
+    (description "This package provides a functional library for creating
+efficient memo functions using tries.")
+    (license license:bsd-3)))
+
+(define-public ghc-tree-diff
+  (package
+    (name "ghc-tree-diff")
+    (version "0.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/tree-diff/tree-diff-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "049v44c520jy3icxlnrvbdblh3mjmvd7m6qmkzxbzkf02x63xqmz"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("4" "1rqxxyj6hqllahs11693g855cxz8mgnb490s7j1ksd300i5xgjsp")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "tree-diff.cabal"
+               (("trifecta             >=1\\.7\\.1\\.1  && <1\\.8")
+                "trifecta             >=1.7.1.1  && <=2")))))))
+    (inputs
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-generics-sop" ,ghc-generics-sop)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-memotrie" ,ghc-memotrie)
+       ("ghc-parsec" ,ghc-parsec)
+       ("ghc-parsers" ,ghc-parsers)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-text" ,ghc-text)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-uuid-types" ,ghc-uuid-types)
+       ("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
+       ("ghc-parsec" ,ghc-parsec)
+       ("ghc-trifecta" ,ghc-trifecta)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-golden" ,ghc-tasty-golden)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
+    (home-page "https://github.com/phadej/tree-diff")
+    (synopsis "Compute difference between (expression) trees")
+    (description "This Haskell library provides a function for computing
+the difference bewteen (expression) trees.  It also provides a way to
+compute the difference between arbitrary abstract datatypes (ADTs) using
+@code{Generics}-derivable helpers.")
+    (license license:bsd-3)))
+
 (define-public ghc-haddock-library
   (package
     (name "ghc-haddock-library")
-    (version "1.4.3")
+    (version "1.5.0.1")
     (source
      (origin
        (method url-fetch)
@@ -838,14 +945,37 @@ nothing.")
              ".tar.gz"))
        (sha256
         (base32
-         "0ns4bpf6whmcfl0cm2gx2c73if416x4q3ac4l4qm8w84h0zpcr7p"))))
+         "1cmbg8l5xrwpliclwy3l057raypjqy0hsg1h1743ahaj8gq10b7z"))
+       (patches (search-patches
+                 "ghc-haddock-library-unbundle.patch"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   (delete-file-recursively "vendor")
+                   #t))))
     (build-system haskell-build-system)
-    (inputs
-     `(("ghc-base-compat" ,ghc-base-compat)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'relax-test-suite-dependencies
+           (lambda _
+             (substitute* "haddock-library.cabal"
+               (("base-compat\\s*\\^>= 0\\.9\\.3") "base-compat")
+               (("hspec\\s*\\^>= 2\\.4\\.4") "hspec"))))
+         ;; The release tarball does not contain the "fixtures/examples"
+         ;; directory, which is required for testing.  In the upstream
+         ;; repository, the directory exists and is populated.  Here, we
+         ;; create an empty directory to placate the tests.
+         (add-before 'check 'add-examples-directory
+           (lambda _
+             (mkdir "fixtures/examples")
+             #t)))))
     (native-inputs
-     `(("hspec-discover" ,hspec-discover)
+     `(("ghc-base-compat" ,ghc-base-compat)
        ("ghc-hspec" ,ghc-hspec)
-       ("ghc-quickcheck" ,ghc-quickcheck)))
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-tree-diff" ,ghc-tree-diff)
+       ("hspec-discover" ,hspec-discover)))
     (home-page "https://www.haskell.org/haddock/")
     (synopsis "Library exposing some functionality of Haddock")
     (description
@@ -859,8 +989,7 @@ the ‘haddock’ package.")
 (define-public ghc-haddock-api
   (package
     (name "ghc-haddock-api")
-    ;; This is the last version to be supported by Cabal < 2.0
-    (version "2.17.4")
+    (version "2.19.0.1")
     (source
      (origin
        (method url-fetch)
@@ -870,8 +999,18 @@ the ‘haddock’ package.")
              ".tar.gz"))
        (sha256
         (base32
-         "00fn6pzgg8xjbaw12d76jdqh2dbc5xy7miyz0x6kidvvar7i35ss"))))
+         "0c6i7sljp7myz25d90gyw68a90i5jcrkajkxcciikp2hjirfaas3"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "haddock-api.cabal"
+               (("Cabal           \\^>= 2\\.0\\.0")
+                "Cabal           ^>= 2.2.0")
+               (("hspec           \\^>= 2\\.4\\.4")
+                "hspec            >= 2.4.4 && < 2.6")))))))
     (inputs
      `(("ghc-paths" ,ghc-paths)
        ("ghc-haddock-library" ,ghc-haddock-library)))
@@ -910,7 +1049,7 @@ documentation-generation tool for Haskell libraries.")
 (define-public ghc-haddock
   (package
     (name "ghc-haddock")
-    (version "2.17.4")
+    (version "2.19.0.1")
     (source
      (origin
        (method url-fetch)
@@ -920,16 +1059,37 @@ documentation-generation tool for Haskell libraries.")
              ".tar.gz"))
        (sha256
         (base32
-         "1z3h3v7w84dzsm47iavdppc2w899mr4c1agq9fzghgz902i0a655"))))
+         "1g1j9j0hf2yhyyh0gwz6bzbvfvliqz9x8a8hnkmwghm7w3xa6sb7"))))
     (build-system haskell-build-system)
-    ;; FIXME: Tests fail with this error:
-    ;; driver-test/Main.hs:4:1: error:
-    ;; Failed to load interface for ‘ResponseFileSpec’
-    (arguments `(#:tests? #f))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; There are four test suites that require the ghc-haddock-test
+         ;; package, which no longer builds with GHC 8.4.3.  This phase
+         ;; removes these four test suites from the Cabal file, so that we
+         ;; do not need ghc-haddock-test as an input.
+         (add-before 'configure 'remove-haddock-test-test-suites
+           (lambda _
+             (use-modules (ice-9 rdelim))
+             (with-atomic-file-replacement "haddock.cabal"
+               (lambda (in out)
+                 (let loop ((line (read-line in 'concat)) (deleting? #f))
+                   (cond
+                    ((eof-object? line) #t)
+                    ((string-every char-set:whitespace line)
+                     (unless deleting? (display line out))
+                     (loop (read-line in 'concat) #f))
+                    ((member line '("test-suite html-test\n"
+                                    "test-suite hypsrc-test\n"
+                                    "test-suite latex-test\n"
+                                    "test-suite hoogle-test\n"))
+                     (loop (read-line in 'concat) #t))
+                    (else
+                     (unless deleting? (display line out))
+                     (loop (read-line in 'concat) deleting?)))))))))))
     (inputs `(("ghc-haddock-api" ,ghc-haddock-api)))
     (native-inputs
-     `(("ghc-hspec" ,ghc-hspec)
-       ("ghc-haddock-test" ,ghc-haddock-test)))
+     `(("ghc-hspec" ,ghc-hspec)))
     (home-page "https://www.haskell.org/haddock/")
     (synopsis
      "Documentation-generation tool for Haskell libraries")
@@ -940,7 +1100,7 @@ documentation-generation tool for Haskell libraries.")
 (define-public ghc-simple-reflect
   (package
     (name "ghc-simple-reflect")
-    (version "0.3.2")
+    (version "0.3.3")
     (source
      (origin
        (method url-fetch)
@@ -950,7 +1110,7 @@ documentation-generation tool for Haskell libraries.")
              ".tar.gz"))
        (sha256
         (base32
-         "1dpcf6w3cf1sfl9bnlsx04x7aghw029glj5d05qzrsnms2rlw8iq"))))
+         "0ayvrx5cm8n6db21jiyjmk5h93pw7cz1707hih09hlhk9jh5x0h7"))))
     (build-system haskell-build-system)
     (home-page
      "https://twanvl.nl/blog/haskell/simple-reflection-of-expressions")
@@ -967,7 +1127,7 @@ them.")
 (define-public ghc-haskell-src
   (package
     (name "ghc-haskell-src")
-    (version "1.0.2.0")
+    (version "1.0.3.0")
     (source
      (origin
        (method url-fetch)
@@ -977,7 +1137,7 @@ them.")
              ".tar.gz"))
        (sha256
         (base32
-         "19lilhpwnjb7cks9fq1ipnc8f7dwxy0ri3dgjkdxs3i355byw99a"))))
+         "1g4dj1f0j68bhn4ixfac63wjzy6gsp6kwgxryb1k5nl3i0g99d5l"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-happy" ,ghc-happy)
@@ -996,7 +1156,7 @@ package are to parse or generate Haskell 98 code.")
 (define-public ghc-alex
   (package
     (name "ghc-alex")
-    (version "3.2.3")
+    (version "3.2.4")
     (source
      (origin
        (method url-fetch)
@@ -1006,9 +1166,20 @@ package are to parse or generate Haskell 98 code.")
              ".tar.gz"))
        (sha256
         (base32
-         "0bi1cs9b8ir33h1fl6x2xw4ymygapqbr713ridpf7rmk2wa7jqqs"))))
+         "0cpjixgsr0b2x4s6hz4aa6gnmjw9i7xd9nlfi8m37zqlidq4v3nm"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'set-check-variables
+           (lambda _
+             (setenv "PATH" (string-append (getcwd) "/dist/build/alex:"
+                                           (getenv "PATH")))
+             (setenv "alex_datadir" (string-append (getcwd) "/data"))
+             #t)))))
     (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
+    (native-inputs
+     `(("which" ,which)))
     (home-page "https://www.haskell.org/alex/")
     (synopsis
      "Tool for generating lexical analysers in Haskell")
@@ -1035,14 +1206,25 @@ tool lex or flex for C/C++.")
          "1hbpplss1m4rdpm4ibip6fpimlhssqa14fl338kl2jbc463i64cj"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "cgi.cabal"
+               (("exceptions < 0\\.9")
+                "exceptions < 0.11")
+               (("time >= 1\\.5 && < 1\\.7")
+                "time >= 1.5 && < 1.9")
+               (("doctest >= 0\\.8 && < 0\\.12")
+                "doctest >= 0.8 && < 0.17")
+               (("QuickCheck >= 2\\.8\\.1 && < 2\\.10")
+                "QuickCheck >= 2.8.1 && < 2.12")))))))
     (inputs
      `(("ghc-parsec" ,ghc-parsec)
        ("ghc-exceptions" ,ghc-exceptions)
        ("ghc-multipart" ,ghc-multipart)
        ("ghc-network-uri" ,ghc-network-uri)
-       ("ghc-network" ,ghc-network)
-       ("ghc-mtl" ,ghc-mtl)))
+       ("ghc-network" ,ghc-network)))
     (native-inputs
      `(("ghc-doctest" ,ghc-doctest)
        ("ghc-quickcheck" ,ghc-quickcheck)))
@@ -1056,7 +1238,7 @@ tool lex or flex for C/C++.")
 (define-public ghc-cmdargs
   (package
     (name "ghc-cmdargs")
-    (version "0.10.18")
+    (version "0.10.20")
     (source
      (origin
        (method url-fetch)
@@ -1065,7 +1247,7 @@ tool lex or flex for C/C++.")
              version ".tar.gz"))
        (sha256
         (base32
-         "1lnmcsf6p9yrwwz1zvrw5lbc32xpff7b70yz4ylawaflnlz6wrlh"))))
+         "0cbkmgrcnwgigg6z88y3c09gm7g6dwm7gzbgr53h8k1xik29s9hf"))))
     (build-system haskell-build-system)
     (home-page
      "http://community.haskell.org/~ndm/cmdargs/")
@@ -1099,7 +1281,7 @@ postfix notation.  For more information on stack based languages, see
 (define-public ghc-happy
   (package
     (name "ghc-happy")
-    (version "1.19.8")
+    (version "1.19.9")
     (source
      (origin
        (method url-fetch)
@@ -1109,10 +1291,8 @@ postfix notation.  For more information on stack based languages, see
              ".tar.gz"))
        (sha256
         (base32
-         "186ky3bly0i3cc56qk3r7j7pxh2108aackq4n2lli7jmbnb3kxsd"))))
+         "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y"))))
     (build-system haskell-build-system)
-    (inputs
-     `(("ghc-mtl" ,ghc-mtl)))
     (home-page "https://hackage.haskell.org/package/happy")
     (synopsis "Parser generator for Haskell")
     (description "Happy is a parser generator for Haskell.  Given a grammar
@@ -1143,7 +1323,7 @@ Happy works in a similar way to the yacc tool for C.")
 (define-public ghc-pretty-show
   (package
     (name "ghc-pretty-show")
-    (version "1.6.12")
+    (version "1.7")
     (source
      (origin
        (method url-fetch)
@@ -1151,7 +1331,7 @@ Happy works in a similar way to the yacc tool for C.")
                            "pretty-show-" version ".tar.gz"))
        (sha256
         (base32
-         "1fblcxw4z4ry14brin1mvwccs6hqqlhi7xhwv1f23szjq25cjacn"))))
+         "0br7pkxqqqhby2j2v1g847lgqsrasx56g1jw3dhmjh4flzs6warq"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-haskell-lexer" ,ghc-haskell-lexer)
@@ -1168,23 +1348,10 @@ complex generic values into an interactive Html page, for easier
 examination.")
     (license license:expat)))
 
-(define-public ghc-pretty-show-for-haskell-src-exts
-  (package (inherit ghc-pretty-show)
-    (name "ghc-pretty-show")
-    (version "1.6.10")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/pretty-show/"
-                           "pretty-show-" version ".tar.gz"))
-       (sha256
-        (base32
-         "133s4l1gk46saf6ycm785rswycy8g3j0qqrv93b5wp8cp50kd0ww"))))))
-
 (define-public ghc-haskell-src-exts
   (package
     (name "ghc-haskell-src-exts")
-    (version "1.20.1")
+    (version "1.20.2")
     (source
      (origin
        (method url-fetch)
@@ -1194,13 +1361,12 @@ examination.")
              ".tar.gz"))
        (sha256
         (base32
-         "1jsjl9hja2dpcfq4mzlfpwyr6axwnwgacfb7aa070kz4lbygzaa8"))))
+         "1sm3z4v1p5yffg01ldgavz71s3bvfhjfa13k428rk14bpkl8crlz"))))
     (build-system haskell-build-system)
     (inputs
      `(("cpphs" ,cpphs)
        ("ghc-happy" ,ghc-happy)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-pretty-show" ,ghc-pretty-show-for-haskell-src-exts)))
+       ("ghc-pretty-show" ,ghc-pretty-show)))
     (native-inputs
      `(("ghc-smallcheck" ,ghc-smallcheck)
        ("ghc-tasty" ,ghc-tasty)
@@ -1218,7 +1384,7 @@ patterns as per the HaRP extension as well as HSX-style embedded XML syntax.")
 (define-public ghc-haskell-src-exts-util
   (package
     (name "ghc-haskell-src-exts-util")
-    (version "0.2.2")
+    (version "0.2.3")
     (source
      (origin
        (method url-fetch)
@@ -1227,7 +1393,7 @@ patterns as per the HaRP extension as well as HSX-style embedded XML syntax.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "14rhwcrdz3kfb69c64qn8kybl7wnpajrjlfz5p95ca4bva4mwclg"))))
+         "1803718paq89f8pdck4mb88hv2k1ah9lxzq0lgjgwi9n88ryycz8"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-data-default" ,ghc-data-default)
@@ -1266,7 +1432,7 @@ specify refactorings without depending on GHC.")
 (define-public hlint
   (package
     (name "hlint")
-    (version "2.1.1")
+    (version "2.1.10")
     (source
      (origin
        (method url-fetch)
@@ -1275,7 +1441,7 @@ specify refactorings without depending on GHC.")
              "/" name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0mmfavd158l5ig5wb1b1zbhbraj8hhqvbk4mg85n6c8ndpr4grd4"))))
+         "19as2m9g75cr6n1agzvsij0cvqhb0wbjlk31w4y5d5mns87dki0w"))))
     (build-system haskell-build-system)
     (inputs
      `(("cpphs" ,cpphs)
@@ -1317,7 +1483,6 @@ unwanted suggestions, and to add your own custom suggestions.")
      `(("ghc-transformers-base" ,ghc-transformers-base)
        ("ghc-monad-control" ,ghc-monad-control)
        ("ghc-transformers-compat" ,ghc-transformers-compat)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-mmorph" ,ghc-mmorph)
        ("ghc-exceptions" ,ghc-exceptions)
        ("ghc-unliftio-core" ,ghc-unliftio-core)))
@@ -1356,7 +1521,7 @@ OpenAL.")
 (define-public ghc-sdl
   (package
     (name "ghc-sdl")
-    (version "0.6.5.1")
+    (version "0.6.7.0")
     (source
      (origin
        (method url-fetch)
@@ -1366,7 +1531,7 @@ OpenAL.")
              ".tar.gz"))
        (sha256
         (base32
-         "1sa3zx3vrs1gbinxx33zwq0x2bsf3i964bff7419p7vzidn36k46"))))
+         "00y67v80a8l09i3k76z09lg25kw72ivl09nag8ckdlk4a0cfnzfq"))))
     (build-system haskell-build-system)
     (inputs
      `(("sdl" ,sdl)))
@@ -1382,7 +1547,7 @@ award winning Linux port of \"Civilization: Call To Power.\"")
 (define-public ghc-sdl-mixer
   (package
     (name "ghc-sdl-mixer")
-    (version "0.6.2.0")
+    (version "0.6.3.0")
     (source
      (origin
        (method url-fetch)
@@ -1392,7 +1557,7 @@ award winning Linux port of \"Civilization: Call To Power.\"")
              ".tar.gz"))
        (sha256
         (base32
-         "1fhray79d80dk2aj9mx3ks05mm48sd832g8zgxli226jx471fs8r"))))
+         "0k26hqgdh789ka3mv4dsk6rin6x6vwcs6hjmnsqq7j3mnrh1342r"))))
     (build-system haskell-build-system)
     (arguments
      `(#:configure-flags
@@ -1413,7 +1578,7 @@ MIDI, Ogg Vorbis, and SMPEG MP3 libraries.")
 (define-public ghc-sdl-image
   (package
     (name "ghc-sdl-image")
-    (version "0.6.1.2")
+    (version "0.6.2.0")
     (source
      (origin
        (method url-fetch)
@@ -1423,7 +1588,7 @@ MIDI, Ogg Vorbis, and SMPEG MP3 libraries.")
              ".tar.gz"))
        (sha256
         (base32
-         "1ybdwlqi5nqzpsbh2md5mxhwmjn910iqysf6nykwjxlmvhcjk281"))))
+         "1gxwrvswgwjw6g7ym52gik22l9l3ljy592phv97jdmcf3gi6qcg1"))))
     (build-system haskell-build-system)
     (arguments
      `(#:configure-flags
@@ -1443,7 +1608,7 @@ PNG, PNM, TGA, TIFF, XCF, XPM, XV.")
 (define-public ghc-half
   (package
     (name "ghc-half")
-    (version "0.2.2.3")
+    (version "0.3")
     (source
      (origin
        (method url-fetch)
@@ -1452,8 +1617,11 @@ PNG, PNM, TGA, TIFF, XCF, XPM, XV.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0p4sb7vv9cljv48wlx65wgdnkryrk5d6yfh7g4yrm20w1p449hl5"))))
+         "14r0nx8hm5fic9gz0ybjjw4kyc758zfgvhhwvzsshpx5caq6zch6"))))
     (build-system haskell-build-system)
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://github.com/ekmett/half")
     (synopsis "Half-precision floating-point computations")
     (description "This library provides a half-precision floating-point
@@ -1483,7 +1651,7 @@ arithmetic.")
 (define-public ghc-openglraw
   (package
     (name "ghc-openglraw")
-    (version "3.2.7.0")
+    (version "3.3.1.0")
     (source
      (origin
        (method url-fetch)
@@ -1493,7 +1661,7 @@ arithmetic.")
              ".tar.gz"))
        (sha256
         (base32
-         "024aln102d1mmsdalq9jd5mmwjbnrb8gxcak73lybrc7q87kswk2"))))
+         "1x8w3x308jldj2c1xqcq3a3sc2jc06pdpgqkgjsmixi1skv4a1vb"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-half" ,ghc-half)
@@ -1516,7 +1684,7 @@ found at runtime, a userError is thrown.")
 (define-public ghc-glut
   (package
     (name "ghc-glut")
-    (version "2.7.0.10")
+    (version "2.7.0.14")
     (source
      (origin
        (method url-fetch)
@@ -1526,7 +1694,7 @@ found at runtime, a userError is thrown.")
              ".tar.gz"))
        (sha256
         (base32
-         "0sbm943bg896nf3qjmlnsg3zzrr3pl330rzh9g0hwv47nzwwn4ab"))))
+         "01i162fly4q1751fp60lgkzlb8kr0qqbvmxj74zc6skb19qggy2w"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-statevar" ,ghc-statevar)
@@ -1543,7 +1711,7 @@ programs.")
 (define-public ghc-gluraw
   (package
     (name "ghc-gluraw")
-    (version "2.0.0.2")
+    (version "2.0.0.4")
     (source
      (origin
        (method url-fetch)
@@ -1553,7 +1721,7 @@ programs.")
              ".tar.gz"))
        (sha256
         (base32
-         "1phmvxr0kkxq89ykmr8rj77inj8dvcxd6h72z1ncdgdazfz3sjw8"))))
+         "1i2xi35n5z0d372px9mh6cyhgg1m0cfaiy3fnspkf6kbn9fgsqxq"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-openglraw" ,ghc-openglraw)))
@@ -1567,7 +1735,7 @@ basis for a nicer interface.")
 (define-public ghc-opengl
   (package
     (name "ghc-opengl")
-    (version "3.0.1.0")
+    (version "3.0.2.2")
     (source
      (origin
        (method url-fetch)
@@ -1577,7 +1745,7 @@ basis for a nicer interface.")
              ".tar.gz"))
        (sha256
         (base32
-         "1nm2mzrn1h2nnfs9vl5p088hqpll7rdvcsyqsn8q641im9jhqp7l"))))
+         "19vxwvx2n8zq2klj176l25n2b64ybp0b8mhm4p46gvpcivz41fjc"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-text" ,ghc-text)
@@ -1656,7 +1824,7 @@ unlit literate code files; and an option to turn off macro-expansion.")
 (define-public ghc-reflection
   (package
     (name "ghc-reflection")
-    (version "2.1.2")
+    (version "2.1.4")
     (source
      (origin
        (method url-fetch)
@@ -1666,7 +1834,7 @@ unlit literate code files; and an option to turn off macro-expansion.")
              ".tar.gz"))
        (sha256
         (base32
-         "0f9w0akbm6p8h7kzgcd2f6nnpw1wy84pqn45vfz1ch5j0hn8h2d9"))))
+         "0kf4a5ijw6jfnfibjcrpdy9vzh1n6v2pxia8dhyyqdissiwc8bzj"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-tagged" ,ghc-tagged)))
     (home-page "https://github.com/ekmett/reflection")
@@ -1693,7 +1861,8 @@ configurations to coexist without resorting to mutable global variables or
         (base32 "0l3viphiszvz5wqzg7a45zp40grwlab941q5ay29iyw8p3v8pbyv"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=base")))
+     `(#:cabal-revision
+       ("2" "04b9vn007hlvsrx4ksd3r8r3kbyaj2kvwxchdrmd4370qzi8p6gs")))
     (home-page "https://hackage.haskell.org/package/old-locale")
     (synopsis "Adapt to locale conventions")
     (description
@@ -1717,7 +1886,8 @@ date and time formats.")
          "1h9b26s3kfh2k0ih4383w90ibji6n0iwamxp6rfp2lbq1y5ibjqw"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=base")))
+     `(#:cabal-revision
+       ("2" "1j6ln1dkvhdvnwl33bp0xf9lhc4sybqk0aw42p8cq81xwwzbn7y9")))
     (inputs
      `(("ghc-old-locale" ,ghc-old-locale)))
     (home-page "https://hackage.haskell.org/package/old-time")
@@ -1795,10 +1965,111 @@ Writer monad), where list append quickly becomes too expensive.")
 versions of GHC (i.e., < 6.10).")
     (license license:bsd-3)))
 
+(define-public ghc-echo
+  (package
+    (name "ghc-echo")
+    (version "0.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/echo/echo-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1vw5ykpwhr39wc0hhcgq3r8dh59zq6ib4zxbz1qd2wl21wqhfkvh"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "0br8wfiybcw5hand4imiw0i5hacdmrax1dv8g95f35gazffbx42l")))
+    (home-page "https://github.com/RyanGlScott/echo")
+    (synopsis "Echo terminal input portably")
+    (description "The @code{base} library exposes the @code{hGetEcho} and
+@code{hSetEcho} functions for querying and setting echo status, but
+unfortunately, neither function works with MinTTY consoles on Windows.
+This library provides an alternative interface which works with both
+MinTTY and other consoles.")
+    (license license:bsd-3)))
+
+(define-public ghc-hackage-security
+  (package
+    (name "ghc-hackage-security")
+    (version "0.5.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "hackage-security/hackage-security-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "08bwawc7ramgdh54vcly2m9pvfchp0ahhs8117jajni6x4bnx66v"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:tests? #f)) ; Tests fail because of framework updates.
+    (inputs
+     `(("ghc-base16-bytestring" ,ghc-base16-bytestring)
+       ("ghc-base64-bytestring" ,ghc-base64-bytestring)
+       ("ghc-cryptohash-sha256" ,ghc-cryptohash-sha256)
+       ("ghc-ed25519" ,ghc-ed25519)
+       ("ghc-network" ,ghc-network)
+       ("ghc-network-uri" ,ghc-network-uri)
+       ("ghc-parsec" ,ghc-parsec)
+       ("ghc-tar" ,ghc-tar)
+       ("ghc-zlib" ,ghc-zlib)))
+    (native-inputs
+     `(("ghc-network-uri" ,ghc-network-uri)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-tar" ,ghc-tar)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
+       ("ghc-temporary" ,ghc-temporary)
+       ("ghc-zlib" ,ghc-zlib)))
+    (home-page "https://github.com/haskell/hackage-security")
+    (synopsis "Hackage security library")
+    (description "This Hackage security library provides both server and
+client utilities for securing @uref{http://hackage.haskell.org/, the
+Hackage package server}.  It is based on
+@uref{http://theupdateframework.com/, The Update Framework}, a set of
+recommendations developed by security researchers at various universities
+in the US as well as developers on the @uref{https://www.torproject.org/,
+Tor project}.")
+    (license license:bsd-3)))
+
+(define-public ghc-resolv
+  (package
+    (name "ghc-resolv")
+    (version "0.1.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/resolv/resolv-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0wh7wj56l3f2bylz563g5g04a4nydj8acv60hpwa7k3mn792xca9"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "15ay4n3x8c09cb3h4z1nan84yd3n9zpgvi6h114hk98bq10k8mma")
+       #:tests? #f)) ; The required test frameworks are too old.
+    (inputs
+     `(("ghc-base16-bytestring" ,ghc-base16-bytestring)))
+    (home-page "https://github.com/haskell/hackage-security")
+    (synopsis "Domain Name Service (DNS) lookup via @code{libresolv}")
+    (description "This package implements an API for accessing the
+@uref{https://tools.ietf.org/html/rfc1035, Domain Name Service (DNS)}
+resolver service via the standard @code{libresolv} system library (whose
+API is often available directly via the standard @code{libc} C library) on
+Unix systems.")
+    (license license:gpl3)))
+
 (define-public cabal-install
  (package
   (name "cabal-install")
-   (version "1.22.6.0")
+   (version "2.2.0.0")
    (source
     (origin
      (method url-fetch)
@@ -1807,16 +2078,24 @@ versions of GHC (i.e., < 6.10).")
             version
             ".tar.gz"))
       (sha256
-       (base32 "1d5h7h2wjwc2s3dvsvzjgmmfrfl2312ym2h6kyjgm9wnaqw9w8wx"))))
+       (base32 "1nd3ch7qr4dpfxhgkcq2lnhvszx2kjgnn1kwb44vk9y5jgfs4mn8"))))
    (arguments `(#:tests? #f)) ; FIXME: testing libraries are missing.
    (build-system haskell-build-system)
    (inputs
-    `(("ghc-http" ,ghc-http)
-      ("ghc-mtl" ,ghc-mtl)
+    `(("ghc-async" ,ghc-async)
+      ("ghc-base16-bytestring" ,ghc-base16-bytestring)
+      ("ghc-cryptohash-sha256" ,ghc-cryptohash-sha256)
+      ("ghc-echo" ,ghc-echo)
+      ("ghc-edit-distance" ,ghc-edit-distance)
+      ("ghc-hackage-security" ,ghc-hackage-security)
+      ("ghc-hashable" ,ghc-hashable)
+      ("ghc-http" ,ghc-http)
       ("ghc-network-uri" ,ghc-network-uri)
       ("ghc-network" ,ghc-network)
       ("ghc-random" ,ghc-random)
+      ("ghc-resolv" ,ghc-resolv)
       ("ghc-stm" ,ghc-stm)
+      ("ghc-tar" ,ghc-tar)
       ("ghc-zlib" ,ghc-zlib)))
    (home-page "https://www.haskell.org/cabal/")
    (synopsis "Command-line interface for Cabal and Hackage")
@@ -1840,6 +2119,9 @@ installation of Haskell libraries and programs.")
         (base32
          "0bgd4jdmzxq5y465r4sf4jv2ix73yvblnr4c9wyazazafddamjny"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "1bk85avgc93yvcggwbk01fy8nvg6753wgmaanhkry0hz55h7mpld")))
     (home-page "https://github.com/phadej/cabal-doctest")
     (synopsis "Setup.hs helper for running doctests")
     (description
@@ -1848,37 +2130,6 @@ configuration.  This library provides the common bits for writing custom
 @file{Setup.hs} files.")
     (license license:bsd-3)))
 
-(define-public ghc-mtl
-  (package
-    (name "ghc-mtl")
-    (version "2.2.1")
-    (outputs '("out" "doc"))
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/mtl/mtl-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "1icdbj2rshzn0m1zz5wa7v3xvkf6qw811p4s7jgqwvx1ydwrvrfa"))))
-    (build-system haskell-build-system)
-    ;; This is an official revision, relaxing the requirement transformers ==
-    ;; 0.4 to transformers >= 0.4 && < 0.6; see
-    ;; https://hackage.haskell.org/package/mtl-2.2.1/revision/1.cabal
-    (arguments
-     `(#:configure-flags (list "--allow-newer=transformers")))
-    (home-page "https://github.com/ekmett/mtl")
-    (synopsis
-     "Monad classes, using functional dependencies")
-    (description "Monad classes using functional dependencies, with instances
-for various monad transformers, inspired by the paper 'Functional Programming
-with Overloading and Higher-Order Polymorphism', by Mark P Jones, in 'Advanced
-School of Functional Programming', 1995.  See
-@uref{https://web.cecs.pdx.edu/~mpj/pubs/springschool.html, the paper}.")
-    (license license:bsd-3)))
-
 (define-public ghc-parsec-numbers
   (package
     (name "ghc-parsec-numbers")
@@ -1938,7 +2189,8 @@ School of Functional Programming', 1995.  See
         (base32 "0h7imvxkahiy8pzr8cpsimifdfvv18lizrb33k6mnq70rcx9w2zv"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=base")))
+     `(#:cabal-revision
+       ("3" "02vhj5gykkqa2dyn7s6gn8is1b5fdn9xcqqvlls268g7cpv6rk38")))
     (home-page "https://github.com/glguy/utf8-string/")
     (synopsis "Support for reading and writing UTF8 Strings")
     (description
@@ -1971,7 +2223,7 @@ environment variables.")
 (define-public ghc-setlocale
   (package
     (name "ghc-setlocale")
-    (version "1.0.0.6")
+    (version "1.0.0.8")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1979,7 +2231,7 @@ environment variables.")
                     version "/setlocale-" version ".tar.gz"))
               (sha256
                (base32
-                "1rl8qb8vzv8fdbczy2dxwgn4cb68lfrjdxf2w8nn9wy1acqzcyjq"))))
+                "0sdrsmkhw08483d73ysgm2926fdbhii61br03lqpqw0lfzj4ilbd"))))
     (build-system haskell-build-system)
     (home-page "https://hackage.haskell.org/package/setlocale")
     (synopsis "Haskell bindings to setlocale")
@@ -1990,14 +2242,14 @@ environment variables.")
 (define-public ghc-x11
   (package
     (name "ghc-x11")
-    (version "1.8")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/X11/"
                            "X11-" version ".tar.gz"))
        (sha256
-        (base32 "13lxq36856fzp61y4api78vssykyh8fm2aplr0nsj18ymdm1c6sl"))))
+        (base32 "1f8dy6ckkyvpcv7zlniyv01cqjb9lgqscm8pml58cvwc7n38w4qh"))))
     (build-system haskell-build-system)
     (inputs
      `(("libx11" ,libx11)
@@ -2042,7 +2294,7 @@ parts.")
 (define-public ghc-stringbuilder
   (package
     (name "ghc-stringbuilder")
-    (version "0.5.0")
+    (version "0.5.1")
     (source
      (origin
        (method url-fetch)
@@ -2052,7 +2304,7 @@ parts.")
              ".tar.gz"))
        (sha256
         (base32
-         "1ap95xphqnrhv64c2a137wqslkdmb2jjd9ldb17gs1pw48k8hrl9"))))
+         "1fh3csx1wcssn8xyvl4ip4aprh9l4qyz2kk8mgjvqvc0vb2bsy6q"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: circular dependencies with tests
                                ; enabled
@@ -2078,7 +2330,15 @@ literals.")
         (base32
          "1vbzf0awb6zb456xf48za1kl22018646cfzq4frvxgb9ay97vk0d"))))
     (build-system haskell-build-system)
-    (arguments `(#:configure-flags (list "--allow-newer=tasty")))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'strip-test-framework-constraints
+           (lambda _
+             (substitute* "zlib.cabal"
+               (("tasty            >= 0\\.8 && < 0\\.12") "tasty")
+               (("tasty-hunit      >= 0\\.8 && < 0\\.10") "tasty-hunit")
+               (("tasty-quickcheck == 0\\.8\\.\\*") "tasty-quickcheck")))))))
     (inputs `(("zlib" ,zlib)))
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -2128,7 +2388,7 @@ case with other forms of concurrent communication, such as locks or
 (define-public ghc-parallel
   (package
     (name "ghc-parallel")
-    (version "3.2.1.0")
+    (version "3.2.2.0")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -2139,7 +2399,7 @@ case with other forms of concurrent communication, such as locks or
              ".tar.gz"))
        (sha256
         (base32
-         "09l52k1gsn667lmv0pp052cbwkzkbhfivp51f2xkrlfzf6xwvqsd"))))
+         "1xkfi96w6yfpppd0nw1rnszdxmvifwzm699ilv6332ra3akm610p"))))
     (build-system haskell-build-system)
     (home-page "https://hackage.haskell.org/package/parallel")
     (synopsis "Parallel programming library")
@@ -2174,7 +2434,7 @@ are not exception safe and can be broken by @code{killThread}.")
 (define-public ghc-text
   (package
     (name "ghc-text")
-    (version "1.2.2.2")
+    (version "1.2.3.0")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -2185,7 +2445,7 @@ are not exception safe and can be broken by @code{killThread}.")
              ".tar.gz"))
        (sha256
         (base32
-         "1y9d0zjs2ls0c574mr5xw7y3y49s62sd3wcn9lhpwz8a6q352iii"))))
+         "06iir7q99rnffzxi8gagn8w1k9m49368sbidgz634fv1gxib3q10"))))
     (build-system haskell-build-system)
     ;; The test dependencies depend on ghc-text: ghc-test-framework -> ghc-xml -> ghc-text
     (arguments `(#:tests? #f))
@@ -2249,7 +2509,7 @@ IO operations.")
 (define-public ghc-hashable
   (package
     (name "ghc-hashable")
-    (version "1.2.6.1")
+    (version "1.2.7.0")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -2260,7 +2520,7 @@ IO operations.")
              ".tar.gz"))
        (sha256
         (base32
-         "0ymv2mcrrgbdc2w39rib171fwnhg7fgp0sy4h8amrh1vw64qgjll"))))
+         "1gra8gq3kb7b2sd845h55yxlrfqx3ii004c6vjhga8v0b30fzdgc"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-text" ,ghc-text)
@@ -2280,6 +2540,14 @@ data structures.  The package provides instances for basic types and a way to
 combine hash values.")
     (license license:bsd-3)))
 
+(define-public ghc-hashable-bootstrap
+  (package
+    (inherit ghc-hashable)
+    (name "ghc-hashable-bootstrap")
+    (arguments `(#:tests? #f))
+    (native-inputs '())
+    (properties '((hidden? #t)))))
+
 (define-public ghc-hashable-time
   (package
     (name "ghc-hashable-time")
@@ -2295,6 +2563,9 @@ combine hash values.")
         (base32
          "0k932nyd08l3xxbh2g3n76py2f4kd9yw4s5a065vjz0xp6wjnxdm"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "0rv40xkg3gj8jnqsry1gq3f5s5la6d5arg8fzkirnwdpcgha1as6")))
     (inputs `(("ghc-hashable" ,ghc-hashable)))
     (home-page "http://hackage.haskell.org/package/hashable-time")
     (synopsis "Hashable instances for Data.Time")
@@ -2422,7 +2693,7 @@ Hashing\" by Claessen, Pałka for details and the rationale of the design.")
 (define-public ghc-transformers-base
   (package
     (name "ghc-transformers-base")
-    (version "0.4.4")
+    (version "0.4.5.2")
     (source
      (origin
        (method url-fetch)
@@ -2432,7 +2703,7 @@ Hashing\" by Claessen, Pałka for details and the rationale of the design.")
              ".tar.gz"))
        (sha256
         (base32
-         "11r3slgpgpra6zi2kjg3g60gvv17b1fh6qxipcpk8n86qx7lk8va"))))
+         "1s256bi0yh0x2hp2gwd30f3mg1cv53zz397dv1yhfsnfzmihrj6h"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-stm" ,ghc-stm)
@@ -2450,7 +2721,7 @@ compatibility to run on old versions of the platform.")
 (define-public ghc-transformers-compat
   (package
     (name "ghc-transformers-compat")
-    (version "0.5.1.4")
+    (version "0.6.2")
     (source
      (origin
        (method url-fetch)
@@ -2459,7 +2730,7 @@ compatibility to run on old versions of the platform.")
              "/transformers-compat-" version ".tar.gz"))
        (sha256
         (base32
-         "17yam0199fh9ndsn9n69jx9nvbsmymzzwbi23dck3dk4q57fz0fq"))))
+         "1gp4a8kvniwgm8947ghb4iwv4b7wd6ry4kvv4nfnym4agf5j41nw"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/ekmett/transformers-compat/")
     (synopsis "Small compatibility shim between transformers 0.3 and 0.4")
@@ -2472,7 +2743,7 @@ but also need those types.")
 (define-public ghc-unix-time
   (package
     (name "ghc-unix-time")
-    (version "0.3.7")
+    (version "0.3.8")
     (source
      (origin
        (method url-fetch)
@@ -2482,7 +2753,7 @@ but also need those types.")
              ".tar.gz"))
        (sha256
         (base32
-         "1qdlc9raih8s0m3x8x3n7q3ngh4faw2alv9l78sp6gnx648k0c8i"))))
+         "051slgpid5cxiaw203ky0ql3823h28fcjs08axkzd4265wrvv8fw"))))
     (build-system haskell-build-system)
     (arguments
      `(#:tests? #f)) ; FIXME: Test fails with "System.Time not found".  This
@@ -2499,7 +2770,7 @@ for Unix time in Haskell.")
 (define-public ghc-unix-compat
   (package
     (name "ghc-unix-compat")
-    (version "0.4.2.0")
+    (version "0.5.1")
     (source
      (origin
        (method url-fetch)
@@ -2509,7 +2780,7 @@ for Unix time in Haskell.")
              ".tar.gz"))
        (sha256
         (base32
-         "036nv05w0yjxc3rfpar60ddjrlzc40mdgr5k6ihvwlvqfmq1gw9m"))))
+         "0llwl7rp63fy2ychwdclz1afj45pbin5pfl01dvn6rwhvmwhr7d3"))))
     (build-system haskell-build-system)
     (home-page
      "https://github.com/jystic/unix-compat")
@@ -2523,7 +2794,7 @@ isn't available, portable implementations are used.")
 (define-public ghc-indents
   (package
     (name "ghc-indents")
-    (version "0.3.3")
+    (version "0.5.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2531,12 +2802,16 @@ isn't available, portable implementations are used.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "16lz21bp9j14xilnq8yym22p3saxvc9fsgfcf5awn2a6i6n527xn"))))
+                "1ly3v41jacc6lrsvg4j3m5a6zs90gr8dyif5m6bf34hj1k5cgg0n"))))
     (build-system haskell-build-system)
+    ;; This package needs an older version of tasty.
+    (arguments '(#:tests? #f))
     (inputs
      `(("ghc-parsec" ,ghc-parsec)
-       ("ghc-concatenative" ,ghc-concatenative)
-       ("ghc-mtl" ,ghc-mtl)))
+       ("ghc-concatenative" ,ghc-concatenative)))
+    (native-inputs
+     `(("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "http://patch-tag.com/r/salazar/indents")
     (synopsis "Indentation sensitive parser-combinators for parsec")
     (description
@@ -2548,7 +2823,7 @@ lines continued at an indented level below.")
 (define-public ghc-iproute
   (package
     (name "ghc-iproute")
-    (version "1.7.1")
+    (version "1.7.5")
     (source
      (origin
        (method url-fetch)
@@ -2558,7 +2833,7 @@ lines continued at an indented level below.")
              ".tar.gz"))
        (sha256
         (base32
-         "1viyxq3m1aifl05w0hxwrhhhcfpmvwz4ymil2gngi4nfm0yd1f2p"))))
+         "1vw1nm3s8vz1hqnjnqd3wh5rr4q3m2r4izn5ynhf93h9185qwqzd"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: Tests cannot find System.ByteOrder,
                                ; exported by ghc-byteorder.  Doctest issue.
@@ -2611,8 +2886,6 @@ supported systems.")
         (base32
          "0y1j4h2pg12c853nzmczs263di7xkkmlnsq5dlp5wgbgl49mgp10"))))
     (build-system haskell-build-system)
-    (inputs
-     `(("ghc-mtl" ,ghc-mtl)))
     (home-page
      "https://sourceforge.net/projects/lazy-regex")
     (synopsis "Replaces/Enhances Text.Regex")
@@ -2684,8 +2957,7 @@ Haskell library @code{regex-base}.")
     (build-system haskell-build-system)
     (inputs
      `(("ghc-regex-base" ,ghc-regex-base)
-       ("ghc-parsec" ,ghc-parsec)
-       ("ghc-mtl" ,ghc-mtl)))
+       ("ghc-parsec" ,ghc-parsec)))
     (home-page
      "https://hackage.haskell.org/package/regex-tdfa")
     (synopsis "Tagged DFA regex engine for Haskell")
@@ -2756,7 +3028,7 @@ copious examples.")
 (define-public ghc-parsers
   (package
     (name "ghc-parsers")
-    (version "0.12.4")
+    (version "0.12.9")
     (source
      (origin
        (method url-fetch)
@@ -2766,7 +3038,7 @@ copious examples.")
              ".tar.gz"))
        (sha256
         (base32
-         "07najh7f9y3ahh42z96sw4hnd0kc4x3wm0xlf739y0gh81ys5097"))))
+         "1r05sc1mcglk8w596kq9a1brfn9c2vll8lq16j07ln0vsz4jzrc1"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: Test fails with "cannot satisfy
                                ; -package attoparsec-0.13.0.1"
@@ -2790,7 +3062,7 @@ the parsers provided by @code{parsec}, @code{attoparsec} and @code{base}'s
 (define-public ghc-trifecta
   (package
     (name "ghc-trifecta")
-    (version "1.7.1.1")
+    (version "2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2798,11 +3070,10 @@ the parsers provided by @code{parsec}, @code{attoparsec} and @code{base}'s
                     "trifecta-" version ".tar.gz"))
               (sha256
                (base32
-                "13n6a3fdxngnzsjnhfrzigv1c2g0xm6lqkjcnirpc37sd0rpby31"))))
+                "0hznd8i65s81xy13i2qc7cvipw3lfb2yhkv53apbdsh6sbljz5sk"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-doctest" ,ghc-doctest-0.13)
-       ("ghc-reducers" ,ghc-reducers)
+     `(("ghc-reducers" ,ghc-reducers)
        ("ghc-semigroups" ,ghc-semigroups)
        ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
        ("ghc-ansi-terminal" ,ghc-ansi-terminal)
@@ -2811,18 +3082,17 @@ the parsers provided by @code{parsec}, @code{attoparsec} and @code{base}'s
        ("ghc-blaze-markup" ,ghc-blaze-markup)
        ("ghc-charset" ,ghc-charset)
        ("ghc-comonad" ,ghc-comonad)
-       ("ghc-doctest" ,ghc-doctest)
        ("ghc-fingertree" ,ghc-fingertree)
        ("ghc-hashable" ,ghc-hashable)
        ("ghc-lens" ,ghc-lens)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-parsers" ,ghc-parsers)
        ("ghc-profunctors" ,ghc-profunctors)
-       ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-unordered-containers" ,ghc-unordered-containers)
        ("ghc-utf8-string" ,ghc-utf8-string)))
     (native-inputs
-     `(("cabal-doctest" ,cabal-doctest)))
+     `(("cabal-doctest" ,cabal-doctest)
+       ("ghc-doctest" ,ghc-doctest)
+       ("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://github.com/ekmett/trifecta/")
     (synopsis "Parser combinator library with convenient diagnostics")
     (description "Trifecta is a modern parser combinator library for Haskell,
@@ -2832,7 +3102,7 @@ with slicing and Clang-style colored diagnostics.")
 (define-public ghc-time-locale-compat
   (package
     (name "ghc-time-locale-compat")
-    (version "0.1.1.3")
+    (version "0.1.1.5")
     (source
      (origin
        (method url-fetch)
@@ -2841,7 +3111,7 @@ with slicing and Clang-style colored diagnostics.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1vdcfr2hp9qh3ag90x6ikbdf42wiqpdylnplffna54bpnilbyi4i"))))
+         "0b2hmj8wwrfkndwzgm11qr496ca2ahwdxcj3m0ii91bxvrk1bzq7"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-old-locale" ,ghc-old-locale)))
     (home-page "https://github.com/khibino/haskell-time-locale-compat")
@@ -2865,10 +3135,19 @@ with slicing and Clang-style colored diagnostics.")
         (base32
          "0j6qcwd146yzlkc9mcvzvnixsyl65n2a68l28322q5v9p4g4g4yx"))))
     (build-system haskell-build-system)
-    ;; FIXME: at least on test fails with QuickCheck > 2.9.2.  Once upstream
-    ;; has updated the tests to work with a later version of QuickCheck we can
-    ;; re-enable them.
-    (arguments `(#:tests? #f))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-for-newer-quickcheck
+           (lambda _
+             (substitute* "attoparsec.cabal"
+               (("QuickCheck >= 2\\.7 && < 2\\.10")
+                "QuickCheck >= 2.7 && < 2.12"))
+             ;; This test fails because of the newer QuickCheck:
+             ;; <https://github.com/bos/attoparsec/issues/134>.
+             (substitute* "tests/QC/ByteString.hs"
+               ((", testProperty \"satisfyWith\" satisfyWith")
+                "")))))))
     (inputs
      `(("ghc-scientific" ,ghc-scientific)
        ("ghc-text" ,ghc-text)))
@@ -2885,10 +3164,21 @@ aimed particularly at dealing efficiently with network protocols and
 complicated text/binary file formats.")
     (license license:bsd-3)))
 
+(define-public ghc-attoparsec-bootstrap
+  (package
+    (inherit ghc-attoparsec)
+    (name "ghc-attoparsec-bootstrap")
+    (arguments `(#:tests? #f))
+    (inputs
+     `(("ghc-scientific" ,ghc-scientific-bootstrap)
+       ("ghc-text" ,ghc-text)))
+    (native-inputs '())
+    (properties '(hidden? #t))))
+
 (define-public ghc-zip-archive
   (package
     (name "ghc-zip-archive")
-    (version "0.3.0.5")
+    (version "0.3.3")
     (source
      (origin
        (method url-fetch)
@@ -2898,18 +3188,16 @@ complicated text/binary file formats.")
              ".tar.gz"))
        (sha256
         (base32
-         "1iwpzjck4jg9bz1yqky051i2wljsqc14q5zbi10dydfp8ip3d0yw"))))
+         "0kf8xyac168bng8a0za2jwrbss7a4ralvci9g54hnvl0gkkxx2lq"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-old-time" ,ghc-old-time)
-       ("ghc-digest" ,ghc-digest)
-       ("zip" ,zip)
-       ("ghc-mtl" ,ghc-mtl)
+     `(("ghc-digest" ,ghc-digest)
        ("ghc-temporary" ,ghc-temporary)
        ("ghc-text" ,ghc-text)
        ("ghc-zlib" ,ghc-zlib)))
     (native-inputs
-     `(("ghc-hunit" ,ghc-hunit)))
+     `(("ghc-hunit" ,ghc-hunit)
+       ("unzip" ,unzip)))
     (home-page "https://hackage.haskell.org/package/zip-archive")
     (synopsis "Zip archive library for Haskell")
     (description "The zip-archive library provides functions for creating,
@@ -2931,6 +3219,9 @@ modifying, and extracting files from zip archives in Haskell.")
         (base32
          "0y566r97sfyvhsmd4yxiz4ns2mqgwf5bdbp56wgxl6wlkidq0wwi"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("6" "06bd38rf31yrvvy989r44pm0id3dsxwcp6nxg7wk6ccj3n2b8rzk")))
     (inputs
      `(("ghc-tagged" ,ghc-tagged)
        ("ghc-base-orphans" ,ghc-base-orphans)
@@ -2939,7 +3230,7 @@ modifying, and extracting files from zip archives in Haskell.")
        ("ghc-generic-deriving" ,ghc-generic-deriving)))
     (native-inputs
      `(("cabal-doctest" ,cabal-doctest)
-       ("ghc-doctest" ,ghc-doctest-0.12)
+       ("ghc-doctest" ,ghc-doctest)
        ("ghc-hspec" ,ghc-hspec)
        ("hspec-discover" ,hspec-discover)))
     (home-page "https://github.com/ekmett/distributive/")
@@ -2951,7 +3242,7 @@ Dual to @code{Traversable}.")
 (define-public ghc-cereal
   (package
     (name "ghc-cereal")
-    (version "0.5.3.0")
+    (version "0.5.7.0")
     (source
      (origin
        (method url-fetch)
@@ -2961,7 +3252,7 @@ Dual to @code{Traversable}.")
              ".tar.gz"))
        (sha256
         (base32
-         "1x4aib7nnaf4x2b9zlndq5n5zsqniw78jifkf55nhnbmvryf05n3"))))
+         "1j7imh2mzqcljld7sx0av69699955rpy3hzivi5723i6a9nszgbs"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -2978,7 +3269,7 @@ parser isolation, and labeled blocks for better error messages.")
 (define-public ghc-comonad
   (package
     (name "ghc-comonad")
-    (version "5")
+    (version "5.0.4")
     (source
      (origin
        (method url-fetch)
@@ -2988,10 +3279,11 @@ parser isolation, and labeled blocks for better error messages.")
              ".tar.gz"))
        (sha256
         (base32
-         "0anb36m9z52y9xsipxzj9w1b41b2rj8r389cxd6d20dplnfv3rbq"))))
+         "09g870c4flp4k3fgbibsd0mmfjani1qcpbcl685v8x89kxzrva3q"))))
     (build-system haskell-build-system)
     (native-inputs
-     `(("ghc-doctest" ,ghc-doctest)))
+     `(("cabal-doctest" ,cabal-doctest)
+       ("ghc-doctest" ,ghc-doctest)))
     (inputs
      `(("ghc-contravariant" ,ghc-contravariant)
        ("ghc-distributive" ,ghc-distributive)
@@ -3006,7 +3298,7 @@ parser isolation, and labeled blocks for better error messages.")
 (define-public hscolour
   (package
     (name "hscolour")
-    (version "1.24.1")
+    (version "1.24.4")
     (source
      (origin
        (method url-fetch)
@@ -3016,7 +3308,7 @@ parser isolation, and labeled blocks for better error messages.")
              ".tar.gz"))
        (sha256
         (base32
-         "1j3rpzjygh3igvnd1n2xn63bq68rs047cjxr2qi6xyfnivgf6vz4"))))
+         "079jwph4bwllfp03yfr26s5zc6m6kw3nhb1cggrifh99haq34cr4"))))
     (build-system haskell-build-system)
     (home-page "https://hackage.haskell.org/package/hscolour")
     (synopsis "Script to colourise Haskell code")
@@ -3060,7 +3352,7 @@ Strings.")
 (define-public ghc-extra
   (package
     (name "ghc-extra")
-    (version "1.6.3")
+    (version "1.6.9")
     (source
      (origin
        (method url-fetch)
@@ -3070,7 +3362,7 @@ Strings.")
              ".tar.gz"))
        (sha256
         (base32
-         "06ds0jlx6sljwdf63l154qbzia9mnsri79i9qm3xikky3nj9ia1m"))))
+         "0xxcpb00pgwi9cmy6a7ghh6rblxry42p8pz5ssfgj20fs1xwzj1b"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-clock" ,ghc-clock)
@@ -3098,6 +3390,9 @@ this package makes them available back to GHC 7.2.")
         (base32
          "0s1pwjidbn761xk43pmzyvn99hm3psdifjd78ylki7f97aiyd0g9"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "1ywlg9z8nlhd2avgb8c6gbkv8zyk7hvc25926bafyg0m0k8y1amq")))
     (inputs
      `(("ghc-base-orphans" ,ghc-base-orphans)
        ("ghc-bifunctors" ,ghc-bifunctors)
@@ -3114,7 +3409,7 @@ this package makes them available back to GHC 7.2.")
 (define-public ghc-reducers
   (package
     (name "ghc-reducers")
-    (version "3.12.2")
+    (version "3.12.3")
     (source
      (origin
        (method url-fetch)
@@ -3124,7 +3419,7 @@ this package makes them available back to GHC 7.2.")
              ".tar.gz"))
        (sha256
         (base32
-         "1gbaa5x4zbvnbklcb0d4q4m8hk6w0gz4s0c4m288czi1nw43dl65"))))
+         "09wf8pl9ycglcv6qj5ba26gkg2s5iy81hsx9xp0q8na0cwvp71ki"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-fingertree" ,ghc-fingertree)
@@ -3164,7 +3459,7 @@ style.")
 (define-public ghc-safe
   (package
     (name "ghc-safe")
-    (version "0.3.9")
+    (version "0.3.17")
     (source
      (origin
        (method url-fetch)
@@ -3174,8 +3469,10 @@ style.")
              ".tar.gz"))
        (sha256
         (base32
-         "1jdnp5zhvalf1xy8i872n29nljfjz6lnl9ghj80ffisrnnkrwcfh"))))
+         "0p3yaf5slvyz1cyy51jq64c5rlp8yzwim8iy2dlnk42if4gc9ibr"))))
     (build-system haskell-build-system)
+    (native-inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://github.com/ndmitchell/safe#readme")
     (synopsis "Library of safe (exception free) functions")
     (description "This library provides wrappers around @code{Prelude} and
@@ -3186,7 +3483,7 @@ exceptions.")
 (define-public ghc-generic-deriving
   (package
     (name "ghc-generic-deriving")
-    (version "1.11.1")
+    (version "1.12.2")
     (source
      (origin
        (method url-fetch)
@@ -3196,8 +3493,10 @@ exceptions.")
              ".tar.gz"))
        (sha256
         (base32
-         "1sdh5hpcwvh3b6zvgfk3pr3hla8p88l82njnih880c0gk5zl53dk"))))
+         "1i7d6cpj9yhaqb79zays3nqchhaacacjz9bkc0zlwj73y5gvi22n"))))
     (build-system haskell-build-system)
+    (inputs
+     `(("ghc-th-abstraction" ,ghc-th-abstraction)))
     (native-inputs
      `(("ghc-hspec" ,ghc-hspec)
        ("hspec-discover" ,hspec-discover)))
@@ -3249,7 +3548,6 @@ syntax and semantics as Perl 5.")
         (base32
          "07hnirv6snnym2r7iijlfz00b60jpy2856zvqxh989q0in7bd0hi"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-mtl" ,ghc-mtl)))
     (home-page "http://code.haskell.org/~dolio/")
     (synopsis "Backtracking logic-programming monad")
     (description "This library provides a continuation-based, backtracking,
@@ -3284,7 +3582,7 @@ online}.")
 (define-public ghc-feed
   (package
     (name "ghc-feed")
-    (version "0.3.12.0")
+    (version "1.0.0.0")
     (source
      (origin
        (method url-fetch)
@@ -3292,14 +3590,21 @@ online}.")
                            "feed/feed-" version ".tar.gz"))
        (sha256
         (base32
-         "0hkrsinspg70bbm3hwqdrvivws6zya1hyk0a3awpaz82j4xnlbfc"))))
+         "05rgg7x1984mgfhkmz792xj8lhwjgznixhygzr8blf517lns2nck"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("4" "0baavcavm3ywykcr9cm07aqr7sna98jba2n68lyn3kany8ri214d")))
     (inputs
-     `(("ghc-old-locale" ,ghc-old-locale)
+     `(("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-old-locale" ,ghc-old-locale)
        ("ghc-old-time" ,ghc-old-time)
+       ("ghc-safe" ,ghc-safe)
+       ("ghc-text" ,ghc-text)
        ("ghc-time-locale-compat" ,ghc-time-locale-compat)
        ("ghc-utf8-string" ,ghc-utf8-string)
-       ("ghc-xml" ,ghc-xml)))
+       ("ghc-xml-conduit" ,ghc-xml-conduit)
+       ("ghc-xml-types" ,ghc-xml-types)))
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)
        ("ghc-test-framework" ,ghc-test-framework)
@@ -3313,7 +3618,7 @@ consuming feeds in both RSS (Really Simple Syndication) and Atom format.")
 (define-public ghc-exceptions
   (package
     (name "ghc-exceptions")
-    (version "0.8.3")
+    (version "0.10.0")
     (source
      (origin
        (method url-fetch)
@@ -3323,16 +3628,15 @@ consuming feeds in both RSS (Really Simple Syndication) and Atom format.")
              ".tar.gz"))
        (sha256
         (base32
-         "1gl7xzffsqmigam6zg0jsglncgzxqafld2p6kb7ccp9xirzdjsjd"))))
+         "1ms9zansv0pwzwdjncvx4kf18lnkjy2p61hvjhvxmjx5bqp93p8y"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
     (native-inputs
-     `(("ghc-test-framework" ,ghc-test-framework)
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
        ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
     (inputs
      `(("ghc-stm" ,ghc-stm)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://github.com/ekmett/exceptions/")
     (synopsis "Extensible optionally-pure exceptions")
@@ -3343,7 +3647,7 @@ for Haskell.")
 (define-public ghc-temporary
   (package
     (name "ghc-temporary")
-    (version "1.2.0.4")
+    (version "1.3")
     (source
      (origin
        (method url-fetch)
@@ -3353,9 +3657,15 @@ for Haskell.")
              ".tar.gz"))
        (sha256
         (base32
-         "0qk741yqnpd69sksgks2vb7zi50rglp9m498lzw4sh268a017rsi"))))
+         "144qhwfwg37l3k313raf4ssiz16jbgwlm1nf4flgqpsbd69jji4c"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-exceptions" ,ghc-exceptions)))
+    (inputs
+     `(("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-random" ,ghc-random)))
+    (native-inputs
+     `(("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
     (home-page "https://www.github.com/batterseapower/temporary")
     (synopsis "Temporary file and directory support")
     (description "The functions for creating temporary files and directories
@@ -3410,8 +3720,7 @@ This is a better maintained fork of the \"temporary\" package.")
          "195fj7w3v03d1y1nm2ylavzrwxjcdbq0lb6zsw1dwyx5jmwfc84h"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-logict" ,ghc-logict)
-       ("ghc-mtl" ,ghc-mtl)))
+     `(("ghc-logict" ,ghc-logict)))
     (home-page
      "https://github.com/feuerbach/smallcheck")
     (synopsis "Property-based testing library")
@@ -3447,7 +3756,7 @@ writing to stdout and other handles.")
 (define-public ghc-case-insensitive
   (package
     (name "ghc-case-insensitive")
-    (version "1.2.0.7")
+    (version "1.2.0.11")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3458,7 +3767,7 @@ writing to stdout and other handles.")
              ".tar.gz"))
        (sha256
         (base32
-         "1j6ahvrz1g5q89y2difyk838yhwjc8z67zr0v2z512qdznc3h38n"))))
+         "1qrpxfirsxckg7jv28f5ah2qc8lh95hp7rnqkbqs1ahcwlbnvkm7"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-hunit" ,ghc-hunit)))
@@ -3481,7 +3790,7 @@ to cases.")
 (define-public ghc-syb
   (package
     (name "ghc-syb")
-    (version "0.6")
+    (version "0.7")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3492,11 +3801,10 @@ to cases.")
              ".tar.gz"))
        (sha256
         (base32
-         "1p3cnqjm13677r4a966zffzhi9b3a321aln8zs8ckqj0d9z1z3d3"))))
+         "1da2zz7gqm4xbkx5vpd74dayx1svaxyl145fl14mq15lbb77sxdq"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-hunit" ,ghc-hunit)
-       ("ghc-mtl" ,ghc-mtl)))
+     `(("ghc-hunit" ,ghc-hunit)))
     (home-page
      "http://www.cs.uu.nl/wiki/GenericProgramming/SYB")
     (synopsis "Scrap Your Boilerplate")
@@ -3525,11 +3833,17 @@ variety of traversals.")
          "1i6cp4b3w7sjk7y1dq3fh6bci2sm5h3lnbbaw9ln19nwncg2wwll"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=hspec")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "fgl.cabal"
+               (("QuickCheck >= 2\\.8 && < 2\\.10")
+                "QuickCheck >= 2.8 && < 2.12")
+               (("hspec >= 2\\.1 && < 2\\.5")
+                "hspec >= 2.1 && < 2.6")))))))
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-hspec" ,ghc-hspec)
+     `(("ghc-hspec" ,ghc-hspec)
        ("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://web.engr.oregonstate.edu/~erwig/fgl/haskell")
     (synopsis
@@ -3543,7 +3857,7 @@ encourages inductive, recursive definitions of graph algorithms.")
 (define-public ghc-chasingbottoms
   (package
     (name "ghc-chasingbottoms")
-    (version "1.3.1.3")
+    (version "1.3.1.4")
     (source
      (origin
        (method url-fetch)
@@ -3551,11 +3865,10 @@ encourages inductive, recursive definitions of graph algorithms.")
                            "ChasingBottoms-" version ".tar.gz"))
        (sha256
         (base32
-         "04jwwjs22mqc4hvpp4c3gpb79inrrq5sapks5khknspv2hslm61q"))))
+         "06cynx6hcbfpky7qq3b3mjjgwbnaxkwin3znbwq4b9ikiw0ng633"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-quickcheck" ,ghc-quickcheck)
+     `(("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-random" ,ghc-random)
        ("ghc-syb" ,ghc-syb)))
     (home-page "https://hackage.haskell.org/package/ChasingBottoms")
@@ -3574,7 +3887,7 @@ Partial and Infinite Values\"}.")
 (define-public ghc-unordered-containers
   (package
     (name "ghc-unordered-containers")
-    (version "0.2.7.1")
+    (version "0.2.9.0")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3584,7 +3897,7 @@ Partial and Infinite Values\"}.")
              "/unordered-containers-" version ".tar.gz"))
        (sha256
         (base32
-         "00npqiphivjp2d7ryqsdavfn4m5v3w1lq2azhdsrfh0wsvqpg4ig"))))
+         "0l4264p0av12cc6i8gls13q8y27x12z2ar4x34n3x59y99fcnc37"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-chasingbottoms" ,ghc-chasingbottoms)
@@ -3604,6 +3917,15 @@ optimized for performance critical use, both in terms of large data quantities
 and high speed.")
     (license license:bsd-3)))
 
+(define-public ghc-unordered-containers-bootstrap
+  (package
+    (inherit ghc-unordered-containers)
+    (name "ghc-unordered-containers-bootstrap")
+    (arguments `(#:tests? #f))
+    (inputs
+     `(("ghc-hashable" ,ghc-hashable-bootstrap)))
+    (properties '(hidden? #t))))
+
 (define-public ghc-uniplate
   (package
     (name "ghc-uniplate")
@@ -3680,7 +4002,7 @@ a variety of ways.")
 (define-public ghc-wl-pprint
   (package
     (name "ghc-wl-pprint")
-    (version "1.2")
+    (version "1.2.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3688,7 +4010,7 @@ a variety of ways.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "166zvk4zwn2zaa9kx66m1av38m34qp6h4i65bri2sfnxgvx0700r"))))
+                "0kn7y8pdrv8f87zhd5mifcl8fy3b2zvnzmzwhdqhxxlyzwiq6z0c"))))
     (build-system haskell-build-system)
     (home-page "https://hackage.haskell.org/package/wl-pprint")
     (synopsis "Wadler/Leijen pretty printer")
@@ -3724,7 +4046,7 @@ colored output using the ansi-terminal package.")
 (define-public ghc-split
   (package
     (name "ghc-split")
-    (version "0.2.3.1")
+    (version "0.2.3.3")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3735,7 +4057,7 @@ colored output using the ansi-terminal package.")
              ".tar.gz"))
        (sha256
         (base32
-         "12660m16c6sib3laaxn6w9s453pyx1b49myrmzfij372vq5bc5bn"))))
+         "04qlmkcyklznl03gsjg95b4nzb6i96gdapqg60rny9szgi7ngk8x"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)))
@@ -3749,7 +4071,7 @@ mainstream languages.")
 (define-public ghc-parsec
   (package
     (name "ghc-parsec")
-    (version "3.1.11")
+    (version "3.1.13.0")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3759,13 +4081,12 @@ mainstream languages.")
              version
              ".tar.gz"))
        (sha256
-        (base32 "0vk7q9j2128q191zf1sg0ylj9s9djwayqk9747k0a5fin4f2b1vg"))))
+        (base32 "1wc09pyn70p8z6llink10c8pqbh6ikyk554911yfwxv1g91swqbq"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)))
     (inputs
-     `(("ghc-text" ,ghc-text)
-       ("ghc-mtl" ,ghc-mtl)))
+     `(("ghc-text" ,ghc-text)))
     (arguments
      `(#:tests? #f)) ; FIXME: currently missing libraries used for tests.
     (home-page
@@ -3780,7 +4101,7 @@ is also parametric in the input stream type.")
 (define-public ghc-parser-combinators
   (package
     (name "ghc-parser-combinators")
-    (version "0.4.0")
+    (version "1.0.0")
     (source
      (origin
        (method url-fetch)
@@ -3789,7 +4110,7 @@ is also parametric in the input stream type.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1azkz0a6ikym02s8wydjcklp7rz8k512bs4s9lp9g1g03m0yj95i"))))
+         "1pwfdsklqwvaynwpdzmx1bs35mp6dpsyaqdnzxnqcrxwf5h8sk75"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/mrkkrp/parser-combinators")
     (synopsis "Commonly useful parser combinators")
@@ -3801,7 +4122,7 @@ combinators.")
 (define-public ghc-megaparsec
   (package
     (name "ghc-megaparsec")
-    (version "6.4.0")
+    (version "6.5.0")
     (source
      (origin
        (method url-fetch)
@@ -3810,11 +4131,13 @@ combinators.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0h9azhs0dfrc359vrbd1jljrg3yfdbwd4p62cxqkn7mnh8913jpd"))))
+         "12iggy7qpf8x93jm64zf0g215xwy779bqyfyjk2bhmxqqr1yzgdy"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("4" "0ij3asi5vwlhbgwsy6nhli9a0qb7926mg809fsgyl1rnhs9fvpx1")))
     (inputs
      `(("ghc-case-insensitive" ,ghc-case-insensitive)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-parser-combinators" ,ghc-parser-combinators)
        ("ghc-scientific" ,ghc-scientific)
        ("ghc-text" ,ghc-text)))
@@ -3849,7 +4172,10 @@ speed, flexibility, and quality of parse errors.")
     (build-system haskell-build-system)
     ;; FIXME: To simplify upgrading all Haskell packages, we leave the tests
     ;; disabled for now.
-    (arguments `(#:tests? #f))
+    (arguments
+     `(#:cabal-revision
+       ("3" "0y5rh8k710i2a3p1h2rghvr5cfg78p5h0kbfi7ifxqqf6pzlyr1x")
+       #:tests? #f))
     (inputs
      `(("ghc-primitive" ,ghc-primitive)
        ("ghc-random" ,ghc-random)
@@ -3881,6 +4207,9 @@ optimisation framework.")
         (base32
          "1y236jb72iab9ska1mc48z6yb0xgwmj45laaqdyjxksd84z7hbrb"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "196frl4akhfk7xf1nxzn8lmq99dxhzhsimanswn9yy7ym8zhki4i")))
     (inputs
      `(("ghc-vector" ,ghc-vector)))
     (native-inputs
@@ -3923,7 +4252,7 @@ interface.")
 (define-public ghc-network
   (package
     (name "ghc-network")
-    (version "2.6.3.1")
+    (version "2.6.3.6")
     (outputs '("out" "doc"))
     (source
      (origin
@@ -3934,7 +4263,7 @@ interface.")
              ".tar.gz"))
        (sha256
         (base32
-         "1rl2gl37cf4k0ddsq93q15fwdz1l25nhl4w205krbh7d5dg5y12p"))))
+         "198mam7ahny48p9fajznbqq16a8ya2gw0xm3gnm1si1rmc4hdplv"))))
     (build-system haskell-build-system)
     ;; The regression tests depend on an unpublished module.
     (arguments `(#:tests? #f))
@@ -3983,7 +4312,7 @@ package into this package.")
 (define-public ghc-ansi-terminal
   (package
     (name "ghc-ansi-terminal")
-    (version "0.6.2.3")
+    (version "0.8.0.4")
     (source
      (origin
        (method url-fetch)
@@ -3993,8 +4322,10 @@ package into this package.")
              ".tar.gz"))
        (sha256
         (base32
-         "0hpfw0k025y681m9ml1c712skrb1p4vh7z5x1f0ci9ww7ssjrh2d"))))
+         "0428gq8m3fdnb7ldcsyk97qcch76hcxbgh2666p6f76fs2qbhg7b"))))
     (build-system haskell-build-system)
+    (inputs
+     `(("ghc-colour" ,ghc-colour)))
     (home-page "https://github.com/feuerbach/ansi-terminal")
     (synopsis "ANSI terminal support for Haskell")
     (description "This package provides ANSI terminal support for Haskell.  It
@@ -4005,7 +4336,7 @@ cursor, and changing the title.")
 (define-public ghc-vault
   (package
     (name "ghc-vault")
-    (version "0.3.0.6")
+    (version "0.3.1.2")
     (source
      (origin
        (method url-fetch)
@@ -4015,11 +4346,12 @@ cursor, and changing the title.")
              ".tar.gz"))
        (sha256
         (base32
-         "0j7gcs440q7qlgzi2hn36crgp2c0w69k40g6vj9hxlm31zk3shqb"))))
+         "072mbrihsdsb8c6xvg6lvk0rqjgvxvi8qkg4n6wwym5hq0pfa04y"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-unordered-containers" ,ghc-unordered-containers)
-       ("ghc-hashable" ,ghc-hashable)))
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-semigroupoids" ,ghc-semigroupoids)))
     (home-page
      "https://github.com/HeinrichApfelmus/vault")
     (synopsis "Persistent store for arbitrary values")
@@ -4043,7 +4375,6 @@ representing a store for a single element.")
        (sha256
         (base32 "0vmmlsj8ggbpwx6fkf5fvb6jp0zpx6iba6b28m80lllr2p8bi8wm"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-mtl" ,ghc-mtl)))
     (home-page "http://rwd.rdockins.name/edison/home/")
     (synopsis "Library of efficient, purely-functional data structures (API)")
     (description
@@ -4059,18 +4390,17 @@ finite maps and priority queues where the priority and element are distinct.")
 (define-public ghc-edisoncore
   (package
     (name "ghc-edisoncore")
-    (version "1.3.1.1")
+    (version "1.3.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/EdisonCore"
                            "/EdisonCore-" version ".tar.gz"))
        (sha256
-        (base32 "06shxmcqxcahcn6zgl64vlqix4fnq53d97drcgsh94qp7gp201ry"))))
+        (base32 "0fgj5iwiv3v2gdgx7kjcr15dcs4x1kvmjspp3p99wyhh0x6h3ikk"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-quickcheck" ,ghc-quickcheck)
+     `(("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-edisonapi" ,ghc-edisonapi)))
     (home-page "http://rwd.rdockins.name/edison/home/")
     (synopsis "Library of efficient, purely-functional data structures")
@@ -4083,7 +4413,7 @@ with various performance characteristics.")
 (define-public ghc-mmorph
   (package
     (name "ghc-mmorph")
-    (version "1.0.6")
+    (version "1.1.2")
     (source
      (origin
        (method url-fetch)
@@ -4093,11 +4423,10 @@ with various performance characteristics.")
              ".tar.gz"))
        (sha256
         (base32
-         "1i8dzrc5qi3ryc9vrrmpn3sihmramsbhhd592w4w2k5g26qr3hql"))))
+         "1gjz1ib968lqybma7my1n19qq6cdj6a7nskrlnwy4jy9jrwzs2n9"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-transformers-compat" ,ghc-transformers-compat)))
+     `(("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://hackage.haskell.org/package/mmorph")
     (synopsis "Monad morphisms")
     (description
@@ -4118,7 +4447,6 @@ manipulating monad transformer stacks.")
         (base32
          "1kfx1bwfjczj93a8yqz1n8snqiq5655qgzwv1lrycry8wb1vzlwa"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-mtl" ,ghc-mtl)))
     (home-page "http://hackage.haskell.org/package/IfElse")
     (synopsis "Monadic control flow with anaphoric variants")
     (description "This library provides functions for control flow inside of
@@ -4129,7 +4457,7 @@ monads with anaphoric variants on @code{if} and @code{when} and a C-like
 (define-public ghc-monad-control
   (package
     (name "ghc-monad-control")
-    (version "1.0.1.0")
+    (version "1.0.2.3")
     (source
      (origin
        (method url-fetch)
@@ -4138,7 +4466,7 @@ monads with anaphoric variants on @code{if} and @code{when} and a C-like
              "/monad-control-" version ".tar.gz"))
        (sha256
         (base32
-         "1x018gi5irznx5rgzmkr2nrgh26r8cvqwkcfc6n6y05pdjf21c6l"))))
+         "1c92833gr6cadidjdp8mlznkpp8lyxl0w3y7d19y8yi3klc3843c"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-stm" ,ghc-stm)
@@ -4224,7 +4552,7 @@ system.")
 (define-public ghc-base-compat
   (package
     (name "ghc-base-compat")
-    (version "0.9.3")
+    (version "0.10.4")
     (source
      (origin
        (method url-fetch)
@@ -4234,7 +4562,7 @@ system.")
              ".tar.gz"))
        (sha256
         (base32
-         "0452l6zf6fjhy4kxqwv6i6hhg6yfx4wcg450k3axpyj30l7jnq3x"))))
+         "0ksp990gxs731mq19rzbxrbs43nazfljjc8krlx5bjqblw3kfs8d"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -4250,7 +4578,7 @@ pragmas in your code.")
 (define-public ghc-blaze-builder
   (package
     (name "ghc-blaze-builder")
-    (version "0.4.0.2")
+    (version "0.4.1.0")
     (source
      (origin
        (method url-fetch)
@@ -4260,7 +4588,7 @@ pragmas in your code.")
              ".tar.gz"))
        (sha256
         (base32
-         "1m33y6p5xldni8p4fzg8fmsyqvkfmnimdamr1xjnsmgm3dkf9lws"))))
+         "05681dih2d8s96an945wkbwl05w8ddbcfx8n3r3ck79ydyb8pz4i"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f))          ; FIXME: Missing test libraries.
     (inputs
@@ -4278,7 +4606,7 @@ interoperate with code that uses the new implementation.")
 (define-public ghc-blaze-markup
   (package
     (name "ghc-blaze-markup")
-    (version "0.8.2.0")
+    (version "0.8.2.1")
     (source
      (origin
        (method url-fetch)
@@ -4287,8 +4615,16 @@ interoperate with code that uses the new implementation.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0m3h3ryxj5r74mv5g5dnfq5jbbwmvkl7ray18vi20d5vd93sydj4"))))
+         "0ih1c3qahkdgzbqihdhny5s313l2m66fbb88w8jbx7yz56y7rawh"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "blaze-markup.cabal"
+               (("tasty            >= 1\\.0  && < 1\\.1")
+                "tasty            >= 1.0  && < 1.2")))))))
     (inputs
      `(("ghc-blaze-builder" ,ghc-blaze-builder)
        ("ghc-text" ,ghc-text)))
@@ -4307,7 +4643,7 @@ library for Haskell.")
 (define-public ghc-easy-file
   (package
     (name "ghc-easy-file")
-    (version "0.2.1")
+    (version "0.2.2")
     (source
      (origin
        (method url-fetch)
@@ -4317,7 +4653,7 @@ library for Haskell.")
              ".tar.gz"))
        (sha256
         (base32
-         "0v75081bx4qzlqy29hh639nzlr7dncwza3qxbzm9njc4jarf31pz"))))
+         "0zmlcz723051qpn8l8vi51c5rx1blwrw4094jcshkmj8p9r2xxaj"))))
     (build-system haskell-build-system)
     (home-page
      "https://github.com/kazu-yamamoto/easy-file")
@@ -4328,7 +4664,7 @@ library for Haskell.")
 (define-public ghc-async
   (package
     (name "ghc-async")
-    (version "2.1.1.1")
+    (version "2.2.1")
     (source
      (origin
        (method url-fetch)
@@ -4338,10 +4674,11 @@ library for Haskell.")
              ".tar.gz"))
        (sha256
         (base32
-         "1qj4fp1ynwg0l453gmm27vgkzb5k5m2hzdlg5rdqi9kf8rqy90yd"))))
+         "09whscli1q5z7lzyq9rfk0bq1ydplh6pjmc6qv0x668k5818c2wg"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-stm" ,ghc-stm)
+       ("ghc-hashable" ,ghc-hashable)
        ("ghc-hunit" ,ghc-hunit)
        ("ghc-test-framework" ,ghc-test-framework)
        ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
@@ -4356,7 +4693,7 @@ will eventually deliver a value of type @code{a}.")
 (define-public ghc-fingertree
   (package
     (name "ghc-fingertree")
-    (version "0.1.3.0")
+    (version "0.1.4.1")
     (source
      (origin
        (method url-fetch)
@@ -4365,7 +4702,7 @@ will eventually deliver a value of type @code{a}.")
              version ".tar.gz"))
        (sha256
         (base32
-         "1ryjj7qrx70ckcjlr02x9zh86kfp76azbxq05r7hawqkaqg44sfs"))))
+         "192fyzv0pn1437wdpqg1l80rswkk4rw3w61r4bq7dhv354bdqy4p"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)
@@ -4410,7 +4747,7 @@ command line options in Haskell.")
 (define-public ghc-base-orphans
   (package
     (name "ghc-base-orphans")
-    (version "0.6")
+    (version "0.7")
     (source
      (origin
        (method url-fetch)
@@ -4420,7 +4757,7 @@ command line options in Haskell.")
              ".tar.gz"))
        (sha256
         (base32
-         "03mdww5j0gwai7aqlx3m71ldmjcr99jzpkcclzjfclk6a6kjla67"))))
+         "057f9npnqk71ccfh95djfkpd54dzazphj06grwxa3fyhwcwxrb8a"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
@@ -4468,6 +4805,9 @@ periodic, on-demand actions in Haskell.")
         (base32
          "16cdzh0bw16nvjnyyy5j9s60malhz4nnazw96vxb0xzdap4m2z74"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "0r2knfcq0b4s652vlvlnfwxlc2mkc2ra9kl8bp4zdn1awmfy0ia5")))
     (inputs
      `(("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://hackage.haskell.org/package/tagged")
@@ -4479,7 +4819,7 @@ having to unsafely pass dummy arguments.")
 (define-public ghc-unbounded-delays
   (package
     (name "ghc-unbounded-delays")
-    (version "0.1.0.9")
+    (version "0.1.1.0")
     (source
      (origin
        (method url-fetch)
@@ -4489,7 +4829,7 @@ having to unsafely pass dummy arguments.")
              ".tar.gz"))
        (sha256
         (base32
-         "1f4h87503m3smhip432q027wj3zih18pmz2rnafh60589ifcl420"))))
+         "1ir9fghbrc214c97bwafk5ck6cacxz1pdnq4i18p604d1b8zg9wa"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/basvandijk/unbounded-delays")
     (synopsis "Unbounded thread delays and timeouts")
@@ -4571,7 +4911,7 @@ Compatibility package for older packages.")
 (define-public ghc-nats
   (package
     (name "ghc-nats")
-    (version "1.1.1")
+    (version "1.1.2")
     (source
      (origin
        (method url-fetch)
@@ -4581,7 +4921,7 @@ Compatibility package for older packages.")
              ".tar.gz"))
        (sha256
         (base32
-         "1kfl2yy97nb7q0j17v96rl73xvi3z4db9bk0xychc76dax41n78k"))))
+         "1v40drmhixck3pz3mdfghamh73l4rp71mzcviipv1y8jhrfxilmr"))))
     (build-system haskell-build-system)
     (arguments `(#:haddock? #f))
     (inputs
@@ -4591,10 +4931,18 @@ Compatibility package for older packages.")
     (description "This library provides the natural numbers for Haskell.")
     (license license:bsd-3)))
 
+(define-public ghc-nats-bootstrap
+  (package
+    (inherit ghc-nats)
+    (name "ghc-nats-bootstrap")
+    (inputs
+     `(("ghc-hashable" ,ghc-hashable-bootstrap)))
+    (properties '((hidden? #t)))))
+
 (define-public ghc-void
   (package
     (name "ghc-void")
-    (version "0.7.1")
+    (version "0.7.2")
     (source
      (origin
        (method url-fetch)
@@ -4604,7 +4952,7 @@ Compatibility package for older packages.")
              ".tar.gz"))
        (sha256
         (base32
-         "1x15x2axz84ndw2bf60vjqljhrb0w95lddaljsxrl0hcd29zvw69"))))
+         "0aygw0yb1h3yhmfl3bkwh5d3h0l4mmsxz7j53vdm6jryl1kgxzyk"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-semigroups" ,ghc-semigroups)
@@ -4617,10 +4965,47 @@ Compatibility package for older packages.")
 given term should not exist.")
     (license license:bsd-3)))
 
+(define-public ghc-invariant
+  (package
+    (name "ghc-invariant")
+    (version "0.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/invariant/invariant-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0aqj7z55632qdg45074kgn9qfdxzb0a2f8lgjzr0l0i4mm2rr37b"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-bifunctors" ,ghc-bifunctors)
+       ("ghc-comonad" ,ghc-comonad)
+       ("ghc-contravariant" ,ghc-contravariant)
+       ("ghc-profunctors" ,ghc-profunctors)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-statevar" ,ghc-statevar)
+       ("ghc-stm" ,ghc-stm)
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-th-abstraction" ,ghc-th-abstraction)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "https://github.com/nfrisby/invariant-functors")
+    (synopsis "Haskell98 invariant functors")
+    (description "Haskell98 invariant functors (also known as exponential
+functors).  For more information, see Edward Kmett's article
+@uref{http://comonad.com/reader/2008/rotten-bananas/, Rotten Bananas}.")
+    (license license:bsd-2)))
+
 (define-public ghc-kan-extensions
   (package
     (name "ghc-kan-extensions")
-    (version "5.0.1")
+    (version "5.2")
     (source
      (origin
        (method url-fetch)
@@ -4630,7 +5015,7 @@ given term should not exist.")
              ".tar.gz"))
        (sha256
         (base32
-         "1qm0kf4krmyjbjynn96ab0h3q117vwcia5nin7n2b8b4f3jrzph1"))))
+         "1lyvyiwwh962j2nnnsqzlvp5zq6z8p3spvhmji99cjvldxc7wwkb"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-adjunctions" ,ghc-adjunctions)
@@ -4638,9 +5023,10 @@ given term should not exist.")
        ("ghc-contravariant" ,ghc-contravariant)
        ("ghc-distributive" ,ghc-distributive)
        ("ghc-free" ,ghc-free)
-       ("ghc-mtl" ,ghc-mtl)
+       ("ghc-invariant" ,ghc-invariant)
        ("ghc-semigroupoids" ,ghc-semigroupoids)
-       ("ghc-tagged" ,ghc-tagged)))
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://github.com/ekmett/kan-extensions/")
     (synopsis "Kan extensions library")
     (description "This library provides Kan extensions, Kan lifts, various
@@ -4679,7 +5065,7 @@ call stacks with different versions of the compiler.")
 (define-public ghc-statevar
   (package
     (name "ghc-statevar")
-    (version "1.1.0.4")
+    (version "1.1.1.1")
     (source
      (origin
        (method url-fetch)
@@ -4689,7 +5075,7 @@ call stacks with different versions of the compiler.")
              ".tar.gz"))
        (sha256
         (base32
-         "1dzz9l0haswgag9x56q7n57kw18v7nhmzkjyr61nz9y9npn8vmks"))))
+         "08r2iw0gdmfs4f6wraaq19vfmkjdbics3dbhw39y7mdjd98kcr7b"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-stm" ,ghc-stm)))
@@ -4702,7 +5088,7 @@ in the @code{IO} monad, like @code{IORef}s or parts of the OpenGL state.")
 (define-public ghc-lens
   (package
     (name "ghc-lens")
-    (version "4.15.4")
+    (version "4.16.1")
     (source
      (origin
        (method url-fetch)
@@ -4710,12 +5096,14 @@ in the @code{IO} monad, like @code{IORef}s or parts of the OpenGL state.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1lkwlnhgpgnsz046mw4qs0fa7h4l012gilrr3nf3spllsy3pnbkl"))))
+         "1im4drhbydbawd6i0jsrzpqihnmx4ywpkg7yg94ddwsw3mxwkgpm"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "11h83lj5mba4grhz1qx3irz10ysm9c3k7k6i6xv2cr60q8xin3ri")))
     (inputs
      `(("ghc-base-orphans" ,ghc-base-orphans)
        ("ghc-bifunctors" ,ghc-bifunctors)
-       ("ghc-doctest" ,ghc-doctest-0.13)
        ("ghc-distributive" ,ghc-distributive)
        ("ghc-exceptions" ,ghc-exceptions)
        ("ghc-free" ,ghc-free)
@@ -4728,7 +5116,6 @@ in the @code{IO} monad, like @code{IORef}s or parts of the OpenGL state.")
        ("ghc-comonad" ,ghc-comonad)
        ("ghc-contravariant" ,ghc-contravariant)
        ("ghc-hashable" ,ghc-hashable)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-profunctors" ,ghc-profunctors)
        ("ghc-semigroups" ,ghc-semigroups)
        ("ghc-tagged" ,ghc-tagged)
@@ -4742,6 +5129,7 @@ in the @code{IO} monad, like @code{IORef}s or parts of the OpenGL state.")
        ("hlint" ,hlint)))
     (native-inputs
      `(("cabal-doctest" ,cabal-doctest)
+       ("ghc-doctest" ,ghc-doctest)
        ("ghc-hunit" ,ghc-hunit)
        ("ghc-test-framework" ,ghc-test-framework)
        ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
@@ -4772,8 +5160,7 @@ indexed variants.")
          "1hiqi7h76shjzs2zj0j8g6wnq2hbiq1hmfafdazr97fba2zl2432"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-text" ,ghc-text)
+     `(("ghc-text" ,ghc-text)
        ("ghc-blaze-html" ,ghc-blaze-html)
        ("ghc-xss-sanitize" ,ghc-xss-sanitize)
        ("ghc-data-default" ,ghc-data-default)
@@ -4791,7 +5178,7 @@ cross-site scripting (@dfn{XSS}) attacks.")
 (define-public ghc-bifunctors
   (package
     (name "ghc-bifunctors")
-    (version "5.5.2")
+    (version "5.5.3")
     (source
      (origin
        (method url-fetch)
@@ -4801,7 +5188,7 @@ cross-site scripting (@dfn{XSS}) attacks.")
              ".tar.gz"))
        (sha256
         (base32
-         "04fbsysm6zl8kmvqgffmrqa9bxl9dl2gibrd51asqzg737mb4ark"))))
+         "1jn9rxg643xnlhrknmjz88nblcpsr45xwjkwwnn5nxpasa7m4d6l"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-base-orphans" ,ghc-base-orphans)
@@ -4822,7 +5209,7 @@ cross-site scripting (@dfn{XSS}) attacks.")
 (define-public ghc-semigroupoids
   (package
     (name "ghc-semigroupoids")
-    (version "5.1")
+    (version "5.2.2")
     (source
      (origin
        (method url-fetch)
@@ -4832,9 +5219,11 @@ cross-site scripting (@dfn{XSS}) attacks.")
              ".tar.gz"))
        (sha256
         (base32
-         "0dgqc59p4xx5cl8qkpm6sn4wd3n59rq7l6din76hf10bnklqrb0n"))))
+         "17i96y4iqj8clcs090lf6k0ij3j16nj14vsfwz0mm9nd6i4gbpp4"))))
     (build-system haskell-build-system)
-    (arguments `(#:tests? #f)) ; FIXME: doctest packagedb propagation problem.
+    (arguments
+     `(#:cabal-revision
+       ("4" "0pqfrxzypjq6z8lgdkzq4vhcyqkpk5326hny0r6snpc3gm78r4ij")))
     (inputs
      `(("ghc-base-orphans" ,ghc-base-orphans)
        ("ghc-transformers-compat" ,ghc-transformers-compat)
@@ -4842,8 +5231,13 @@ cross-site scripting (@dfn{XSS}) attacks.")
        ("ghc-comonad" ,ghc-comonad)
        ("ghc-contravariant" ,ghc-contravariant)
        ("ghc-distributive" ,ghc-distributive)
+       ("ghc-hashable" ,ghc-hashable)
        ("ghc-semigroups" ,ghc-semigroups)
-       ("ghc-tagged" ,ghc-tagged)))
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)))
+    (native-inputs
+     `(("cabal-doctest" ,cabal-doctest)
+       ("ghc-doctest" ,ghc-doctest)))
     (home-page "https://github.com/ekmett/semigroupoids")
     (synopsis "Semigroupoids operations for Haskell")
     (description "This library provides a wide array of (semi)groupoids and
@@ -4859,7 +5253,7 @@ just a @code{Semigroup} are added.")
 (define-public ghc-contravariant
   (package
     (name "ghc-contravariant")
-    (version "1.4")
+    (version "1.4.1")
     (source
      (origin
        (method url-fetch)
@@ -4869,7 +5263,7 @@ just a @code{Semigroup} are added.")
              ".tar.gz"))
        (sha256
         (base32
-         "117fff8kkrvlmr8cb2jpj71z7lf2pdiyks6ilyx89mry6zqnsrp1"))))
+         "1vfhk8c5cxmmakx7rflap1ipkx5q0j5vnlrcz7yz6y53kxhksgf9"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-void" ,ghc-void)
@@ -4885,7 +5279,7 @@ just a @code{Semigroup} are added.")
 (define-public ghc-semigroups
   (package
     (name "ghc-semigroups")
-    (version "0.18.2")
+    (version "0.18.5")
     (source
      (origin
        (method url-fetch)
@@ -4895,7 +5289,7 @@ just a @code{Semigroup} are added.")
              ".tar.gz"))
        (sha256
         (base32
-         "1r6hsn3am3dpf4rprrj4m04d9318v9iq02bin0pl29dg4a3gzjax"))))
+         "17g29h62g1k51ghhvzkw72zksjgi6vs6bfipkj81pqw1dsprcamb"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-nats" ,ghc-nats)
@@ -4914,10 +5308,22 @@ where every element did not have to have an inverse, thus the name
 semigroup.")
     (license license:bsd-3)))
 
+(define-public ghc-semigroups-bootstrap
+  (package
+    (inherit ghc-semigroups)
+    (name "ghc-semigroups-bootstrap")
+    (inputs
+     `(("ghc-nats" ,ghc-nats-bootstrap)
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-unordered-containers" ,ghc-unordered-containers-bootstrap)
+       ("ghc-text" ,ghc-text)
+       ("ghc-hashable" ,ghc-hashable-bootstrap)))
+    (properties '(hidden? #t))))
+
 (define-public ghc-free
   (package
     (name "ghc-free")
-    (version "4.12.4")
+    (version "5.0.2")
     (source
      (origin
        (method url-fetch)
@@ -4927,7 +5333,7 @@ semigroup.")
              ".tar.gz"))
        (sha256
         (base32
-         "1147s393442xf4gkpbq0rd1p286vmykgx85mxhk5d1c7wfm4bzn9"))))
+         "15m3n9vhz7z3kzv1w3wlfa3x8jp4cbrkwmrcjr7jlx39iqffn1gg"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-prelude-extras" ,ghc-prelude-extras)
@@ -4936,9 +5342,10 @@ semigroup.")
        ("ghc-bifunctors" ,ghc-bifunctors)
        ("ghc-comonad" ,ghc-comonad)
        ("ghc-distributive" ,ghc-distributive)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-semigroupoids" ,ghc-semigroupoids)
-       ("ghc-semigroups" ,ghc-semigroups)))
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-transformers-base" ,ghc-transformers-base)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://github.com/ekmett/free/")
     (synopsis "Unrestricted monads for Haskell")
     (description "This library provides free monads, which are useful for many
@@ -4953,7 +5360,7 @@ definition of @code{Monad}.")
 (define-public ghc-adjunctions
   (package
     (name "ghc-adjunctions")
-    (version "4.3")
+    (version "4.4")
     (source
      (origin
        (method url-fetch)
@@ -4963,7 +5370,7 @@ definition of @code{Monad}.")
              ".tar.gz"))
        (sha256
         (base32
-         "1k1ykisf96i4g2zm47c45md7p42c4vsp9r73392pz1g8mx7s2j5r"))))
+         "1sbal7cbhm12crfnfhkk322jnzgx7lhw3jzq0p463bipagsjwz2h"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-profunctors" ,ghc-profunctors)
@@ -4971,11 +5378,15 @@ definition of @code{Monad}.")
        ("ghc-contravariant" ,ghc-contravariant)
        ("ghc-distributive" ,ghc-distributive)
        ("ghc-free" ,ghc-free)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-tagged" ,ghc-tagged)
        ("ghc-semigroupoids" ,ghc-semigroupoids)
        ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)
        ("ghc-void" ,ghc-void)))
+    (native-inputs
+     `(("ghc-generic-deriving" ,ghc-generic-deriving)
+       ("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)))
     (home-page "https://github.com/ekmett/adjunctions/")
     (synopsis "Adjunctions and representable functors")
     (description "This library provides adjunctions and representable functors
@@ -4995,8 +5406,7 @@ for Haskell.")
         (base32 "0a85bdyyvjqs5z4kfhhf758210k9gi9dv42ik66a3jl0z7aix8kx"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-stmonadtrans" ,ghc-stmonadtrans)
+     `(("ghc-stmonadtrans" ,ghc-stmonadtrans)
        ("ghc-transformers-compat" ,ghc-transformers-compat)
        ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-test-framework" ,ghc-test-framework)
@@ -5042,7 +5452,7 @@ monad transformer (instead of the IO monad).")
 (define-public ghc-doctest
   (package
     (name "ghc-doctest")
-    (version "0.11.0")
+    (version "0.16.0")
     (source
      (origin
        (method url-fetch)
@@ -5052,13 +5462,14 @@ monad transformer (instead of the IO monad).")
              ".tar.gz"))
        (sha256
         (base32
-         "0xv4vx1r3mk7cmiwywzrq25545cx3i7imhcx33mk47r88j5c49fj"))))
+         "0hkccch65s3kp0b36h7bqhilnpi4bx8kngncm7ma9vbd3dwacjdv"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f))          ; FIXME: missing test framework
     (inputs
      `(("ghc-syb" ,ghc-syb)
        ("ghc-paths" ,ghc-paths)
        ("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-code-page" ,ghc-code-page)
        ("ghc-hunit" ,ghc-hunit)
        ("ghc-hspec" ,ghc-hspec)
        ("ghc-quickcheck" ,ghc-quickcheck)
@@ -5073,41 +5484,10 @@ It is modeled after doctest for Python, see
 @uref{https://docs.python.org/library/doctest.html, the Doctest website}.")
     (license license:expat)))
 
-(define-public ghc-doctest-0.12
-  (package (inherit ghc-doctest)
-    (name "ghc-doctest")
-    (version "0.12.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/doctest/doctest-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "13h549cpgcvb7c54c7wif28g5wak84dxc3ais0hlqhzk1q6la91a"))))
-    (inputs
-     `(("ghc-code-page" ,ghc-code-page)
-       ,@(package-inputs ghc-doctest)))))
-
-(define-public ghc-doctest-0.13
-  (package (inherit ghc-doctest-0.12)
-    (name "ghc-doctest")
-    (version "0.13.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/"
-                           "doctest/doctest-" version ".tar.gz"))
-       (sha256
-        (base32
-         "08g3nmpqbnbkxc95d65hkhfabwax10qrq51vlynr342npn40mn2b"))))))
-
 (define-public ghc-lifted-base
   (package
     (name "ghc-lifted-base")
-    (version "0.2.3.8")
+    (version "0.2.3.12")
     (source
      (origin
        (method url-fetch)
@@ -5117,7 +5497,7 @@ It is modeled after doctest for Python, see
              ".tar.gz"))
        (sha256
         (base32
-         "17yz4n7q96x4cp8vxai8csn2vmpigxvipkfh48arahf91f0xy18n"))))
+         "1i8p8d3rkdh21bhgjjh32vd7qqjr7jq7p59qds0aw2kmargsjd61"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: Missing testing libraries.
     (inputs
@@ -5195,7 +5575,13 @@ occurrences of a substring (the first in case of overlaps) with another.")
          "1wj8kgjg5bn2yrs4zh9qfjv85cx6w998j9pi39yrbv305944mb9j"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=tasty")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "integer-logarithms.cabal"
+               (("tasty >= 0\\.10 && < 1\\.1")
+                "tasty >= 0.10 && < 1.2")))))))
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-smallcheck" ,ghc-smallcheck)
@@ -5214,6 +5600,14 @@ occurrences of a substring (the first in case of overlaps) with another.")
 in migrated modules.")
     (license license:expat)))
 
+(define-public ghc-integer-logarithms-bootstrap
+  (package
+    (inherit ghc-integer-logarithms)
+    (name "ghc-integer-logarithms-bootstrap")
+    (arguments `(#:tests? #f))
+    (native-inputs '())
+    (properties '(hidden? #t))))
+
 (define-public ghc-scientific
   (package
     (name "ghc-scientific")
@@ -5251,17 +5645,30 @@ and space efficient.  They are represented using
 notation}.")
     (license license:bsd-3)))
 
+(define-public ghc-scientific-bootstrap
+  (package
+    (inherit ghc-scientific)
+    (name "ghc-scientific-bootstrap")
+    (arguments `(#:tests? #f))
+    (inputs
+     `(("ghc-integer-logarithms" ,ghc-integer-logarithms-bootstrap)
+       ("ghc-text" ,ghc-text)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-primitive" ,ghc-primitive)))
+    (native-inputs '())
+    (properties '(hidden? #t))))
+
 (define-public ghc-boxes
   (package
     (name "ghc-boxes")
-    (version "0.1.4")
+    (version "0.1.5")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/boxes/boxes-"
                            version ".tar.gz"))
        (sha256
-        (base32 "1n7xiplzd3s1a39nizwjcgsh3wi2348mp21c3fk19v98ialfjgjf"))))
+        (base32 "1hsnmw95i58d4bkpxby3ddsj1cawypw4mdyb18m393s5i8p7iq9q"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-split" ,ghc-split)
@@ -5286,6 +5693,9 @@ using a simple box model.")
                (base32
                 "17bwghc15mc9pchfd1w46jh2p3wzc86aj6a537wqwxn08rayzcxh"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "1pnidf8w8x0w5fsqgv8hhrw07slmhxwy5x4fikgk0bd6k76aqicb")))
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)
        ("ghc-test-framework" ,ghc-test-framework)
@@ -5334,8 +5744,6 @@ and bytestrings.")
                (base32
                 "1q6v2bynij724fv347mhqxdscwifzrx5jb9mq80608qf638fn717"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
     (inputs
      `(("ghc-syb" ,ghc-syb)
        ("ghc-aeson" ,ghc-aeson)
@@ -5354,25 +5762,6 @@ pandoc to represent structured documents.  It also provides functions for
 building up, manipulating and serialising @code{Pandoc} structures.")
     (license license:bsd-3)))
 
-(define-public ghc-pandoc-types-for-pandoc-1
-  (package (inherit ghc-pandoc-types)
-    (version "1.17.0.5")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/"
-                                  "pandoc-types/pandoc-types-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1csipjdq00iiq77k2wlrg4i7afrzlh8nl585q785xzw7nn45b0n8"))))
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=HUnit")))
-    (inputs
-     `(("ghc-syb" ,ghc-syb)
-       ("ghc-aeson" ,ghc-aeson-for-pandoc-1)
-       ("ghc-string-qq" ,ghc-string-qq)))))
-
 (define-public ghc-texmath
   (package
     (name "ghc-texmath")
@@ -5393,7 +5782,6 @@ building up, manipulating and serialising @code{Pandoc} structures.")
        ("ghc-utf8-string" ,ghc-utf8-string)
        ("ghc-xml" ,ghc-xml)
        ("ghc-parsec" ,ghc-parsec)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-pandoc-types" ,ghc-pandoc-types)))
     (home-page "https://github.com/jgm/texmath")
     (synopsis "Conversion between formats used to represent mathematics")
@@ -5406,27 +5794,6 @@ markup formats).  The TeX reader supports basic LaTeX and AMS extensions, and
 it can parse and apply LaTeX macros.")
     (license license:gpl2+)))
 
-(define-public ghc-texmath-for-pandoc-1
-  (package (inherit ghc-texmath)
-    (version "0.9.4.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/"
-                                  "texmath/texmath-" version ".tar.gz"))
-              (sha256
-               (base32
-                "129q33m56diiv35kdwfb07838wrg0mm88kxdqxfyl1zvf9nzkqkd"))))
-    (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-network-uri" ,ghc-network-uri)
-       ("ghc-pandoc-types" ,ghc-pandoc-types-for-pandoc-1)
-       ("ghc-parsec" ,ghc-parsec)
-       ("ghc-split" ,ghc-split)
-       ("ghc-syb" ,ghc-syb)
-       ("ghc-temporary" ,ghc-temporary)
-       ("ghc-utf8-string" ,ghc-utf8-string)
-       ("ghc-xml" ,ghc-xml)))))
-
 (define-public ghc-regex-pcre-builtin
   (package
     (name "ghc-regex-pcre-builtin")
@@ -5476,7 +5843,7 @@ and utilities for pretty printing.")
 (define-public ghc-highlighting-kate
   (package
     (name "ghc-highlighting-kate")
-    (version "0.6.3")
+    (version "0.6.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -5484,7 +5851,7 @@ and utilities for pretty printing.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "03c4flh4h1jd48bx0qmplax3q8w6wj1dhbh6j0xhaf5h95fbinki"))))
+                "1bqv00gfmrsf0jjr4qf3lhshvfkyzmhbi3pjb6mafbnsyn2k7f6q"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-diff" ,ghc-diff)
@@ -5492,8 +5859,7 @@ and utilities for pretty printing.")
     (native-inputs
      `(("ghc-parsec" ,ghc-parsec)
        ("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-utf8-string" ,ghc-utf8-string)
-       ("ghc-mtl" ,ghc-mtl)))
+       ("ghc-utf8-string" ,ghc-utf8-string)))
     (home-page "https://github.com/jgm/highlighting-kate")
     (synopsis "Syntax highlighting library")
     (description
@@ -5535,7 +5901,7 @@ sources, and does not require prior installation of the C library.")
 (define-public ghc-cmark-gfm
   (package
     (name "ghc-cmark-gfm")
-    (version "0.1.3")
+    (version "0.1.5")
     (source
      (origin
        (method url-fetch)
@@ -5544,7 +5910,7 @@ sources, and does not require prior installation of the C library.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1fkisbrydmdx5h8yad09fzk8h1b1j53r02g7vb81izgdwj9b673k"))))
+         "13b0mqks5c1q989slgsa3ixr5vvkfyic4ynzgv00kgl5qrs7hqk7"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-text" ,ghc-text)))
@@ -5646,7 +6012,7 @@ asynchronous exceptions.")
 (define-public ghc-th-abstraction
   (package
     (name "ghc-th-abstraction")
-    (version "0.2.6.0")
+    (version "0.2.8.0")
     (source
      (origin
        (method url-fetch)
@@ -5655,7 +6021,7 @@ asynchronous exceptions.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0g42h6wnj2awc5ryhbvx009wd8w75pn66bjzsq1z4s3xajd2hbp5"))))
+         "0n17w4q2ykd0nica4sck2wng6md56rfad8x0icl0l8vnzb9nn4ya"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/glguy/th-abstraction")
     (synopsis "Nicer interface for reified information about data types")
@@ -5669,15 +6035,17 @@ Template Haskell.")
 (define-public ghc-th-lift
   (package
     (name "ghc-th-lift")
-    (version "0.7.8")
+    (version "0.7.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "th-lift/th-lift-" version ".tar.gz"))
               (sha256
                (base32
-                "0ay10b78x3969rpqqrgzy8srkl6iby2cljbf3mm17na8x22k7y1c"))))
+                "131360zxb0hazbqwbkk6ab2p77jkxr79bwwm618mrwrwkm3x2g6m"))))
     (build-system haskell-build-system)
+    (inputs
+     `(("ghc-th-abstraction" ,ghc-th-abstraction)))
     (home-page "https://github.com/mboes/th-lift")
     (synopsis "Derive Template Haskell's Lift class for datatypes")
     (description
@@ -5714,7 +6082,7 @@ instances.  This package provides orphan instances for @code{containers},
 (define-public ghc-th-expand-syns
   (package
     (name "ghc-th-expand-syns")
-    (version "0.4.0.0")
+    (version "0.4.4.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -5722,7 +6090,7 @@ instances.  This package provides orphan instances for @code{containers},
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1sjy7a17zwyvlbkc8gklii67sy78wpnw35fyb00lsbnpk4cryd2r"))))
+                "01prlvh3py5hq5ccjidfyp9ixq2zd88dkbsidyjrpkja6v8m43yc"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-syb" ,ghc-syb)))
@@ -5736,7 +6104,7 @@ instances.  This package provides orphan instances for @code{containers},
 (define-public ghc-th-reify-many
   (package
     (name "ghc-th-reify-many")
-    (version "0.1.6")
+    (version "0.1.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -5744,11 +6112,10 @@ instances.  This package provides orphan instances for @code{containers},
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1b76zjxkj0v0n8zj9l0nwav2irm0c43rx6qjihfw8klmmxvx59df"))))
+                "0hzy6hvhvcd6i60vx5cp2b7ggmnnjh9rx4h8bm8xw4grglcaxjnf"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-safe" ,ghc-safe)
+     `(("ghc-safe" ,ghc-safe)
        ("ghc-th-expand-syns" ,ghc-th-expand-syns)))
     (home-page "https://github.com/mgsloan/th-reify-many")
     (synopsis "Recurseively reify template haskell datatype info")
@@ -5762,20 +6129,19 @@ function which generates instances.")
 (define-public ghc-th-orphans
   (package
     (name "ghc-th-orphans")
-    (version "0.13.2")
+    (version "0.13.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "th-orphans/th-orphans-" version ".tar.gz"))
               (sha256
                (base32
-                "0102vkyzpgnp2fys8pvw4khrhrh2y1b8dp1slgvn020vg4s351mc"))))
+                "0sfl3pn9kq9da3ji3lsgzgzy82vz6yvsg80dmakc1jvk7awycibp"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-th-lift" ,ghc-th-lift)
        ("ghc-th-lift-instances" ,ghc-th-lift-instances)
        ("ghc-th-reify-many" ,ghc-th-reify-many)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-generic-deriving" ,ghc-generic-deriving)))
     (native-inputs
      `(("ghc-hspec" ,ghc-hspec)))
@@ -5791,7 +6157,7 @@ package, and that's where the version number started.")
 (define-public ghc-geniplate-mirror
   (package
     (name "ghc-geniplate-mirror")
-    (version "0.7.5")
+    (version "0.7.6")
     (source
      (origin
        (method url-fetch)
@@ -5799,9 +6165,8 @@ package, and that's where the version number started.")
                            "/geniplate-mirror"
                            "/geniplate-mirror-" version ".tar.gz"))
        (sha256
-        (base32 "17vjps2118s5z3k39ij00lkmkxv3mqf8h59wv6qdamlgmhyr36si"))))
+        (base32 "1y0m0bw5zpm1y1y6d9qmxj3swl8j8hlw1shxbr5awycf6k884ssb"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-mtl" ,ghc-mtl)))
     (home-page "https://github.com/danr/geniplate")
     (synopsis "Use Template Haskell to generate Uniplate-like functions")
     (description
@@ -5835,7 +6200,7 @@ info for more informative bug reports.")
 (define-public ghc-haskell-src-meta
   (package
     (name "ghc-haskell-src-meta")
-    (version "0.8.0.2")
+    (version "0.8.0.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -5843,7 +6208,7 @@ info for more informative bug reports.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "12rc4v5dbbbcwdp7j8isvnm9vqpazv124j5kdfwlgwgwjhxi8ysb"))))
+                "08jq156zv4m0fjq6712n99c1jwxnpa6kj6sq8ch0r1l0a1ay6ww4"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
@@ -5877,7 +6242,6 @@ template-haskell abstract syntax.")
        ("ghc-lifted-base" ,ghc-lifted-base)
        ("ghc-mono-traversable" ,ghc-mono-traversable)
        ("ghc-mmorph" ,ghc-mmorph)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-resourcet" ,ghc-resourcet)
        ("ghc-silently" ,ghc-silently)
        ("ghc-transformers-base" ,ghc-transformers-base)
@@ -5903,7 +6267,7 @@ space as enumerator/iteratee and pipes.")
 (define-public ghc-logging-facade
   (package
     (name "ghc-logging-facade")
-    (version "0.1.1")
+    (version "0.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -5911,7 +6275,7 @@ space as enumerator/iteratee and pipes.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "18ldv6rsff480rqpbs3iabjpvn1fhw0i2a0g80jnhxg9ajfz5yb0"))))
+                "0d0lwxxgd16is9aw6v3ps4r9prv3dj8xscmm45fvzq3nicjiawcf"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-hspec" ,ghc-hspec)
@@ -5926,14 +6290,14 @@ back-ends.")
 (define-public ghc-mockery
   (package
     (name "ghc-mockery")
-    (version "0.3.3")
+    (version "0.3.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "mockery/mockery-" version ".tar.gz"))
               (sha256
                (base32
-                "1m7sq2vclgir3qbpngzl3g87ks4034blwwf7p3h02c0jlcwpl5b1"))))
+                "09ypgm3z69gq8mj6y66ss58kbjnk15r8frwcwbqcfbfksfnfv8dp"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-temporary" ,ghc-temporary)
@@ -5951,14 +6315,14 @@ back-ends.")
 (define-public ghc-yaml
   (package
     (name "ghc-yaml")
-    (version "0.8.28")
+    (version "0.8.32")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "yaml/yaml-" version ".tar.gz"))
               (sha256
                (base32
-                "0swgkzkfrwj0ac7lssn8rnrdfmh3lcsdn5fbq2iwv55di6jbc0pp"))))
+                "0cbsyh4ilvjzq1q7pxls43k6pdqxg1l85xzibcwpbvmlvrizh86w"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-conduit" ,ghc-conduit)
@@ -5984,12 +6348,6 @@ back-ends.")
      "This package provides a library to parse and render YAML documents.")
     (license license:bsd-3)))
 
-(define-public ghc-yaml-for-pandoc-1
-  (package (inherit ghc-yaml)
-    (inputs
-     `(("ghc-aeson" ,ghc-aeson-for-pandoc-1)
-       ,@(alist-delete "ghc-aeson" (package-inputs ghc-yaml))))))
-
 (define-public ghc-filemanip
   (package
     (name "ghc-filemanip")
@@ -6003,8 +6361,7 @@ back-ends.")
                 "0ilqr8jv41zxcj5qyicg29m8s30b9v70x6f9h2h2rw5ap8bxldl8"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-unix-compat" ,ghc-unix-compat)))
+     `(("ghc-unix-compat" ,ghc-unix-compat)))
     (home-page "https://github.com/bos/filemanip")
     (synopsis "File and directory manipulation for Haskell")
     (description
@@ -6037,7 +6394,7 @@ do on-demand loading.")
 (define-public ghc-juicypixels
   (package
     (name "ghc-juicypixels")
-    (version "3.2.9.3")
+    (version "3.2.9.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -6045,11 +6402,10 @@ do on-demand loading.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "14s57fgf6kd5n5al2kcvk1aaxbq1ph0r5h8blflrjkx83yl6r8yn"))))
+                "0mf3ihr0xy2wc2wzb9a17g0n3p60x7pvm8akwpvhdy8klvs6r744"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-zlib" ,ghc-zlib)
+     `(("ghc-zlib" ,ghc-zlib)
        ("ghc-vector" ,ghc-vector)
        ("ghc-primitive" ,ghc-primitive)
        ("ghc-mmap" ,ghc-mmap)))
@@ -6063,14 +6419,14 @@ TIFF and GIF formats.")
 (define-public ghc-hslua
   (package
     (name "ghc-hslua")
-    (version "0.9.5")
+    (version "0.9.5.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "hslua/hslua-" version ".tar.gz"))
               (sha256
                (base32
-                "1j2zk7f7nyywg2b0n6kb2yf6ljc7cn2sk9jz0h76g3ag2b70l12n"))))
+                "1rdvv01p214zfjh6fcqjjgqwi8y42wad6cqzhlcv5gvclzw2ck8f"))))
     (build-system haskell-build-system)
     (arguments
      `(#:configure-flags '("-fsystem-lua")))
@@ -6078,7 +6434,6 @@ TIFF and GIF formats.")
      `(("lua" ,lua)
        ("ghc-exceptions" ,ghc-exceptions)
        ("ghc-fail" ,ghc-fail)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-text" ,ghc-text)))
     (native-inputs
      `(("ghc-tasty" ,ghc-tasty)
@@ -6094,27 +6449,6 @@ TIFF and GIF formats.")
 described in @url{https://www.lua.org/}.")
     (license license:expat)))
 
-(define-public ghc-hslua-for-pandoc-1
-  (package (inherit ghc-hslua)
-    (version "0.4.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/"
-                                  "hslua/hslua-" version ".tar.gz"))
-              (sha256
-               (base32
-                "0gqp6qhp4v24kzv2j49kgk7bxqzw0w10x0zr0r2j9wkfavqb9wid"))))
-    (inputs
-     `(("lua" ,lua-5.1)
-       ("ghc-text" ,ghc-text)))
-    (native-inputs
-     `(("ghc-quickcheck" ,ghc-quickcheck)
-       ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
-       ("ghc-hspec" ,ghc-hspec)
-       ("ghc-hspec-contrib" ,ghc-hspec-contrib)
-       ("ghc-hunit" ,ghc-hunit)
-       ("hspec-discover" ,hspec-discover)))))
-
 (define-public ghc-hslua-module-text
   (package
     (name "ghc-hslua-module-text")
@@ -6129,6 +6463,9 @@ described in @url{https://www.lua.org/}.")
         (base32
          "0bcfpb1dhnxp0gr376ai4w7vczr9zrjl1r3r6w7kcxivfkwq9cxf"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "0vajlsd7y6pwa08635q0cx8z5c1c55bk7fvavw7g2vmyvxqjzx6n")))
     (inputs
      `(("ghc-hslua" ,ghc-hslua)
        ("ghc-text" ,ghc-text)))
@@ -6166,18 +6503,17 @@ wrapping a bytestring with stronger and more meaniful name.")
 (define-public ghc-hourglass
   (package
     (name "ghc-hourglass")
-    (version "0.2.10")
+    (version "0.2.12")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "hourglass/hourglass-" version ".tar.gz"))
               (sha256
                (base32
-                "104d1yd84hclprg740nkz60vx589mnm094zriw6zczbgg8nkclym"))))
+                "0jnay5j13vpz6i1rkaj3j0d9v8jfpri499xn3l7wd01f81f5ncs4"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-old-locale" ,ghc-old-locale)))
+     `(("ghc-old-locale" ,ghc-old-locale)))
     (native-inputs
      `(("ghc-tasty" ,ghc-tasty)
        ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
@@ -6205,7 +6541,13 @@ representations of current time.")
         (base32 "0jkca97zyv23yyilp3jydcrzxqhyk27swhzh82llvban5zp8b21y"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "edit-distance.cabal"
+               (("QuickCheck >= 2\\.4 && <2\\.9")
+                "QuickCheck >= 2.4 && < 2.12")))))))
     (inputs
      `(("ghc-random" ,ghc-random)
        ("ghc-test-framework" ,ghc-test-framework)
@@ -6251,14 +6593,14 @@ set, memory copy, ..) and more")
 (define-public ghc-socks
   (package
     (name "ghc-socks")
-    (version "0.5.5")
+    (version "0.5.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "socks/socks-" version ".tar.gz"))
               (sha256
                (base32
-                "0s689w1hh9g8ifl75xhzbv96ir07hwn04b4lgvbxzl8swa9ylir6"))))
+                "0f44qy74i0n6ll3jym0a2ipafkpw1h67amcpqmj8iq95h21wsqzs"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-cereal" ,ghc-cereal)
@@ -6272,7 +6614,7 @@ set, memory copy, ..) and more")
 (define-public ghc-connection
   (package
     (name "ghc-connection")
-    (version "0.2.6")
+    (version "0.2.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
@@ -6280,7 +6622,7 @@ set, memory copy, ..) and more")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1c1prsgad669cmf6qrqlb5hmh0dnam2imijqzpwcr4ja14l6rh83"))))
+                "1swkb9w5vx9ph7x55y51dc0srj2z27nd9ibgn8c0qcl6hx7g9cbh"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-byteable" ,ghc-byteable)
@@ -6300,17 +6642,18 @@ needs.  It provides a very simple API to create sockets to a destination with
 the choice of SSL/TLS, and SOCKS.")
     (license license:bsd-3)))
 
-(define-public ghc-skylighting
+(define-public ghc-skylighting-core
   (package
-    (name "ghc-skylighting")
-    (version "0.5.1")
+    (name "ghc-skylighting-core")
+    (version "0.7.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/skylighting-"
-                                  version "/skylighting-" version ".tar.gz"))
+              (uri (string-append "https://hackage.haskell.org/package/"
+                                  "skylighting-core/skylighting-core-"
+                                  version ".tar.gz"))
               (sha256
                (base32
-                "0l5lhhqqlfaq1fs7pn3n3b25kmazk8p4ahwvhagbrhcbm5hsigdg"))))
+                "066fwmwsd7xcvwlinfk2izlzq0xp8697i6lnbgsbl71jdybyackq"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-aeson" ,ghc-aeson)
@@ -6320,22 +6663,21 @@ the choice of SSL/TLS, and SOCKS.")
        ("ghc-blaze-html" ,ghc-blaze-html)
        ("ghc-case-insensitive" ,ghc-case-insensitive)
        ("ghc-colour" ,ghc-colour)
-       ("ghc-diff" ,ghc-diff)
        ("ghc-hxt" ,ghc-hxt)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-pretty-show" ,ghc-pretty-show)
        ("ghc-regex-pcre-builtin" ,ghc-regex-pcre-builtin)
        ("ghc-safe" ,ghc-safe)
        ("ghc-text" ,ghc-text)
        ("ghc-utf8-string" ,ghc-utf8-string)))
     (native-inputs
-     `(("ghc-hunit" ,ghc-hunit)
+     `(("ghc-diff" ,ghc-diff)
+       ("ghc-hunit" ,ghc-hunit)
+       ("ghc-pretty-show" ,ghc-pretty-show)
        ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-tasty" ,ghc-tasty)
        ("ghc-tasty-golden" ,ghc-tasty-golden)
        ("ghc-tasty-hunit" ,ghc-tasty-hunit)
        ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)))
-    (home-page "https://hackage.haskell.org/package/skylighting")
+    (home-page "https://github.com/jgm/skylighting")
     (synopsis "Syntax highlighting library")
     (description "Skylighting is a syntax highlighting library with support
 for over one hundred languages.  It derives its tokenizers from XML syntax
@@ -6344,61 +6686,26 @@ supported by that framework can be added.  An optional command-line program is
 provided.  Skylighting is intended to be the successor to highlighting-kate.")
     (license license:gpl2)))
 
-(define-public ghc-skylighting-for-pandoc-1
-  (package (inherit ghc-skylighting)
-    (version "0.1.1.5")
+(define-public ghc-skylighting
+  (package
+    (inherit ghc-skylighting-core)
+    (name "ghc-skylighting")
+    (version "0.7.2")
     (source (origin
-              (method git-fetch)
-              ;; We take the sources from Github, because the tarball on
-              ;; hackage does not include the XML files.
-              (uri (git-reference
-                    (url "https://github.com/jgm/skylighting.git")
-                    (commit version)))
-              (file-name (string-append "ghc-skylighting-" version "-checkout"))
+              (method url-fetch)
+              (uri (string-append "https://hackage.haskell.org/package/skylighting-"
+                                  version "/skylighting-" version ".tar.gz"))
               (sha256
                (base32
-                "0z3yv8v2fqqgv6lsf0ff3ld0h2vkg97b2jiry9wn2f1rizwdqmzl"))))
-    (arguments
-     `(#:configure-flags '("-fbootstrap")
-       #:phases
-       (modify-phases %standard-phases
-         ;; After building the skylighting-extract tool we use it to generate
-         ;; syntax source files from the included XML files.  These are then
-         ;; added to the skylighting.cabal file.
-         (add-after 'build 'extract-xml
-           (lambda _
-             (make-file-writable "skylighting.cabal")
-             (apply invoke "./dist/build/skylighting-extract/skylighting-extract"
-                    (find-files "xml" "\\.xml$"))
-             #t))
-         ;; Reconfigure without bootstrap flag
-         (add-after 'extract-xml 'configure-again
-           (lambda* (#:key outputs inputs tests? #:allow-other-keys)
-             ((assoc-ref %standard-phases 'configure)
-              #:outputs outputs
-              #:inputs inputs
-              #:tests? tests?
-              #:configure-flags '("-f-bootstrap"))))
-         (add-after 'configure-again 'build-again
-           (assoc-ref %standard-phases 'build)))))
-    (inputs
-     `(("ghc-aeson" ,ghc-aeson-for-pandoc-1)
-       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
-       ("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-case-insensitive" ,ghc-case-insensitive)
-       ("ghc-diff" ,ghc-diff)
-       ("ghc-hxt" ,ghc-hxt)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-pretty-show" ,ghc-pretty-show)
-       ("ghc-regex-pcre-builtin" ,ghc-regex-pcre-builtin)
-       ("ghc-safe" ,ghc-safe)
-       ("ghc-text" ,ghc-text)
-       ("ghc-utf8-string" ,ghc-utf8-string)))))
+                "1rh3z1a7a4clvksdw1qlpmhxqkfahwypi70k91whgfamzsqpxdch"))))
+    (inputs
+     `(("ghc-skylighting-core" ,ghc-skylighting-core)
+       ,@(package-inputs ghc-skylighting-core)))))
 
 (define-public ghc-doctemplates
   (package
     (name "ghc-doctemplates")
-    (version "0.2.1")
+    (version "0.2.2.1")
     (source
      (origin
        (method url-fetch)
@@ -6407,7 +6714,7 @@ provided.  Skylighting is intended to be the successor to highlighting-kate.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1bfs2kl5j5al2w2y4qpbn68p0xsnb65r7h51l356kpkzc326646p"))))
+         "1gyckfg3kgvzhxw14i7iwrw0crygvsp86sy53bbr1yn7bxbgn33b"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-aeson" ,ghc-aeson)
@@ -6426,29 +6733,6 @@ provided.  Skylighting is intended to be the successor to highlighting-kate.")
      "This package provides a simple text templating system used by pandoc.")
     (license license:bsd-3)))
 
-(define-public ghc-doctemplates-for-pandoc-1
-  (package (inherit ghc-doctemplates)
-    (version "0.1.0.2")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/"
-                           "doctemplates/doctemplates-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "0swal6rjya1293mwvl63jch5fx9ghpsil7qs4v7rpansa0izalmp"))))
-    (build-system haskell-build-system)
-    (inputs
-     `(("ghc-aeson" ,ghc-aeson-for-pandoc-1)
-       ("ghc-blaze-markup" ,ghc-blaze-markup)
-       ("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-text" ,ghc-text)
-       ("ghc-vector" ,ghc-vector)
-       ("ghc-parsec" ,ghc-parsec)
-       ("ghc-unordered-containers" ,ghc-unordered-containers)
-       ("ghc-scientific" ,ghc-scientific)))))
-
 (define-public ghc-pandoc
   (package
     (name "ghc-pandoc")
@@ -6462,6 +6746,20 @@ provided.  Skylighting is intended to be the successor to highlighting-kate.")
         (base32
          "1dqin92w513l7whg5wdgrngnxsj5mb8gppfvn7kjgyv2pdgpy0zy"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "pandoc.cabal"
+               (("tasty >= 0\\.11 && < 1\\.1")
+                "tasty >= 0.11 && < 1.1.1"))))
+         (add-before 'configure 'patch-tests
+           (lambda _
+             ;; These tests fail benignly and have been adjusted upstream:
+             ;; <https://github.com/commercialhaskell/stackage/issues/3719>.
+             (substitute* "test/Tests/Old.hs"
+               (("lhsWriterTests \"html\"") "[]")))))))
     (inputs
      `(("ghc-aeson" ,ghc-aeson)
        ("ghc-aeson-pretty" ,ghc-aeson-pretty)
@@ -6483,7 +6781,6 @@ provided.  Skylighting is intended to be the successor to highlighting-kate.")
        ("ghc-http-client-tls" ,ghc-http-client-tls)
        ("ghc-http-types" ,ghc-http-types)
        ("ghc-juicypixels" ,ghc-juicypixels)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-network" ,ghc-network)
        ("ghc-network-uri" ,ghc-network-uri)
        ("ghc-old-locale" ,ghc-old-locale)
@@ -6525,71 +6822,10 @@ definition lists, tables, and other features.  A compatibility mode is
 provided for those who need a drop-in replacement for Markdown.pl.")
     (license license:gpl2+)))
 
-;; This is the last version of Pandoc 1.x, which is preferred for Rmarkdown.
-(define-public ghc-pandoc-1
-  (package (inherit ghc-pandoc)
-    (version "1.19.2.4")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/pandoc/pandoc-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "0mim429mpakrcnm50csxyqk3ljcx2l26r5grk6w9isnggwgqrq5v"))))
-    (arguments
-     `(#:configure-flags (list "--allow-newer=skylighting")))
-    (inputs
-     `(("ghc-aeson" ,ghc-aeson-for-pandoc-1)
-       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
-       ("ghc-base64-bytestring" ,ghc-base64-bytestring)
-       ("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-blaze-markup" ,ghc-blaze-markup)
-       ("ghc-cmark" ,ghc-cmark)
-       ("ghc-data-default" ,ghc-data-default)
-       ("ghc-deepseq-generics" ,ghc-deepseq-generics)
-       ("ghc-diff" ,ghc-diff)
-       ("ghc-doctemplates" ,ghc-doctemplates-for-pandoc-1)
-       ("ghc-executable-path" ,ghc-executable-path)
-       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
-       ("ghc-filemanip" ,ghc-filemanip)
-       ("ghc-haddock-library" ,ghc-haddock-library)
-       ("ghc-hslua" ,ghc-hslua-for-pandoc-1)
-       ("ghc-http" ,ghc-http)
-       ("ghc-http-client" ,ghc-http-client)
-       ("ghc-http-client-tls" ,ghc-http-client-tls)
-       ("ghc-http-types" ,ghc-http-types)
-       ("ghc-juicypixels" ,ghc-juicypixels)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-network" ,ghc-network)
-       ("ghc-network-uri" ,ghc-network-uri)
-       ("ghc-old-time" ,ghc-old-time)
-       ("ghc-pandoc-types" ,ghc-pandoc-types-for-pandoc-1)
-       ("ghc-parsec" ,ghc-parsec)
-       ("ghc-random" ,ghc-random)
-       ("ghc-scientific" ,ghc-scientific)
-       ("ghc-sha" ,ghc-sha)
-       ("ghc-skylighting" ,ghc-skylighting-for-pandoc-1)
-       ("ghc-syb" ,ghc-syb)
-       ("ghc-tagsoup" ,ghc-tagsoup)
-       ("ghc-temporary" ,ghc-temporary)
-       ("ghc-texmath" ,ghc-texmath-for-pandoc-1)
-       ("ghc-text" ,ghc-text)
-       ("ghc-unordered-containers" ,ghc-unordered-containers)
-       ("ghc-vector" ,ghc-vector)
-       ("ghc-xml" ,ghc-xml)
-       ("ghc-yaml" ,ghc-yaml-for-pandoc-1)
-       ("ghc-zip-archive" ,ghc-zip-archive)
-       ("ghc-zlib" ,ghc-zlib)))
-    (native-inputs
-     `(("ghc-test-framework" ,ghc-test-framework)
-       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
-       ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))))
-
 (define-public ghc-hs-bibutils
   (package
     (name "ghc-hs-bibutils")
-    (version "6.2.0.1")
+    (version "6.6.0.0")
     (source
      (origin
        (method url-fetch)
@@ -6598,7 +6834,7 @@ provided for those who need a drop-in replacement for Markdown.pl.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0c56sjgg82kjcg5rrplnyn7vf02ccsj3kkcbgc87zxlv0j880rjb"))))
+         "0n2sz2zl4naspryd49ii858qkjp2lapns5a2gr8zm6vvn5sh1f0l"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-syb" ,ghc-syb)))
     (home-page "https://hackage.haskell.org/package/hs-bibutils")
@@ -6635,7 +6871,7 @@ better for some purposes.")
 (define-public ghc-typed-process
   (package
     (name "ghc-typed-process")
-    (version "0.2.2.0")
+    (version "0.2.3.0")
     (source
      (origin
        (method url-fetch)
@@ -6644,7 +6880,7 @@ better for some purposes.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0c6gvgvjyncbni9a5bvpbglknd4yclr3d3hfg9bhgahmkj40dva2"))))
+         "0j36vrc9w841m5qbwqra1lwiznx31xfnhin1sm8x2c2739csbpn0"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-async" ,ghc-async)
@@ -6777,13 +7013,19 @@ the @code{conduit} package.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; Many YAML tests (44) are failing do to changes in ghc-yaml:
+         ;; <https://github.com/jgm/pandoc-citeproc/issues/342>.
+         (add-before 'configure 'patch-tests
+           (lambda _
+             (substitute* "tests/test-pandoc-citeproc.hs"
+               (("let allTests = citeprocTests \\+\\+ biblio2yamlTests")
+                "let allTests = citeprocTests"))))
          ;; Tests need to be run after installation.
          (delete 'check)
          (add-after 'install 'post-install-check
            (assoc-ref %standard-phases 'check)))))
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-pandoc-types" ,ghc-pandoc-types)
+     `(("ghc-pandoc-types" ,ghc-pandoc-types)
        ("ghc-pandoc" ,ghc-pandoc)
        ("ghc-tagsoup" ,ghc-tagsoup)
        ("ghc-aeson" ,ghc-aeson)
@@ -6815,19 +7057,6 @@ and also has a mode for converting bibliographic databases a YAML format
 suitable for inclusion in pandoc YAML metadata.")
     (license license:bsd-3)))
 
-(define-public ghc-pandoc-citeproc-with-pandoc-1
-  (let ((for-pandoc-1
-         (package-input-rewriting
-          `((,ghc-aeson        . ,ghc-aeson-for-pandoc-1)
-            (,ghc-yaml         . ,ghc-yaml-for-pandoc-1)
-            (,ghc-texmath      . ,ghc-texmath-for-pandoc-1)
-            (,ghc-pandoc-types . ,ghc-pandoc-types-for-pandoc-1)
-            (,ghc-hslua        . ,ghc-hslua-for-pandoc-1)
-            (,ghc-skylighting  . ,ghc-skylighting-for-pandoc-1)
-            (,ghc-doctemplates . ,ghc-doctemplates-for-pandoc-1)
-            (,ghc-pandoc       . ,ghc-pandoc-1)))))
-    (for-pandoc-1 ghc-pandoc-citeproc)))
-
 (define-public ghc-union-find
   (package
     (name "ghc-union-find")
@@ -6923,7 +7152,7 @@ regular expressions.  Parsers can be built using Applicative interface.")
 (define-public ghc-regex-tdfa
   (package
     (name "ghc-regex-tdfa")
-    (version "1.2.2")
+    (version "1.2.3.1")
     (source
      (origin
        (method url-fetch)
@@ -6932,11 +7161,10 @@ regular expressions.  Parsers can be built using Applicative interface.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0f8x8wyr6m21g8dnxvnvalz5bsq37l125l6qhs0fscbvprsxc4nb"))))
+         "0l7ajnh4hpgggf2a1r9dg0hx2fy679vd2kada5y7r02hy3nfxala"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-parsec" ,ghc-parsec)
+     `(("ghc-parsec" ,ghc-parsec)
        ("ghc-regex-base" ,ghc-regex-base)))
     (home-page "https://github.com/ChrisKuklewicz/regex-tdfa")
     (synopsis "POSIX extended regular expressions in Haskell.")
@@ -7014,6 +7242,16 @@ this problem.")
         (base32
          "18f17aja1ivhr3zyg2cccn2m03hdn5jf5410dndkhf12gvgiqs7y"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "bytestring-handle.cabal"
+               (("QuickCheck >= 2\\.1\\.2 && < 2\\.11")
+                "QuickCheck >= 2.1.2 && < 2.12")
+               (("base >= 4\\.2 && < 4\\.11")
+                "base >= 4.2 && < 4.12")))))))
     (inputs
      `(("ghc-hunit" ,ghc-hunit)
        ("ghc-quickcheck" ,ghc-quickcheck)
@@ -7028,7 +7266,7 @@ this problem.")
 (define-public ghc-tar
   (package
     (name "ghc-tar")
-    (version "0.5.0.3")
+    (version "0.5.1.0")
     (source
      (origin
        (method url-fetch)
@@ -7037,7 +7275,7 @@ this problem.")
              version ".tar.gz"))
        (sha256
         (base32
-         "18qq94j9bm91iswnxq2dm5dws5c7wm4k01q2rpf8py35cf3svnfq"))))
+         "0s2brvaxg5fki2jdkccmnpssiy6a3wjh24p6a3dkkdvjcixnk7f8"))))
     (build-system haskell-build-system)
     ;; FIXME: 2/24 tests fail.
     (arguments `(#:tests? #f))
@@ -7070,8 +7308,6 @@ an index.")
        (sha256
         (base32 "1nr26fnmi5fdjc6d00w13kjhmfyvb5b837d0006w4dj0yxndaksp"))))
     (build-system haskell-build-system)
-    (inputs
-     `(("ghc-mtl" ,ghc-mtl)))
     (home-page "https://hackage.haskell.org/package/STMonadTrans")
     (synopsis "Monad transformer version of the ST monad")
     (description
@@ -7152,7 +7388,7 @@ the @code{mtl-tf} package.")
 (define-public ghc-colour
 (package
   (name "ghc-colour")
-  (version "2.3.3")
+  (version "2.3.4")
   (source
    (origin
      (method url-fetch)
@@ -7161,7 +7397,11 @@ the @code{mtl-tf} package.")
            version ".tar.gz"))
      (sha256
       (base32
-       "1qmn1778xzg07jg9nx4k1spdz2llivpblf6wwrps1qpqjhsac5cd"))))
+       "1sy51nz096sv91nxqk6yk7b92b5a40axv9183xakvki2nc09yhqg"))))
+  (arguments
+   ;; The tests for this package have the following dependency cycle:
+   ;; ghc-test-framework -> ghc-ansi-terminal -> ghc-colour.
+   `(#:tests? #f))
   (build-system haskell-build-system)
   (home-page "https://www.haskell.org/haskellwiki/Colour")
   (synopsis "Model for human colour perception")
@@ -7209,8 +7449,15 @@ supported.  A module of colour names (\"Data.Colour.Names\") is provided.")
          "0ln1szgfy8fa78l3issq4fx3aqnnd54w3cb4wssrfi48vd5rkfjm"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=hspec")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "fgl-arbitrary.cabal"
+               (("QuickCheck >= 2\\.3 && < 2\\.10")
+                "QuickCheck >= 2.3 && < 2.12")
+               (("hspec >= 2\\.1 && < 2\\.5")
+                "hspec >= 2.1 && < 2.6")))))))
     (inputs
      `(("ghc-fgl" ,ghc-fgl)
        ("ghc-quickcheck" ,ghc-quickcheck)
@@ -7236,8 +7483,6 @@ for generating graph-like data structures.")
                (base32
                 "0kj7ap0gnliviq2p8lscw1m06capnsa90vpvcys24nqy5nw2wrp7"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
     (inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-colour" ,ghc-colour)
@@ -7275,7 +7520,7 @@ and edge labels with positional information, etc.
 (define-public ghc-constraints
   (package
     (name "ghc-constraints")
-    (version "0.8")
+    (version "0.10.1")
     (source
      (origin
        (method url-fetch)
@@ -7284,12 +7529,15 @@ and edge labels with positional information, etc.
              version ".tar.gz"))
        (sha256
         (base32
-         "120mmv9rwbahslisc1z8zx9lw7v6hl5fzid4l0hiy5as6ijqgl2c"))))
+         "1xy3vv78jxc17hm0z7qqspxjwv7l2jbcbj670yrl2f053qkfr02q"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-hashable" ,ghc-hashable)
-       ("ghc-mtl" ,ghc-mtl)
+       ("ghc-semigroups" ,ghc-semigroups)
        ("ghc-transformers-compat" ,ghc-transformers-compat)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)))
     (home-page "https://github.com/ekmett/constraints/")
     (synopsis "Constraint manipulation")
     (description
@@ -7301,7 +7549,7 @@ a vocabulary for working with them.")
 (define-public ghc-lifted-async
   (package
     (name "ghc-lifted-async")
-    (version "0.9.0")
+    (version "0.10.0.2")
     (source
      (origin
        (method url-fetch)
@@ -7310,7 +7558,7 @@ a vocabulary for working with them.")
              version ".tar.gz"))
        (sha256
         (base32
-         "00fnwfcnc6niq9jbbb9rap9rkdgv5qhcglwanzc5fi8834j94c1r"))))
+         "1073r512c1x2m1v0jar9bwqg656slg7jd1jhsyj6m8awgx1l1mwf"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-async" ,ghc-async)
@@ -7319,8 +7567,8 @@ a vocabulary for working with them.")
        ("ghc-monad-control" ,ghc-monad-control)
        ("ghc-constraints" ,ghc-constraints)
        ("ghc-hunit" ,ghc-hunit)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-expected-failure" ,ghc-tasty-expected-failure)
        ("ghc-tasty-hunit" ,ghc-tasty-hunit)
        ("ghc-tasty-th" ,ghc-tasty-th)))
     (home-page "https://github.com/maoe/lifted-async")
@@ -7337,7 +7585,7 @@ instance of @code{MonadBase} or @code{MonadBaseControl}.")
 (define ghc-system-filepath-bootstrap
   (package
     (name "ghc-system-filepath-bootstrap")
-    (version "0.4.13.4")
+    (version "0.4.14")
     (source
      (origin
        (method url-fetch)
@@ -7346,7 +7594,7 @@ instance of @code{MonadBase} or @code{MonadBaseControl}.")
              version ".tar.gz"))
        (sha256
         (base32
-         "1yy5zsmmimhg6iaw9fmpwrxvxrgi5s6bfyqfihdsnx4bjvn7sp9l"))))
+         "14yras4pz2dh55xpwmazcgxijvi8913pjgzb9iw50mjq1lycwmhn"))))
     (build-system haskell-build-system)
     (arguments
      `(#:tests? #f))
@@ -7408,8 +7656,7 @@ which can't be decoded in the current locale encoding.")
          "023fbvbqs5gdwm30j5517gbdcc7fvz0md70dgwgpypkskj3i926y"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-unix-compat" ,ghc-unix-compat)
+     `(("ghc-unix-compat" ,ghc-unix-compat)
        ("ghc-system-filepath-bootstrap" ,ghc-system-filepath-bootstrap)
        ("ghc-system-fileio-bootstrap" ,ghc-system-fileio-bootstrap)
        ("ghc-monad-control" ,ghc-monad-control)
@@ -7459,7 +7706,7 @@ easily work with command-line options.")
 (define-public ghc-chell
   (package
     (name "ghc-chell")
-    (version "0.4.0.1")
+    (version "0.4.0.2")
     (source
      (origin
        (method url-fetch)
@@ -7468,7 +7715,7 @@ easily work with command-line options.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0lb95abzxl4a87nfqxsxpb3a39pd52cci43hcvj8615hyhqvs2jz"))))
+         "10ingy9qnbmc8cqh4i9pskcw43l0mzk8f3d76b3qz3fig5ary3j9"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-options-bootstrap" ,ghc-options-bootstrap)
@@ -7504,7 +7751,14 @@ testing strategies.")
        ("ghc-random" ,ghc-random)
        ("ghc-quickcheck" ,ghc-quickcheck)))
     (arguments
-     `(#:tests? #f))
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "chell-quickcheck.cabal"
+               (("QuickCheck >= 2\\.3 && < 2\\.11")
+                "QuickCheck >= 2.3 && < 2.12")))))))
     (home-page "https://john-millikin.com/software/chell/")
     (synopsis "QuickCheck support for the Chell testing library")
     (description "More complex tests for @code{chell}.")
@@ -7524,6 +7778,14 @@ testing strategies.")
         (base32
          "1iicsys9igx7m7n4l2b8djardmjy2ah5ibzp7kzs758h460fq53a"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "chell-quickcheck.cabal"
+               (("QuickCheck >= 2\\.3 && < 2\\.11")
+                "QuickCheck >= 2.3 && < 2.12")))))))
     (inputs
      `(("ghc-chell" ,ghc-chell)
        ("ghc-chell-quickcheck-bootstrap" ,ghc-chell-quickcheck-bootstrap)
@@ -7644,7 +7906,7 @@ and Fortran complex data types.")
 (define-public ghc-hmatrix
   (package
     (name "ghc-hmatrix")
-    (version "0.18.1.0")
+    (version "0.19.0.0")
     (source
      (origin
        (method url-fetch)
@@ -7652,12 +7914,13 @@ and Fortran complex data types.")
              "https://hackage.haskell.org/package/hmatrix/hmatrix-"
              version ".tar.gz"))
        (sha256
-        (base32 "07zkwvg872hfk6jyn4s54ws8mvclynazaxf7fsbqi16dmf9dn61c"))))
+        (base32 "10jd69nby29dggghcyjk6ykyr5wrn97nrv1dkpyrp0y5xm12xssj"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-random" ,ghc-random)
        ("ghc-split" ,ghc-split)
        ("ghc-storable-complex" ,ghc-storable-complex)
+       ("ghc-semigroups" ,ghc-semigroups)
        ("ghc-vector" ,ghc-vector)
        ;;("openblas" ,openblas)
        ("lapack" ,lapack)))
@@ -7674,7 +7937,7 @@ numerical computations based on BLAS and LAPACK.")
 (define-public ghc-hmatrix-gsl
   (package
     (name "ghc-hmatrix-gsl")
-    (version "0.18.0.1")
+    (version "0.19.0.1")
     (source
      (origin
        (method url-fetch)
@@ -7682,7 +7945,7 @@ numerical computations based on BLAS and LAPACK.")
              "https://hackage.haskell.org/package/hmatrix-gsl/hmatrix-gsl-"
              version ".tar.gz"))
        (sha256
-        (base32 "0mflm7zg6c6a5vy092pa429rzpyv5drc1589r3x4fbmvcyqc79gx"))))
+        (base32 "0v6dla426x4ywaq59jm89ql1i42n39iw6z0j378xwb676v9kfxhm"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-hmatrix" ,ghc-hmatrix)
@@ -7700,7 +7963,7 @@ using GSL.")
 (define-public ghc-hmatrix-special
   (package
     (name "ghc-hmatrix-special")
-    (version "0.4.0.1")
+    (version "0.19.0.0")
     (source
      (origin
        (method url-fetch)
@@ -7709,7 +7972,7 @@ using GSL.")
          "https://hackage.haskell.org/package/hmatrix-special/hmatrix-special-"
          version ".tar.gz"))
        (sha256
-        (base32 "0kpcqdchi7ikzhqacy4rh4dxz3v37paxyb84wqa66sysb72wkabj"))))
+        (base32 "1mywr61kr852sbff26n9x95kswx9l4ycbv6s68qsbkh02xzqq7qz"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-hmatrix" ,ghc-hmatrix)
@@ -7773,7 +8036,7 @@ Haskell, using gnuplot for rendering.")
 (define-public ghc-hashtables
   (package
     (name "ghc-hashtables")
-    (version "1.2.1.0")
+    (version "1.2.3.1")
     (source
      (origin
        (method url-fetch)
@@ -7781,10 +8044,8 @@ Haskell, using gnuplot for rendering.")
              "https://hackage.haskell.org/package/hashtables/hashtables-"
              version ".tar.gz"))
        (sha256
-        (base32 "1b6w9xznk42732vpd8ili60k12yq190xnajgga0iwbdpyg424lgg"))))
+        (base32 "1giw9caajr07slf09j7zry9b0kvm4yj9q78zy1mawzi6gk3wglcg"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=vector")))
     (inputs
      `(("ghc-hashable" ,ghc-hashable)
        ("ghc-primitive" ,ghc-primitive)
@@ -7840,14 +8101,14 @@ Accessor to access state in transformers State monad.")
 (define-public ghc-utility-ht
   (package
     (name "ghc-utility-ht")
-    (version "0.0.12")
+    (version "0.0.14")
     (home-page "https://hackage.haskell.org/package/utility-ht")
     (source
      (origin
        (method url-fetch)
        (uri (string-append home-page "/utility-ht-" version ".tar.gz"))
        (sha256
-        (base32 "1vq5bd51rl9l5lgfmaqxgiggddk38hzgngcj7qgrqnalcd1myi54"))))
+        (base32 "1a7bgk7wv7sqbxbiv7kankiimr3wij7zdm7s83zwsf886ghyxhk9"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
     (synopsis "Haskell helper functions for Lists, Maybes, Tuples, Functions")
@@ -7858,7 +8119,7 @@ helper functions for Lists, Maybes, Tuples, Functions.")
 (define-public ghc-gnuplot
   (package
     (name "ghc-gnuplot")
-    (version "0.5.4.1")
+    (version "0.5.5.2")
     (source
      (origin
        (method url-fetch)
@@ -7866,13 +8127,14 @@ helper functions for Lists, Maybes, Tuples, Functions.")
              "mirror://hackage/package/gnuplot/gnuplot-"
              version ".tar.gz"))
        (sha256
-        (base32 "1xz8prw9xjk0rsyrkp9bsmxykzrbhpv9qhhkdapy75mdbmgwjm7s"))))
+        (base32 "1mlppnc13ygjzmf6ldydys4wvy35yb3xjwwfgf9rbi7nfcqjr6mn"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-temporary" ,ghc-temporary)
        ("ghc-utility-ht" ,ghc-utility-ht)
        ("ghc-data-accessor-transformers" ,ghc-data-accessor-transformers)
        ("ghc-data-accessor" ,ghc-data-accessor)
+       ("ghc-semigroups" ,ghc-semigroups)
        ("gnuplot" ,gnuplot)))
     (arguments
      `(#:phases
@@ -7892,7 +8154,7 @@ helper functions for Lists, Maybes, Tuples, Functions.")
 (define-public ghc-hinotify
   (package
     (name "ghc-hinotify")
-    (version "0.3.8.1")
+    (version "0.3.10")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -7900,8 +8162,10 @@ helper functions for Lists, Maybes, Tuples, Functions.")
                     "hinotify-" version ".tar.gz"))
               (sha256
                (base32
-                "03c1f4d7x805zdiq2w26kl09xrfjw19saycdkhnixzv2qcr6xm1p"))))
+                "17ax3n68a5c2ddazp86aciliskrh6znd3bnry0wcllmb6dbpsaxg"))))
     (build-system haskell-build-system)
+    (inputs
+     `(("ghc-async" ,ghc-async)))
     (home-page "https://github.com/kolmodin/hinotify.git")
     (synopsis "Haskell binding to inotify")
     (description "This library provides a wrapper to the Linux kernel's inotify
@@ -7912,7 +8176,7 @@ accessed or modified.")
 (define-public ghc-fsnotify
   (package
     (name "ghc-fsnotify")
-    (version "0.2.1")
+    (version "0.3.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -7920,7 +8184,7 @@ accessed or modified.")
                     "fsnotify-" version ".tar.gz"))
               (sha256
                (base32
-                "0asl313a52qx2w6dw25g845683xsl840bwjh118nkwi5v1xipkzb"))))
+                "19bdbz9wb9jvln6yg6qm0hz0w84bypvkxf0wjhgrgd52f9gidlny"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-text" ,ghc-text)
@@ -7929,7 +8193,9 @@ accessed or modified.")
        ("ghc-hinotify" ,ghc-hinotify)
        ("ghc-tasty" ,ghc-tasty)
        ("ghc-tasty-hunit" ,ghc-tasty-hunit)
-       ("ghc-temporary-rc" ,ghc-temporary-rc)))
+       ("ghc-random" ,ghc-random)
+       ("ghc-shelly" ,ghc-shelly)
+       ("ghc-temporary" ,ghc-temporary)))
     (home-page "https://github.com/haskell-fswatch/hfsnotify")
     (synopsis "Cross platform library for file change notification.")
     (description "Cross platform library for file creation, modification, and
@@ -7940,7 +8206,7 @@ specific Windows, Mac, and Linux file system event notification.")
 (define-public ghc-ieee754
   (package
     (name "ghc-ieee754")
-    (version "0.7.8")
+    (version "0.8.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -7948,7 +8214,7 @@ specific Windows, Mac, and Linux file system event notification.")
                     "ieee754-" version ".tar.gz"))
               (sha256
                (base32
-                "1zvfnnd5nm5kgr60214cdyks0kqdqyzpwk5sdh0s60yr8b7fyjny"))))
+                "1lcs521g9lzy9d7337vg4w7q7s8500rfqy7rcifcz6pm6yfgyb8f"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/patperry/hs-ieee754")
     (synopsis "Utilities for dealing with IEEE floating point numbers")
@@ -7979,7 +8245,7 @@ dependency.")
 (define-public ghc-language-c
   (package
     (name "ghc-language-c")
-    (version "0.5.0")
+    (version "0.8.1")
     (source
      (origin
        (method url-fetch)
@@ -7987,7 +8253,7 @@ dependency.")
                            "language-c/language-c-" version ".tar.gz"))
        (sha256
         (base32
-         "08i2bl7jmmymn2sldzlbz6ig7lx3wfwhlpadzibs3fx72z08pmc6"))))
+         "0sdkjj0hq8p69fcdm6ljbjkjvrsrb8a6rl5dq6dj6byj32ajrm3d"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-syb" ,ghc-syb)))
     (native-inputs
@@ -8004,7 +8270,7 @@ and a large set of GNU extensions.")
 (define-public ghc-markdown-unlit
   (package
     (name "ghc-markdown-unlit")
-    (version "0.4.0")
+    (version "0.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -8012,7 +8278,7 @@ and a large set of GNU extensions.")
                     "markdown-unlit-" version ".tar.gz"))
               (sha256
                (base32
-                "1kj2bffl7ndd8ygwwa3r1mbpwbxbfhyfgnbla8k8g9i6ffp0qrbw"))))
+                "1gy79vr85vcp13rdjh0hz7zv6daqqffww4j0cqn2lpjjh9xhsbg7"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-base-compat" ,ghc-base-compat)
@@ -8062,7 +8328,7 @@ Rust syntax.  It is intended to be useful for two different purposes:
 (define-public ghc-wave
   (package
     (name "ghc-wave")
-    (version "0.1.4")
+    (version "0.1.5")
     (source (origin
       (method url-fetch)
       (uri (string-append
@@ -8071,8 +8337,16 @@ Rust syntax.  It is intended to be useful for two different purposes:
              ".tar.gz"))
       (sha256
         (base32
-          "1g5nmqfk6p25v9ismwz4i66ay91bd1qh39xwj0hm4z6a5mw8frk8"))))
+          "03zycmwrchhqvi37fdvlzz2d1vl4hy0i8xyys1zznw38qfq0h2i5"))))
     (build-system haskell-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "wave.cabal"
+               (("temporary.* < 1\\.3")
+                "temporary >= 1.1 && < 1.4")))))))
     (inputs
      `(("ghc-cereal" ,ghc-cereal)
        ("ghc-data-default-class"
@@ -8102,8 +8376,7 @@ files in Haskell.")
                 "0as5gvlh6pi2gflakp695qnlizyyp059dqrhvjl4gjxalja6xjnp"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-network" ,ghc-network)
+     `(("ghc-network" ,ghc-network)
        ("ghc-old-locale" ,ghc-old-locale)))
     (native-inputs
      `(("ghc-hunit" ,ghc-hunit)))
@@ -8118,14 +8391,14 @@ handler built in.")
 (define-public ghc-unexceptionalio
   (package
     (name "ghc-unexceptionalio")
-    (version "0.3.0")
+    (version "0.4.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/"
                            "unexceptionalio-" version "/" "unexceptionalio-"
                            version ".tar.gz"))
-       (sha256 (base32 "1f7h7zwky4scdcyjspg4ksfh7x6yra0wjybxq70p7vcwpgk2nzlj"))))
+       (sha256 (base32 "09gynk472l7nn5l2w320n4dwigwp0wh0shfp6dyw6r5h2jdxz18p"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/singpolyma/unexceptionalio")
     (synopsis "IO without any non-error, synchronous exceptions")
@@ -8136,7 +8409,7 @@ handled safely, this is what you're left with.")
 (define-public ghc-json
   (package
     (name "ghc-json")
-    (version "0.9.1")
+    (version "0.9.2")
     (source
      (origin
        (method url-fetch)
@@ -8144,11 +8417,10 @@ handled safely, this is what you're left with.")
                            "json-" version ".tar.gz"))
        (sha256
         (base32
-         "18l5027vc68hnnxrxlnyl59vkkg95a92m1zzms0dqiby2r6pxdcn"))))
+         "13kkfgx58z18jphbg56jn08jn72wi3kvfndlwwx87hqwg7x1dfz6"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-syb" ,ghc-syb)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-text" ,ghc-text)
        ("ghc-parsec" ,ghc-parsec)))
     (home-page "https://hackage.haskell.org/package/json")
@@ -8159,61 +8431,88 @@ JSON (JavaScript Object Notation) is a lightweight data-interchange format.")
     (license license:bsd-3)))
 
 (define-public ghc-esqueleto
-  (package
-    (name "ghc-esqueleto")
-    (version "2.5.3")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/"
-                           "esqueleto/esqueleto-" version ".tar.gz"))
-       (sha256
-        (base32
-         "10n49rzqmblky7pwjnysalyy6nacmxfms8dqbsdv6hlyzr8pb69x"))))
-    (build-system haskell-build-system)
-    (inputs
-     `(("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-conduit" ,ghc-conduit)
-       ("ghc-monad-logger" ,ghc-monad-logger)
-       ("ghc-persistent" ,ghc-persistent)
-       ("ghc-resourcet" ,ghc-resourcet)
-       ("ghc-tagged" ,ghc-tagged)
-       ("ghc-text" ,ghc-text)
-       ("ghc-unordered-containers" ,ghc-unordered-containers)))
-    (native-inputs
-     `(("ghc-hspec" ,ghc-hspec)
-       ("ghc-hunit" ,ghc-hunit)
-       ("ghc-monad-control" ,ghc-monad-control)
-       ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
-       ("ghc-persistent-template" ,ghc-persistent-template)
-       ("ghc-quickcheck" ,ghc-quickcheck)))
-    (home-page "https://github.com/bitemyapp/esqueleto")
-    (synopsis "Type-safe embedded domain specific language for SQL queries")
-    (description "This library provides a type-safe embedded domain specific
+  (let ((version "2.5.3")
+        (revision "1")
+        (commit "b81e0d951e510ebffca03c5a58658ad884cc6fbd"))
+    (package
+      (name "ghc-esqueleto")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/bitemyapp/esqueleto")
+               (commit commit)))
+         (sha256
+          (base32
+           "0lz1qxms7cfg5p3j37inlych0r2fwhm8xbarcys3df9m7jy9nixa"))))
+      (build-system haskell-build-system)
+      (arguments
+       `(#:haddock? #f  ; Haddock reports an internal error.
+         #:phases
+         (modify-phases %standard-phases
+           ;; This package normally runs tests for the MySQL, PostgreSQL, and
+           ;; SQLite backends.  Since we only have Haskell packages for
+           ;; SQLite, we remove the other two test suites.  FIXME: Add the
+           ;; other backends and run all three test suites.
+           (add-before 'configure 'remove-non-sqlite-test-suites
+             (lambda _
+               (use-modules (ice-9 rdelim))
+               (with-atomic-file-replacement "esqueleto.cabal"
+                 (lambda (in out)
+                   (let loop ((line (read-line in 'concat)) (deleting? #f))
+                     (cond
+                      ((eof-object? line) #t)
+                      ((string-every char-set:whitespace line)
+                       (unless deleting? (display line out))
+                       (loop (read-line in 'concat) #f))
+                      ((member line '("test-suite mysql\n"
+                                      "test-suite postgresql\n"))
+                       (loop (read-line in 'concat) #t))
+                      (else
+                       (unless deleting? (display line out))
+                       (loop (read-line in 'concat) deleting?)))))))))))
+      (inputs
+       `(("ghc-blaze-html" ,ghc-blaze-html)
+         ("ghc-conduit" ,ghc-conduit)
+         ("ghc-monad-logger" ,ghc-monad-logger)
+         ("ghc-persistent" ,ghc-persistent)
+         ("ghc-resourcet" ,ghc-resourcet)
+         ("ghc-tagged" ,ghc-tagged)
+         ("ghc-text" ,ghc-text)
+         ("ghc-unliftio" ,ghc-unliftio)
+         ("ghc-unordered-containers" ,ghc-unordered-containers)))
+      (native-inputs
+       `(("ghc-hspec" ,ghc-hspec)
+         ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
+         ("ghc-persistent-template" ,ghc-persistent-template)))
+      (home-page "https://github.com/bitemyapp/esqueleto")
+      (synopsis "Type-safe embedded domain specific language for SQL queries")
+      (description "This library provides a type-safe embedded domain specific
 language (EDSL) for SQL queries that works with SQL backends as provided by
 @code{ghc-persistent}.  Its language closely resembles SQL, so you don't have
 to learn new concepts, just new syntax, and it's fairly easy to predict the
 generated SQL and optimize it for your backend.")
-    (license license:bsd-3)))
+      (license license:bsd-3))))
 
 (define-public shellcheck
   (package
     (name "shellcheck")
-    (version "0.4.6")
+    (version "0.5.0")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://github.com/koalaman/shellcheck/archive/"
-                           "v" version ".tar.gz"))
+       (uri (string-append
+             "https://hackage.haskell.org/package/ShellCheck/ShellCheck-"
+             version ".tar.gz"))
        (sha256
         (base32
-         "1qkd69lc34n3l23ss9rq1azvx49bfq4hi4bmaj76rgxybscxhg0w"))
+         "0z1hscbr11hwkq8k1v0vaa947hb9m6k4cm831jk1gpj8dxrk151b"))
        (file-name (string-append name "-" version ".tar.gz"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-quickcheck" ,ghc-quickcheck)
-       ("ghc-json" ,ghc-json)
-       ("ghc-mtl" ,ghc-mtl)
+     `(("ghc-aeson" ,ghc-aeson)
+       ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-parsec" ,ghc-parsec)
        ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
     (home-page "https://github.com/koalaman/shellcheck")
@@ -8235,7 +8534,7 @@ advanced user's otherwise working script to fail under future circumstances.
 (define-public ghc-simple-sendfile
   (package
     (name "ghc-simple-sendfile")
-    (version "0.2.25")
+    (version "0.2.27")
     (source
      (origin
        (method url-fetch)
@@ -8244,7 +8543,7 @@ advanced user's otherwise working script to fail under future circumstances.
                            "simple-sendfile-" version ".tar.gz"))
        (sha256
         (base32
-         "0k99j9xfcf83c55jmn202hdinhjaa4yn3dal4rvjk2w2rlhqirha"))))
+         "1bwwqzcm56m2w4ymsa054sxmpbj76h9pvb0jf8zxp8lr41cp51gn"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-conduit" ,ghc-conduit)
@@ -8283,7 +8582,7 @@ bytestrings and their hexademical representation.")
 (define-public ghc-psqueues
   (package
     (name "ghc-psqueues")
-    (version "0.2.6.0")
+    (version "0.2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -8292,10 +8591,8 @@ bytestrings and their hexademical representation.")
                            "psqueues-" version ".tar.gz"))
        (sha256
         (base32
-         "0n39s1i88j6s7vvsdhpbhcr3gpbwlzabwcc3nbd7nqb4kb4i0sls"))))
+         "1sjgc9bxh63kkdp59nbirx3xazr02ia5yhp4f4a0jnq1hj465wsc"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck")))
     (inputs
      `(("ghc-hashable" ,ghc-hashable)))
     (native-inputs
@@ -8350,7 +8647,7 @@ Typical applications of Priority Search Queues include:
 (define-public ghc-glob
   (package
     (name "ghc-glob")
-    (version "0.9.1")
+    (version "0.9.2")
     (source
      (origin
        (method url-fetch)
@@ -8359,7 +8656,7 @@ Typical applications of Priority Search Queues include:
                            "Glob-" version ".tar.gz"))
        (sha256
         (base32
-         "0rzmsknl02p332dxmm36fyrz3dpma7bchn0ymyjipxvqil20pjw0"))))
+         "1rbwcq9w9951qsnp13vqcm9r01yax2yh1wk8s4zxa3ckk9717iwg"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-dlist" ,ghc-dlist)
@@ -8380,7 +8677,7 @@ matching patterns against file paths.")
 (define-public ghc-errors
   (package
     (name "ghc-errors")
-    (version "2.2.2")
+    (version "2.3.0")
     (source
      (origin
        (method url-fetch)
@@ -8389,7 +8686,7 @@ matching patterns against file paths.")
                            "errors-" version ".tar.gz"))
        (sha256
         (base32
-         "13sflhglcm5skwrxb48fw96skdcx7ydiy4zg22200733pxhjncpn"))))
+         "0x8znwn31qcx6kqx99wp7bc86kckfb39ncz3zxvj1s07kxlfawk7"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-exceptions" ,ghc-exceptions)
@@ -8522,7 +8819,7 @@ between 2 and 3 times faster than the Mersenne Twister.")
 (define-public ghc-vector-algorithms
   (package
     (name "ghc-vector-algorithms")
-    (version "0.7.0.1")
+    (version "0.7.0.4")
     (source
      (origin
        (method url-fetch)
@@ -8531,23 +8828,10 @@ between 2 and 3 times faster than the Mersenne Twister.")
                            "vector-algorithms-" version ".tar.gz"))
        (sha256
         (base32
-         "0w4hf598lpxfg58rnimcqxrbnpqq2jmpjx82qa5md3q6r90hlipd"))))
+         "0mfa8ig9v69l41p2vb5jl4qmaln5y1rlzarr2mlgm8g1nvq8qqdg"))))
     (build-system haskell-build-system)
-    ;; The limits have been adjusted in a revision of the cabal file.
-    (arguments
-     '(#:configure-flags (list "--allow-newer=vector")
-       #:phases
-       (modify-phases %standard-phases
-         ;; The tests cannot be built due to type errors.
-         (add-after 'unpack 'do-not-build-quickcheck-tests
-           (lambda _
-             (substitute* "vector-algorithms.cabal"
-               (("\\!flag\\(properties\\)") "True"))
-             #t)))))
     (inputs
-     `(("ghc-vector" ,ghc-vector)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-mwc-random" ,ghc-mwc-random)))
+     `(("ghc-vector" ,ghc-vector)))
     (native-inputs
      `(("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://github.com/bos/math-functions")
@@ -8622,8 +8906,7 @@ module for more details.")
     (build-system haskell-build-system)
     (inputs `(("ghc-abstract-par" ,ghc-abstract-par)
               ("ghc-cereal" ,ghc-cereal)
-              ("ghc-random" ,ghc-random)
-              ("ghc-mtl" ,ghc-mtl)))
+              ("ghc-random" ,ghc-random)))
     (home-page "https://github.com/simonmar/monad-par")
     (synopsis "Combinators and extra features for Par monads for Haskell")
     (description "This Haskell package provides additional data structures,
@@ -8685,8 +8968,7 @@ This package also includes a simple reference implementation based on
               ("ghc-abstract-deque" ,ghc-abstract-deque)
               ("ghc-monad-par-extras" ,ghc-monad-par-extras)
               ("ghc-mwc-random" ,ghc-mwc-random)
-              ("ghc-parallel" ,ghc-parallel)
-              ("ghc-mtl" ,ghc-mtl)))
+              ("ghc-parallel" ,ghc-parallel)))
     (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)
                      ("ghc-hunit" ,ghc-hunit)
                      ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
@@ -8717,6 +8999,11 @@ that are much lighter weight than IO-threads.")
         (base32
          "0y27gafkib0x0fn39qfn2rkgsfrm09ng35sbb5dwr7rclhnxz59l"))))
     (build-system haskell-build-system)
+    (arguments
+     '(#:cabal-revision
+       ("2" "1bx70yqkn62ii17fjv3pig4hklrzkqd09zj67zzjiyjzmn04fir3")
+       ;; Two tests fail: "Discrete CDF is OK" and "Quantile is CDF inverse".
+       #:tests? #f))
     (inputs
      `(("ghc-aeson" ,ghc-aeson)
        ("ghc-base-orphans" ,ghc-base-orphans)
@@ -8736,8 +9023,6 @@ that are much lighter weight than IO-threads.")
        ("ghc-test-framework" ,ghc-test-framework)
        ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
        ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
-    (arguments
-     `(#:tests? #f)) ; FIXME: Test-Suite `spec` fails.
     (home-page "https://github.com/bos/mwc-random")
     (synopsis "Haskell library of statistical types, data, and functions")
     (description "This library provides a number of common functions
@@ -8765,7 +9050,7 @@ and regression and autocorrelation analysis.
 (define-public ghc-chunked-data
   (package
     (name "ghc-chunked-data")
-    (version "0.3.0")
+    (version "0.3.1")
     (source
      (origin
        (method url-fetch)
@@ -8774,7 +9059,7 @@ and regression and autocorrelation analysis.
                            "chunked-data-" version ".tar.gz"))
        (sha256
         (base32
-         "0bszq6fijnr4pmadzz89smj7kfmzx0ca3wd9ga8gv0in9jk9vgp1"))))
+         "16m7y7fwrirbjbqqcsfmr4yxa9qvfax6r7pw0zl9ky71ms0wa47p"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-vector" ,ghc-vector)
               ("ghc-semigroups" ,ghc-semigroups)
@@ -8789,7 +9074,7 @@ classy-prelude.")
 (define-public ghc-base-prelude
   (package
     (name "ghc-base-prelude")
-    (version "1.2.0.1")
+    (version "1.3")
     (source
      (origin
        (method url-fetch)
@@ -8798,7 +9083,7 @@ classy-prelude.")
                            "base-prelude-" version ".tar.gz"))
        (sha256
         (base32
-         "17hivs7lmsglagdlzxd9q9zsddmgqin2788mpq911zwnb57lj6l1"))))
+         "1zk728sd09hh2r4xwz4lazsrrgg5cshydn64932sm0vckplndk73"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/nikita-volkov/base-prelude")
     (synopsis "The most complete prelude formed solely from the Haskell's base
@@ -8844,7 +9129,7 @@ statically known size.")
 (define-public ghc-contravariant-extras
   (package
     (name "ghc-contravariant-extras")
-    (version "0.3.3.1")
+    (version "0.3.4")
     (source
      (origin
        (method url-fetch)
@@ -8853,11 +9138,13 @@ statically known size.")
                            "contravariant-extras-" version ".tar.gz"))
        (sha256
         (base32
-         "1mbrgjybdx8fjdck4ldwi8955w4qnmm0ql56zix7dyn0s7s9spgk"))))
+         "0gg62ccl94kvh7mnvdq09pifqxjx2kgs189si90nmg44bafj7a9n"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-tuple-th" ,ghc-tuple-th)
-              ("ghc-contravariant" ,ghc-contravariant)
-              ("ghc-base-prelude" ,ghc-base-prelude)))
+    (inputs
+     `(("ghc-tuple-th" ,ghc-tuple-th)
+       ("ghc-contravariant" ,ghc-contravariant)
+       ("ghc-base-prelude" ,ghc-base-prelude)
+       ("ghc-semigroups" ,ghc-semigroups)))
     (home-page "https://github.com/nikita-volkov/contravariant-extras")
     (synopsis "Extras for the @code{ghc-contravariant} Haskell package")
     (description "This Haskell package provides extras for the
@@ -8867,7 +9154,7 @@ statically known size.")
 (define-public ghc-monadrandom
   (package
     (name "ghc-monadrandom")
-    (version "0.4.2.3")
+    (version "0.5.1.1")
     (source
      (origin
        (method url-fetch)
@@ -8876,10 +9163,9 @@ statically known size.")
                            "MonadRandom-" version ".tar.gz"))
        (sha256
         (base32
-         "1h1nhswrcmhy3mq6vd530p0df51fcnnf4csbwnljar7cf0mb2h6y"))))
+         "0w44jl1n3kqvqaflh82l1wj3xxbhzfs3kf4m8rk7w6fgg8llmnmb"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-transformers-compat" ,ghc-transformers-compat)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-primitive" ,ghc-primitive)
               ("ghc-fail" ,ghc-fail)
               ("ghc-random" ,ghc-random)))
@@ -8892,7 +9178,7 @@ which consume random values.")
 (define-public ghc-either
   (package
     (name "ghc-either")
-    (version "4.4.1.1")
+    (version "5.0.1")
     (source
      (origin
        (method url-fetch)
@@ -8901,19 +9187,22 @@ which consume random values.")
                            "either-" version ".tar.gz"))
        (sha256
         (base32
-         "1lrlwqqnm6ibfcydlv5qvvssw7bm0c6yypy0rayjzv1znq7wp1xh"))))
+         "064hjfld7dkzs78sy30k5qkiva3hx24rax6dvzz5ygr2c0zypdkc"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-bifunctors" ,ghc-bifunctors)
               ("ghc-exceptions" ,ghc-exceptions)
               ("ghc-free" ,ghc-free)
               ("ghc-monad-control" ,ghc-monad-control)
               ("ghc-manodrandom" ,ghc-monadrandom)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-mmorph" ,ghc-mmorph)
               ("ghc-profunctors" ,ghc-profunctors)
               ("ghc-semigroups" ,ghc-semigroups)
               ("ghc-semigroupoids" ,ghc-semigroupoids)
               ("ghc-transformers-base" ,ghc-transformers-base)))
+    (native-inputs
+     `(("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)))
     (home-page "https://github.com/ekmett/either")
     (synopsis "Provides an either monad transformer for Haskell")
     (description "This Haskell package provides an either monad transformer.")
@@ -8942,7 +9231,7 @@ ByteStrings in the style of other common *nix hex dump tools.")
 (define-public ghc-network-info
   (package
     (name "ghc-network-info")
-    (version "0.2.0.8")
+    (version "0.2.0.10")
     (source
      (origin
        (method url-fetch)
@@ -8951,7 +9240,7 @@ ByteStrings in the style of other common *nix hex dump tools.")
                            "network-info-" version ".tar.gz"))
        (sha256
         (base32
-         "0xndvg776241fgjmynxfpy81f1csjmh8dg33yf0c8m71ychz3pzc"))))
+         "0anmgzcpnz7nw3n6vq0r25m1s9l2svpwi83wza0lzkrlbnbzd02n"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/jystic/network-info")
     (synopsis "Access the local computer's basic network configuration")
@@ -8976,8 +9265,16 @@ IPv4, IPv6 and MAC addresses.")
          "1zdka5jnm1h6k36w3nr647yf3b5lqb336g3fkprhd6san9x52xlj"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=HUnit")))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'strip-test-framework-constraints
+           (lambda _
+             (substitute* "uuid-types.cabal"
+               (("HUnit >=1\\.2 && < 1\\.4") "HUnit")
+               (("QuickCheck >=2\\.4 && < 2\\.9") "QuickCheck")
+               (("tasty >= 0\\.10 && < 0\\.12") "tasty")
+               (("tasty-hunit == 0\\.9\\.\\*") "tasty-hunit")
+               (("tasty-quickcheck == 0\\.8\\.\\*") "tasty-quickcheck")))))))
     (inputs `(("ghc-hashable" ,ghc-hashable)
               ("ghc-random" ,ghc-random)
               ("ghc-text" ,ghc-text)))
@@ -9009,8 +9306,18 @@ functions.")
          "09xhk42yhxvqmka0iqrv3338asncz8cap3j0ic0ps896f2581b6z"))))
     (build-system haskell-build-system)
     (arguments
-     `(#:configure-flags (list "--allow-newer=QuickCheck"
-                               "--allow-newer=HUnit")))
+     `(#:cabal-revision
+       ("2" "0m185q62jkfb5jsv358nxbnrkv8y8hd0qqvgvh22wvc5g9ipz0r9")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'strip-test-framework-constraints
+           (lambda _
+             (substitute* "uuid.cabal"
+               (("HUnit            >= 1\\.2   && < 1\\.4") "HUnit")
+               (("QuickCheck       >= 2\\.4   && < 2\\.10") "QuickCheck")
+               (("tasty            >= 0\\.10  && < 0\\.12") "tasty")
+               (("tasty-hunit      == 0\\.9\\.\\*") "tasty-hunit")
+               (("tasty-quickcheck == 0\\.8\\.\\*") "tasty-quickcheck")))))))
     (inputs `(("ghc-cryptohash-sha1" ,ghc-cryptohash-sha1)
               ("ghc-cryptohash-md5" ,ghc-cryptohash-md5)
               ("ghc-entropy" ,ghc-entropy)
@@ -9032,7 +9339,7 @@ parsing and printing @dfn{Universally Unique Identifiers} or UUIDs.")
 (define-public ghc-rebase
   (package
     (name "ghc-rebase")
-    (version "1.1")
+    (version "1.2.4")
     (source
      (origin
        (method url-fetch)
@@ -9041,7 +9348,7 @@ parsing and printing @dfn{Universally Unique Identifiers} or UUIDs.")
                            "rebase-" version ".tar.gz"))
        (sha256
         (base32
-         "1qkhnpcc4g2vd6jmbf3b6psqkan6hyawqzrwzqdd931hsb02l6ia"))))
+         "1gah2qwfpzwamnikbc5h4nv6dgvv9h16di9ka7946za3nibyasya"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-stm" ,ghc-stm)
               ("ghc-hashable" ,ghc-hashable)
@@ -9057,7 +9364,6 @@ parsing and printing @dfn{Universally Unique Identifiers} or UUIDs.")
               ("ghc-contravariant" ,ghc-contravariant)
               ("ghc-contravariant-extras" ,ghc-contravariant-extras)
               ("ghc-semigroups" ,ghc-semigroups)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-either" ,ghc-either)
               ("ghc-fail" ,ghc-fail)
               ("ghc-base-prelude" ,ghc-base-prelude)))
@@ -9087,10 +9393,33 @@ The package is intended to rapidly evolve with the contribution from
 the community, with the missing features being added with pull-requests.")
     (license license:expat)))
 
+(define-public ghc-rerebase
+  (package
+    (name "ghc-rerebase")
+    (version "1.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/rerebase/rerebase-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "11v6rmz7ql2rdx6mhb3lsal952lwihclfhh0m7fcnii5br0906ks"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-rebase" ,ghc-rebase)))
+    (home-page "https://github.com/nikita-volkov/rerebase")
+    (synopsis "Reexports from ``base'' with many other standard libraries")
+    (description "A rich drop-in replacement for ``base''.  For details and
+documentation please visit @uref{https://github.com/nikita-volkov/rerebase,
+the project's home page}.")
+    (license license:expat)))
+
 (define-public ghc-vector-builder
   (package
     (name "ghc-vector-builder")
-    (version "0.3.1")
+    (version "0.3.6")
     (source
      (origin
        (method url-fetch)
@@ -9099,17 +9428,18 @@ the community, with the missing features being added with pull-requests.")
                            "vector-builder-" version ".tar.gz"))
        (sha256
         (base32
-         "1l6sfgd2s107zkp1qd1w6jdjcbznp31769qf99pxar087f697wvp"))))
+         "06d2pa1fb3ydrl7l6rjazqyxv5i73v65x2f5fp0ypjxfbm6jsmn8"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-vector" ,ghc-vector)
               ("ghc-semigroups" ,ghc-semigroups)
               ("ghc-base-prelude" ,ghc-base-prelude)))
-    (native-inputs `(("ghc-tasty" ,ghc-tasty)
+    (native-inputs `(("ghc-attoparsec" ,ghc-attoparsec)
+                     ("ghc-tasty" ,ghc-tasty)
                      ("ghc-tasty-hunit" ,ghc-tasty-hunit)
                      ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
                      ("ghc-hunit" ,ghc-hunit)
                      ("ghc-quickcheck-instances" ,ghc-quickcheck-instances)
-                     ("ghc-rebase" ,ghc-rebase)))
+                     ("ghc-rerebase" ,ghc-rerebase)))
     (home-page "https://github.com/nikita-volkov/vector-builder")
     (synopsis "Vector builder for Haskell")
     (description "This Haskell package provides an API for constructing vectors.
@@ -9124,7 +9454,7 @@ vector. ")
 (define-public ghc-foldl
   (package
     (name "ghc-foldl")
-    (version "1.3.5")
+    (version "1.4.3")
     (source
      (origin
        (method url-fetch)
@@ -9133,7 +9463,7 @@ vector. ")
                            "foldl-" version ".tar.gz"))
        (sha256
         (base32
-         "10qsp7dj2xsq4q2xm6x6b12y5pq32qf7my41hnkmdwwbccvhdxb2"))))
+         "13n0ca3hw5jzqf6rxsdbhbwkn61a9zlm13f0f205s60j3sc72jzk"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-mwc-randam" ,ghc-mwc-random)
               ("ghc-primitive" ,ghc-primitive)
@@ -9142,7 +9472,9 @@ vector. ")
               ("ghc-unordered-containers" ,ghc-unordered-containers)
               ("ghc-hashable" ,ghc-hashable)
               ("ghc-contravariant" ,ghc-contravariant)
+              ("ghc-semigroups" ,ghc-semigroups)
               ("ghc-profunctors" ,ghc-profunctors)
+              ("ghc-semigroupoids" ,ghc-semigroupoids)
               ("ghc-comonad" ,ghc-comonad)
               ("ghc-vector-builder" ,ghc-vector-builder)))
     (home-page "https://github.com/Gabriel439/Haskell-Foldl-Library")
@@ -9219,7 +9551,6 @@ data structures as non-empty.")
               ("ghc-mono-traversable" ,ghc-mono-traversable)))
     (native-inputs `(("ghc-hspec" ,ghc-hspec)
                      ("ghc-silently" ,ghc-silently)
-                     ("ghc-mtl" ,ghc-mtl)
                      ("ghc-safe" ,ghc-safe)
                      ("ghc-quickcheck" ,ghc-quickcheck)))
     (home-page "https://github.com/snoyberg/mono-traversable")
@@ -9232,14 +9563,14 @@ as well as a convenient Conduit module.")
 (define-public ghc-aws
   (package
     (name "ghc-aws")
-    (version "0.18")
+    (version "0.20")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://hackage.haskell.org/package/"
                            "aws-" version "/aws-" version ".tar.gz"))
        (sha256 (base32
-                "0h7473wkvc5xjzx5fd5k5fp70rjq5gqmn1cpy95mswvvfsq3irxj"))))
+                "0pwpabmypi1w8rni9qfwabgn95jks4h8dyw6889mn8xzsrhdhyf0"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; Tests require AWS credentials.
     (inputs
@@ -9257,8 +9588,8 @@ as well as a convenient Conduit module.")
        ("ghc-data-default" ,ghc-data-default)
        ("ghc-http-conduit" ,ghc-http-conduit)
        ("ghc-http-types" ,ghc-http-types)
+       ("ghc-lifted-base" ,ghc-lifted-base)
        ("ghc-monad-control" ,ghc-monad-control)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-network" ,ghc-network)
        ("ghc-old-locale" ,ghc-old-locale)
        ("ghc-safe" ,ghc-safe)
@@ -9290,7 +9621,7 @@ Web Services.")
 (define-public ghc-basement
   (package
     (name "ghc-basement")
-    (version "0.0.7")
+    (version "0.0.8")
     (source
      (origin
        (method url-fetch)
@@ -9298,7 +9629,7 @@ Web Services.")
                            "basement/basement-" version ".tar.gz"))
        (sha256
         (base32
-         "0w2g4k9bs2ph00p0fgrmcrng8ypdz6xis0r10g380nzkg2rvj0dm"))))
+         "194jw567di4q2758943q9rrwkbf9gl261my7qc21i9xhyabipx67"))))
     (build-system haskell-build-system)
     (home-page "https://github.com/haskell-foundation/foundation")
     (synopsis "Basic primitives for Foundation starter pack")
@@ -9310,7 +9641,7 @@ packages.")
 (define-public ghc-foundation
   (package
     (name "ghc-foundation")
-    (version "0.0.20")
+    (version "0.0.21")
     (source
      (origin
        (method url-fetch)
@@ -9318,8 +9649,18 @@ packages.")
                            "foundation/foundation-" version ".tar.gz"))
        (sha256
         (base32
-         "0bg4g0xf4pb2vmahnfp8c4f0a3v0av73lb5g8bwnp170khxfcsms"))))
+         "1q43y8wfj0wf9gdq2kzphwjwq6m5pvryy1lqgk954aq5z3ks1lsf"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'add-setup-script
+           (lambda _
+             ;; The usual "Setup.hs" script is missing from the source.
+             (with-output-to-file "Setup.hs"
+               (lambda ()
+                 (format #t "import Distribution.Simple~%")
+                 (format #t "main = defaultMain~%"))))))))
     (inputs `(("ghc-basement" ,ghc-basement)))
     (home-page "https://github.com/haskell-foundation/foundation")
     (synopsis "Alternative prelude with batteries and no dependencies")
@@ -9388,7 +9729,7 @@ operators for looping.")
 (define-public ghc-monad-logger
   (package
     (name "ghc-monad-logger")
-    (version "0.3.25.1")
+    (version "0.3.29")
     (source
      (origin
        (method url-fetch)
@@ -9397,7 +9738,7 @@ operators for looping.")
                            "monad-logger-" version ".tar.gz"))
        (sha256
         (base32
-         "0yv4fsi566zrn30j2g5l901lyqgmflhvzy4hji7ikcbh5d45m920"))))
+         "1z516s4pa9n94zf0l45mylssg07xr1d1m6zrz900p0iv3vfd07mv"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-transformers-compat" ,ghc-transformers-compat)
               ("ghc-text" ,ghc-text)
@@ -9411,7 +9752,6 @@ operators for looping.")
               ("ghc-transformers-base" ,ghc-transformers-base)
               ("ghc-monad-control" ,ghc-monad-control)
               ("ghc-monad-loops" ,ghc-monad-loops)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-blaze-builder" ,ghc-blaze-builder)
               ("ghc-exceptions" ,ghc-exceptions)))
     (home-page "https://github.com/kazu-yamamoto/logger")
@@ -9426,7 +9766,7 @@ code locations of messages.")
 (define-public ghc-shakespeare
   (package
     (name "ghc-shakespeare")
-    (version "2.0.14")
+    (version "2.0.15")
     (source
      (origin
        (method url-fetch)
@@ -9435,7 +9775,7 @@ code locations of messages.")
                            "shakespeare-" version ".tar.gz"))
        (sha256
         (base32
-         "0j5zx8ka7d7scvb9shm7k3376qzl3k4kpim9aqqfs6n86901zpl4"))))
+         "1vk4b19zvwy4mpwaq9z3l3kfmz75gfyf7alhh0y112gspgpccm23"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-parsec" ,ghc-parsec)
               ("ghc-text" ,ghc-text)
@@ -9460,7 +9800,7 @@ interpolates variables according to the type being inserted.")
 (define-public ghc-securemem
   (package
     (name "ghc-securemem")
-    (version "0.1.9")
+    (version "0.1.10")
     (source
      (origin
        (method url-fetch)
@@ -9469,7 +9809,7 @@ interpolates variables according to the type being inserted.")
                            "securemem-" version ".tar.gz"))
        (sha256
         (base32
-         "0dkhhjxa7njc3qbgvd5a23rkvr39vj2kn2a9nk6yjg7a8b2hvdpy"))))
+         "19hnw2cfbsfjynxq1bq9f6djbxhsc1k751ml0y1ab3ah913mm29j"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-byteable" ,ghc-byteable)
               ("ghc-memory" ,ghc-memory)))
@@ -9520,6 +9860,9 @@ connections.")
         (base32
          "12l55b76bhya9q89mfmqmy6sl5v39b6gzrw5rf3f70vkb23nsv5a"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "06f7pgmmc8456p3hc1y23kz1y127gfczy7s00wz1rls9g2sm2vi4")))
     (inputs `(("ghc-attoparsec" ,ghc-attoparsec)
               ("ghc-base-compat" ,ghc-base-compat)
               ("ghc-text" ,ghc-text)))
@@ -9532,7 +9875,7 @@ from aeson.")
 (define-public ghc-generics-sop
   (package
     (name "ghc-generics-sop")
-    (version "0.3.1.0")
+    (version "0.3.2.0")
     (source
      (origin
        (method url-fetch)
@@ -9541,7 +9884,7 @@ from aeson.")
                            "generics-sop-" version ".tar.gz"))
        (sha256
         (base32
-         "1bazlhgmxcwv7vd44jhdx74cnhmaz6yy47jxfycapjj4mjrnp0x7"))))
+         "168v62i845jh9jbfaz3ldz8svz4wmzq9mf2vhb7pxlnbkk8fqq1h"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-transformers-compat" ,ghc-transformers-compat)))
     (home-page "https://github.com/well-typed/generics-sop")
@@ -9555,7 +9898,7 @@ each constructor are represented using an n-ary product.")
 (define-public ghc-uri-bytestring
   (package
     (name "ghc-uri-bytestring")
-    (version "0.3.1.0")
+    (version "0.3.2.0")
     (source
      (origin
        (method url-fetch)
@@ -9564,7 +9907,7 @@ each constructor are represented using an n-ary product.")
                            "uri-bytestring-" version ".tar.gz"))
        (sha256
         (base32
-         "04qjv1sgyrdg538290p9hqnvyxnahvr5cjwl8vm1rn9j0fv3ymq9"))))
+         "1q04j5ybvk37zk2m0bkjwyhblz0ymdj0cn4rvsvdca1ikn5xdv5c"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-attoparsec" ,ghc-attoparsec)
               ("ghc-fail" ,ghc-fail)
@@ -9589,7 +9932,7 @@ parser that uses ByteStrings for parsing and representing the URI data.")
 (define-public ghc-http-api-data
   (package
     (name "ghc-http-api-data")
-    (version "0.3.7.1")
+    (version "0.3.8.1")
     (source
      (origin
        (method url-fetch)
@@ -9598,7 +9941,7 @@ parser that uses ByteStrings for parsing and representing the URI data.")
                            "http-api-data-" version ".tar.gz"))
        (sha256
         (base32
-         "1zbmf0kkfsw7pfznisi205gh7jd284gfarxsyiavd2iw26akwqwc"))))
+         "1cq6459b8wz6nvkvpi89dg189n5q2xdq4rdq435hf150555vmskf"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f))  ;  FIXME: Tests require QuickCheck >= 2.9
     (inputs `(("ghc-attoparsec" ,ghc-attoparsec)
@@ -9620,7 +9963,7 @@ Haskell data types to and from HTTP API data.")
 (define-public ghc-persistent
   (package
     (name "ghc-persistent")
-    (version "2.7.3.1")
+    (version "2.8.2")
     (source
      (origin
        (method url-fetch)
@@ -9629,7 +9972,7 @@ Haskell data types to and from HTTP API data.")
                            "persistent-" version ".tar.gz"))
        (sha256
         (base32
-         "1jbvavdvr9qz5ld7vf6l1jgiadhmxx6zc4vqsdk9ivfq6d5wlg1p"))))
+         "1h0yijbf1yiwl50klyafy4ln99j8bib4kgbzviw7fc4y4mwv4sv9"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-old-locale" ,ghc-old-locale)
               ("ghc-text" ,ghc-text)
@@ -9652,10 +9995,10 @@ Haskell data types to and from HTTP API data.")
               ("ghc-blaze-html" ,ghc-blaze-html)
               ("ghc-blaze-markup" ,ghc-blaze-markup)
               ("ghc-silently" ,ghc-silently)
-              ("ghc-mtl" ,ghc-mtl)
               ("ghc-fast-logger" ,ghc-fast-logger)
               ("ghc-scientific" ,ghc-scientific)
-              ("ghc-tagged" ,ghc-tagged)))
+              ("ghc-tagged" ,ghc-tagged)
+              ("ghc-void" ,ghc-void)))
     (native-inputs `(("ghc-hspec" ,ghc-hspec)))
     (home-page "https://www.yesodweb.com/book/persistent")
     (synopsis "Type-safe, multi-backend data serialization for Haskell")
@@ -9667,7 +10010,7 @@ way.")
 (define-public ghc-aeson-compat
   (package
     (name "ghc-aeson-compat")
-    (version "0.3.7.1")
+    (version "0.3.8")
     (source
      (origin
        (method url-fetch)
@@ -9676,7 +10019,7 @@ way.")
                            "aeson-compat-" version ".tar.gz"))
        (sha256
         (base32
-         "1jya3lm9imclhb8qqihv39hhb62vvs3qpws7pc5fc23vwg0hsx2r"))))
+         "0j4v13pgk21zy8hqkbx8hw0n05jdl17qphxz9rj4h333pr547r3i"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f))  ;  FIXME: Tests require QuickCheck >= 2.10
     (inputs `(("ghc-base-compat" ,ghc-base-compat)
@@ -9702,7 +10045,7 @@ ghc-aeson.")
 (define-public ghc-persistent-template
   (package
     (name "ghc-persistent-template")
-    (version "2.5.3.1")
+    (version "2.5.4")
     (source
      (origin
        (method url-fetch)
@@ -9711,8 +10054,11 @@ ghc-aeson.")
                            "persistent-template-" version ".tar.gz"))
        (sha256
         (base32
-         "0449piw3n02q7dag7k1pakfmzmf3ms4wk1qmnagczpm1ckajinwd"))))
+         "008afcy7zbw7bzp9jww8gdldb51kfm0fg4p0x4xcp61gx4679bjc"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("2" "03qgwk32krldph3blw5agiqcpccr3649hajyn8wm9k71zz82dpn6")))
     (inputs `(("ghc-persistent" ,ghc-persistent)
               ("ghc-monad-control" ,ghc-monad-control)
               ("ghc-text" ,ghc-text)
@@ -9745,6 +10091,9 @@ functions for the ghc-persistent package.")
         (base32
          "1193fplsjm1lcr05xwvkj1rsyzx74i755f6kw3ikmxbsv0bv0l3m"))))
     (build-system haskell-build-system)
+    (arguments
+     `(#:cabal-revision
+       ("1" "16bjwcsaghqqmyi69rq65dn3ydifyfaabq3ns37apdm00mwqbcj2")))
     (home-page
      "https://github.com/fpco/unliftio/tree/master/unliftio-core#readme")
     (synopsis "The MonadUnliftIO typeclass for unlifting monads to IO")
@@ -9756,7 +10105,7 @@ functions.")
 (define-public ghc-microlens
   (package
     (name "ghc-microlens")
-    (version "0.4.8.3")
+    (version "0.4.9.1")
     (source
      (origin
        (method url-fetch)
@@ -9765,7 +10114,7 @@ functions.")
                            "microlens-" version ".tar.gz"))
        (sha256
         (base32
-         "17qx2mbqdrlnkc3gxq8njbp7qw8nh51drmz6fc8khgj9bls5ni2k"))))
+         "0j2nzf0vpx2anvsrg2w0vy2z4jn3kkcs2n6glkzblhn1j9piqh51"))))
     (build-system haskell-build-system)
     (home-page
      "https://github.com/aelve/microlens")
@@ -9781,7 +10130,7 @@ stripped.  As the result, this package has no dependencies.")
 (define-public ghc-microlens-th
   (package
     (name "ghc-microlens-th")
-    (version "0.4.1.3")
+    (version "0.4.2.2")
     (source
      (origin
        (method url-fetch)
@@ -9790,9 +10139,10 @@ stripped.  As the result, this package has no dependencies.")
                            "microlens-th-" version ".tar.gz"))
        (sha256
         (base32
-         "15a12cqxlgbcn1n73zwrxnp2vfm8b0ma0a0sdd8zmjbs8zy3np4f"))))
+         "02nj7lnl61yffi3c6wn341arxhld5r0vj6nzcb5zmqjhnqsv8c05"))))
     (build-system haskell-build-system)
-    (inputs `(("ghc-microlens" ,ghc-microlens)))
+    (inputs `(("ghc-microlens" ,ghc-microlens)
+              ("ghc-th-abstraction" ,ghc-th-abstraction)))
     (home-page
      "https://github.com/aelve/microlens")
     (synopsis "Automatic generation of record lenses for
@@ -9806,7 +10156,7 @@ used both from lens and microlens).")
 (define-public ghc-unliftio
   (package
     (name "ghc-unliftio")
-    (version "0.2.4.0")
+    (version "0.2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -9816,7 +10166,7 @@ used both from lens and microlens).")
              ".tar.gz"))
        (sha256
         (base32
-         "0vpncmwaq5zb6bziqfns4qdgxmq8ky0rlxna2yngxp170s5zxx9z"))))
+         "0qql93lq5w7qghl454cc3s1i8v1jb4h08n82fqkw0kli4g3g9njs"))))
     (build-system haskell-build-system)
     (arguments `(#:tests? #f)) ; FIXME: hspec-discover not in PATH
     (inputs
@@ -9835,7 +10185,7 @@ working with it.")
 (define-public ghc-persistent-sqlite
   (package
     (name "ghc-persistent-sqlite")
-    (version "2.6.4")
+    (version "2.8.2")
     (source
      (origin
        (method url-fetch)
@@ -9844,7 +10194,7 @@ working with it.")
                            "persistent-sqlite-" version ".tar.gz"))
        (sha256
         (base32
-         "16mc2ra0hbyyc8ckjlxxc11bpskdymbr8c3g6ih6wzik639xprbm"))))
+         "1chbmvjz46smhgnzhha3bbkhys3fys6dip1jr4v7xp1jf78zbyp6"))))
     (build-system haskell-build-system)
     (inputs `(("ghc-persistent" ,ghc-persistent)
               ("ghc-unliftio-core" ,ghc-unliftio-core)
@@ -9871,7 +10221,7 @@ system dependencies.")
 (define-public ghc-email-validate
   (package
     (name "ghc-email-validate")
-    (version "2.3.2.1")
+    (version "2.3.2.6")
     (source
      (origin
        (method url-fetch)
@@ -9882,7 +10232,7 @@ system dependencies.")
              ".tar.gz"))
        (sha256
         (base32
-         "0qvxysiap3r4mi3xff5nsk9qv6diqxfgwj186bypbamzvzlz0lav"))))
+         "0chgylvc8xmhp933rdbmpg5sv4y7yg2h6kbf0ip1dzmbd5p55pa5"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-attoparsec" ,ghc-attoparsec)
@@ -9897,26 +10247,10 @@ system dependencies.")
 address string against RFC 5322.")
     (license license:bsd-3)))
 
-(define-public ghc-semigroupoids-5.2.2
-  (package
-    (inherit ghc-semigroupoids)
-    (name "ghc-semigroupoids")
-    (version "5.2.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://hackage.haskell.org/package/"
-                                  "semigroupoids-" version "/semigroupoids-"
-                                   version ".tar.gz"))
-              (sha256
-               (base32
-                "17i96y4iqj8clcs090lf6k0ij3j16nj14vsfwz0mm9nd6i4gbpp4"))))
-    (inputs `(("ghc-unordered-containers" ,ghc-unordered-containers)
-              ,@(package-inputs ghc-semigroupoids)))))
-
 (define-public ghc-bytes
   (package
    (name "ghc-bytes")
-   (version "0.15.4")
+   (version "0.15.5")
    (source
     (origin
      (method url-fetch)
@@ -9927,12 +10261,11 @@ address string against RFC 5322.")
      (file-name (string-append name "-" version ".tar.gz"))
      (sha256
       (base32
-       "121x3iqlm8pghw8cd9g30cnqbl7jrdpfjxdanmqdqllajw6xivrm"))))
+       "063il2vrn0p88r9gzndh4ijs0mxj37khkc9ym9bqdsv7ngk3b683"))))
    (build-system haskell-build-system)
    (inputs `(("ghc-cereal" ,ghc-cereal)
              ("cabal-doctest" ,cabal-doctest)
-             ("ghc-doctest" ,ghc-doctest-0.13)
-             ("ghc-mtl" ,ghc-mtl)
+             ("ghc-doctest" ,ghc-doctest)
              ("ghc-scientific" ,ghc-scientific)
              ("ghc-text" ,ghc-text)
              ("ghc-transformers-compat" ,ghc-transformers-compat)
@@ -10032,7 +10365,6 @@ This package provides an orphan instance.")
     (inputs
      `(("ghc-network" ,ghc-network)
        ("ghc-parsec" ,ghc-parsec)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-hunit" ,ghc-hunit)
        ("ghc-regex-compat" ,ghc-regex-compat)
        ("ghc-hslogger" ,ghc-hslogger)
@@ -10088,8 +10420,7 @@ example code on the home page for a quick introduction.")
          "1x2abg2q9d26h1vzj40r6k7k3gqgappbs4g9d853vvg77837km4i"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-random" ,ghc-random)))
+     `(("ghc-random" ,ghc-random)))
     (home-page "http://wiki.haskell.org/Operational")
     (synopsis "Implementation of difficult monads made easy with operational semantics")
     (description
@@ -10134,7 +10465,7 @@ tools are not needed to actually run Gtk2Hs programs.")
 (define-public ghc-chart
   (package
     (name "ghc-chart")
-    (version "1.8.3")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
@@ -10142,11 +10473,10 @@ tools are not needed to actually run Gtk2Hs programs.")
                            "Chart-" version ".tar.gz"))
        (sha256
         (base32
-         "13s64fhb2pmkdmx5bkgbgcn25qjihs364fvr47a1dw25f804kiy1"))))
+         "1f5azj17y8xsb3gjhf7gg1gnnlq12rxkmfjmgcly314d7vghs05z"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-old-locale" ,ghc-old-locale)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-lens" ,ghc-lens)
        ("ghc-colour" ,ghc-colour)
        ("ghc-data-default-class" ,ghc-data-default-class)
@@ -10184,4 +10514,131 @@ The command line tool can compile a width table to Haskell code that assigns
 widths to the Char type.")
     (license license:bsd-3)))
 
+(define-public ghc-wcwidth-bootstrap
+  (package
+    (inherit ghc-wcwidth)
+    (name "ghc-wcwidth-bootstrap")
+    (inputs
+     `(("ghc-setlocale" ,ghc-setlocale)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-attoparsec" ,ghc-attoparsec-bootstrap)))
+    (properties '(hidden? #t))))
+
+(define-public ghc-rio
+  (package
+    (name "ghc-rio")
+    (version "0.1.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://hackage.haskell.org/package/rio/rio-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "064h8a4hp53a479d3ak0vmqbx8hi0cpg7zn4wp23rjy26dka8p7g"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'add-setup-script
+           (lambda _
+             ;; The usual "Setup.hs" script is missing from the source.
+             (with-output-to-file "Setup.hs"
+               (lambda ()
+                 (format #t "import Distribution.Simple~%")
+                 (format #t "main = defaultMain~%"))))))))
+    (inputs
+     `(("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-microlens" ,ghc-microlens)
+       ("ghc-primitive" ,ghc-primitive)
+       ("ghc-text" ,ghc-text)
+       ("ghc-typed-process" ,ghc-typed-process)
+       ("ghc-unliftio" ,ghc-unliftio)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-vector" ,ghc-vector)))
+    (native-inputs
+     `(("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "https://github.com/commercialhaskell/rio#readme")
+    (synopsis "A standard library for Haskell")
+    (description "This package works as a prelude replacement for Haskell,
+providing more functionality and types out of the box than the standard
+prelude (such as common data types like @code{ByteString} and
+@code{Text}), as well as removing common ``gotchas'', like partial
+functions and lazy I/O.  The guiding principle here is:
+@itemize
+@item If something is safe to use in general and has no expected naming
+conflicts, expose it.
+@item If something should not always be used, or has naming conflicts,
+expose it from another module in the hierarchy.
+@end itemize")
+    (license license:expat)))
+
+(define-public ghc-weigh
+  (package
+    (name "ghc-weigh")
+    (version "0.0.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/weigh/"
+                           "weigh-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0zw2a997gxgdzqmd7j730kxgynzmjvvlkw84dajmfzf1v9pbij7x"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-split" ,ghc-split)
+       ("ghc-temporary" ,ghc-temporary)))
+    (home-page "https://github.com/fpco/weigh#readme")
+    (synopsis "Measure allocations of a Haskell functions/values")
+    (description "This package provides tools to measure the memory usage of a
+Haskell value or function.")
+    (license license:bsd-3)))
+
+(define-public ghc-linear
+  (package
+    (name "ghc-linear")
+    (version "1.20.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/linear/"
+                           "linear-" version ".tar.gz"))
+       (sha256
+        (base32
+         "046vkvxlb0s286qr55s0c6db0rlwbm1cmlmwhrrkqbkzhfcipgay"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-adjunctions" ,ghc-adjunctions)
+       ("ghc-base-orphans" ,ghc-base-orphans)
+       ("ghc-bytes" ,ghc-bytes)
+       ("ghc-cereal" ,ghc-cereal)
+       ("ghc-distributive" ,ghc-distributive)
+       ("ghc-hashable" ,ghc-hashable)
+       ("ghc-lens" ,ghc-lens)
+       ("ghc-reflection" ,ghc-reflection)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-semigroupoids" ,ghc-semigroupoids)
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-void" ,ghc-void)))
+    (native-inputs
+     `(("cabal-doctest" ,cabal-doctest)
+       ("ghc-doctest" ,ghc-doctest)
+       ("ghc-simple-reflect" ,ghc-simple-reflect)
+       ("ghc-test-framework" ,ghc-test-framework)
+       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
+       ("ghc-hunit" ,ghc-hunit)))
+    (home-page "http://github.com/ekmett/linear/")
+    (synopsis "Linear algebra library for Haskell")
+    (description
+     "This package provides types and combinators for linear algebra on free
+vector spaces.")
+    (license license:bsd-3)))
+
 ;;; haskell.scm ends here
diff --git a/gnu/packages/hexedit.scm b/gnu/packages/hexedit.scm
index 88dbfb234d..9aea8e8700 100644
--- a/gnu/packages/hexedit.scm
+++ b/gnu/packages/hexedit.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,25 +22,33 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ncurses)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu))
 
 (define-public hexedit
   (package
     (name "hexedit")
-    (version "1.2.13")
+    (version "1.4.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "http://rigaux.org/"
-                                  name "-" version ".src.tgz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pixel/hexedit.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1mwdp1ikk64cqmagnrrps5jkn3li3n47maiqh2qc1xbp1ains4ka"))))
+                "1xsxa5mip892jkvz9jshj73y6c7j3mgp8y393ciihqlyf2nmfs67"))))
     (build-system gnu-build-system)
-    (arguments '(#:tests? #f)) ; no check target
-    (inputs `(("ncurses" ,ncurses)))
+    (arguments '(#:tests? #f))          ; no check target
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)))
+    (inputs
+     `(("ncurses" ,ncurses)))
     (synopsis "View and edit files or devices in hexadecimal or ASCII")
     (description "hexedit shows a file both in ASCII and in hexadecimal.  The
 file can be a device as the file is read a piece at a time.  You can modify
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 79f89d6f54..f80d6b3894 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -31,56 +31,10 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
-(define ghc-aeson-1.1.2.0
-  (package (inherit ghc-aeson)
-    (version "1.1.2.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/aeson/aeson-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "1zy5z8pzvh53qkjm0nm3f4rwqfqg3867ck8ncd6mrxpcyvxqqj1p"))))))
-
-(define ghc-trifecta-1.6.2.1
-  (package (inherit ghc-trifecta)
-    (version "1.6.2.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/trifecta/"
-             "trifecta-" version ".tar.gz"))
-       (sha256
-        (base32
-         "1rgv62dlmm4vkdymx5rw5jg3w8ifpzg1745rvs1m4kzdx16p5cxs"))))))
-
-;; ghc-cheapskate appeared too new. This follows LTS Haskell.
-(define ghc-cheapskate-0.1.0.5
-  (package
-    (inherit ghc-cheapskate)
-    (version "0.1.0.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/cheapskate/cheapskate-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "0cpsmfx5z2xykg71sv8j7pl8ga6pzyjnjdb9bxn00vcpqkzvfqvs"))))
-    (arguments
-     ;; LTS Haskell says data-default >=0.5 && <0.8
-     `(#:configure-flags (list "--allow-newer=data-default")))))
-
 (define-public idris
   (package
     (name "idris")
-    (version "1.0")
+    (version "1.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -88,12 +42,12 @@
                     "idris-" version "/idris-" version ".tar.gz"))
               (sha256
                (base32
-                "1srbz0cyvd0k1yqgbrwnfj94yg5y3z533q1kzac96z1h7v454s5h"))))
+                "1w5i2z88li4niykwc6yrgxgfp25ll6ih95cip0ri7d8i7ik03c48"))))
     (build-system haskell-build-system)
     (inputs
      `(("gmp" ,gmp)
        ("ncurses" ,ncurses)
-       ("ghc-aeson" ,ghc-aeson-1.1.2.0)
+       ("ghc-aeson" ,ghc-aeson)
        ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint)
        ("ghc-ansi-terminal" ,ghc-ansi-terminal)
        ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
@@ -101,12 +55,12 @@
        ("ghc-base64-bytestring" ,ghc-base64-bytestring)
        ("ghc-blaze-html" ,ghc-blaze-html)
        ("ghc-blaze-markup" ,ghc-blaze-markup)
-       ("ghc-cheapskate" ,ghc-cheapskate-0.1.0.5)
+       ("ghc-cheapskate" ,ghc-cheapskate)
        ("ghc-code-page" ,ghc-code-page)
        ("ghc-fingertree" ,ghc-fingertree)
        ("ghc-fsnotify" ,ghc-fsnotify)
        ("ghc-ieee754" ,ghc-ieee754)
-       ("ghc-mtl" ,ghc-mtl)
+       ("ghc-megaparsec" ,ghc-megaparsec)
        ("ghc-network" ,ghc-network)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-regex-tdfa" ,ghc-regex-tdfa)
@@ -114,7 +68,6 @@
        ("ghc-split" ,ghc-split)
        ("ghc-terminal-size" ,ghc-terminal-size)
        ("ghc-text" ,ghc-text)
-       ("ghc-trifecta" ,ghc-trifecta-1.6.2.1)
        ("ghc-uniplate" ,ghc-uniplate)
        ("ghc-unordered-containers" ,ghc-unordered-containers)
        ("ghc-utf8-string" ,ghc-utf8-string)
@@ -132,6 +85,11 @@
            (lambda _
              (setenv "CC" "gcc")
              #t))
+         (add-before 'configure 'update-constraints
+           (lambda _
+             (substitute* "idris.cabal"
+               (("aeson >= 0\\.6 && < 1\\.3")
+                "aeson >= 0.6 && < 1.4"))))
          (add-after 'install 'fix-libs-install-location
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 8f80b75af4..0901dc429f 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -200,7 +200,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
 (define-public opencv
   (package
     (name "opencv")
-    (version "3.4.1")
+    (version "3.4.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/opencv/opencv/archive/"
@@ -208,7 +208,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
               (file-name (string-append name "-" version ".zip"))
               (sha256
                (base32
-                "1g8pvnlkzzp50amd89149hqsbvsc2hq3vk1d6a9fksdcx8ra9g94"))
+                "0pycx1pz8lj794q32mlalyc3ijqxwsyin65r26nh4yc0p71xiirp"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -345,7 +345,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
                                "opencv/opencv_extra/zip/" version))
            (file-name (string-append "opencv-extra-" version ".zip"))
            (sha256
-            (base32 "0wfh3pvfxqydf7hsccp50npcsg37sf6fqi6cd3zkc4qil9zhpbps"))))
+            (base32 "0yd1vidzbg6himxyh4yzivywijg8548kfmcn421khabnipm7l74y"))))
        ("opencv-contrib"
         ,(origin
            (method url-fetch)
@@ -353,7 +353,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
                                "opencv/opencv_contrib/zip/" version))
            (file-name (string-append "opencv-contrib-" version ".zip"))
            (sha256
-           (base32 "18zm0qmjcdvg90c33gzv0ws0xdaid1xpqzz2xa9l2x12qkr6zj3p"))))))
+           (base32 "0j0ci6ia1qwklp9hq07ypl0vkngj1wrgh6n98n657m5d0pyp4m0g"))))))
     (inputs `(("libjpeg" ,libjpeg)
               ("libpng" ,libpng)
               ("jasper" ,jasper)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d2f4c9d05b..96da495c29 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -4288,6 +4288,85 @@ setter and getter method.")
 file filters and endian classes.")
     (license license:asl2.0)))
 
+(define-public java-commons-exec-1.1
+  (package
+    (name "java-commons-exec")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://apache/commons/exec/source/"
+                           "commons-exec-" version "-src.tar.gz"))
+       (sha256
+        (base32
+         "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list (string-append "-Dmaven.junit.jar="
+                            (assoc-ref %build-inputs "java-junit")
+                            "/share/java/junit.jar"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'delete-network-tests
+           (lambda _
+             (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
+             (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
+              (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
+             #t))
+         ;; The "build" phase automatically tests.
+         (delete 'check)
+         (replace 'install (install-jars "target")))))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (home-page "http://commons.apache.org/proper/commons-exec/")
+    (synopsis "Common program execution related classes")
+    (description "Commons-Exec simplifies executing external processes.")
+    (license license:asl2.0)))
+
+(define-public java-commons-exec
+  (package
+    (inherit java-commons-exec-1.1)
+    (version "1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://apache/commons/exec/source/"
+                           "commons-exec-" version "-src.tar.gz"))
+       (sha256
+        (base32
+         "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list (string-append "-Dmaven.junit.jar="
+                            (assoc-ref %build-inputs "java-junit")
+                            "/share/java/junit.jar")
+             "-Dmaven.compiler.source=1.7"
+             "-Dmaven.compiler.target=1.7")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'delete-network-tests
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; This test hangs indefinitely.
+             (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
+             (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
+              (("ping -c 10 127.0.0.1") "sleep 10"))
+             (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
+              (("/bin/ls") "ls"))
+             (call-with-output-file "src/test/scripts/ping.sh"
+               (lambda (port)
+                 (format port "#!~a/bin/sh\nsleep $1\n"
+                              (assoc-ref inputs "bash"))))
+             #t))
+         ;; The "build" phase automatically tests.
+         (delete 'check)
+         (replace 'install (install-jars "target")))))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))))
+
 (define-public java-commons-lang
   (package
     (name "java-commons-lang")
@@ -7585,6 +7664,55 @@ configuration.")
     (description "This package is the jaxb annotations module for jackson.")
     (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
 
+(define-public java-fasterxml-jackson-modules-base-mrbean
+  (package
+    (name "java-fasterxml-jackson-modules-base-mrbean")
+    (version "2.9.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/FasterXML/"
+                                  "jackson-modules-base/archive/"
+                                  "jackson-modules-base-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "jackson-modules-base-mrbean.jar"
+       #:source-dir "mrbean/src/main/java"
+       #:test-dir "mrbean/src/test"
+       #:test-exclude
+       ;; Base class for tests
+       (list "**/BaseTest.java")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'generate-PackageVersion.java
+           (lambda _
+             (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
+                                        "jackson/module/mrbean/PackageVersion.java"))
+                    (in (string-append out ".in")))
+               (copy-file in out)
+               (substitute* out
+                 (("@package@") "com.fasterxml.jackson.module.mrbean")
+                 (("@projectversion@") ,version)
+                 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
+                 (("@projectartifactid@") "jackson-module-mrbean")))
+             #t)))))
+    (inputs
+     `(("java-asm" ,java-asm)
+       ("java-fasterxml-jackson-annotations"
+        ,java-fasterxml-jackson-annotations)
+       ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
+       ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (home-page "https://github.com/FasterXML/jackson-modules-base")
+    (synopsis "POJO type materialization for Java")
+    (description "This package implements POJO type materialization.
+Databinders can construct implementation classes for Java interfaces as part
+of deserialization.")
+    (license license:asl2.0)))
+
 (define-public java-snakeyaml
   (package
     (name "java-snakeyaml")
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index aa5be6b515..a835f42749 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -236,7 +236,7 @@ plugins, as well as code to create plugins, or complete applications.")
 (define-public krita
   (package
     (name "krita")
-    (version "4.1.1")
+    (version "4.1.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -245,7 +245,7 @@ plugins, as well as code to create plugins, or complete applications.")
                     "/" name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1qz9bjvnwa5gc2b0063i2p72jq6y1b6kgqdj39599acp7ws11asw"))))
+                "0d546dxs552z0pxnaka1jm7ksravw17f777wf593z0pl4ds8dgdx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 18edfcd35a..5c4b928163 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -28,6 +28,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages libreoffice)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
@@ -935,7 +936,7 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "6.1.0.3")
+    (version "6.1.2.1")
     (source
      (origin
        (method url-fetch)
@@ -945,10 +946,10 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
          (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
        (sha256
         (base32
-         "1n7b6abc0bp9x8lddx60w5br444wf62mdlkqmfk2zmkmiwkcvv2l"))
+         "149ziasibplihfxlzafzcm4737ns30hg9175967b43c81yv5f335"))
        (patches (search-patches "libreoffice-icu.patch"
                                 "libreoffice-glm.patch"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (native-inputs
      `(("bison" ,bison)
        ("cppunit" ,cppunit-1.14)
@@ -1026,6 +1027,9 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
     (arguments
      `(#:tests? #f ; Building the tests already fails.
        #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
+       ;; XXX Remove this if glib-or-gtk-build-system changes to in-source-tree
+       ;; builds by default.
+       #:out-of-source? #f
        #:phases
          (modify-phases %standard-phases
            (add-before 'configure 'prepare-src
diff --git a/gnu/packages/license.scm b/gnu/packages/license.scm
index 44c7a1bb2a..e50ce831b1 100644
--- a/gnu/packages/license.scm
+++ b/gnu/packages/license.scm
@@ -61,7 +61,7 @@ Regexp::Pattern is a convention for organizing reusable regex patterns.")
 (define-public perl-string-copyright
   (package
     (name "perl-string-copyright")
-    (version "0.003005")
+    (version "0.003006")
     (source
      (origin
        (method url-fetch)
@@ -70,7 +70,7 @@ Regexp::Pattern is a convention for organizing reusable regex patterns.")
              version ".tar.gz"))
        (sha256
         (base32
-         "12c6x4c10gr46ryc3dpwgfi6wggmgy4a1ls2hwhcpdm3wvzy5619"))))
+         "0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-number-range" ,perl-number-range)))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 747bd37807..7d213362d7 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -399,8 +399,8 @@ It has been modified to remove all non-free binary blobs.")
 ;; supports qemu "virt" machine and possibly a large number of ARM boards.
 ;; See : https://wiki.debian.org/DebianKernel/ARMMP.
 
-(define %linux-libre-version "4.18.9")
-(define %linux-libre-hash "0wwmhnfvcsdlqhzwwwyz1x5a3ldjky6l0xir1pi6pysr0lak402x")
+(define %linux-libre-version "4.18.12")
+(define %linux-libre-hash "1mcnb1mm7m6i9s591c3kx0f1vbzhbl3w92w137swcm9zifqpci5r")
 
 (define %linux-libre-4.18-patches
   (list %boot-logo-patch
@@ -430,8 +430,8 @@ It has been modified to remove all non-free binary blobs.")
                     #:patches %linux-libre-4.18-patches
                     #:configuration-file kernel-config))
 
-(define %linux-libre-4.14-version "4.14.71")
-(define %linux-libre-4.14-hash "1akvykaccy7ikl8v04grwxvgs4z2rrs7drf2s85ysqwq79mdh3gq")
+(define %linux-libre-4.14-version "4.14.74")
+(define %linux-libre-4.14-hash "0cxyx2yinnc8q0hmhb0swjgdz3s0ry7wxzyqss9f2i74xjjz4rm0")
 
 (define-public linux-libre-4.14
   (make-linux-libre %linux-libre-4.14-version
@@ -440,14 +440,14 @@ It has been modified to remove all non-free binary blobs.")
                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.9
-  (make-linux-libre "4.9.128"
-                    "0lww23xcyyg0dwzrap5x9d700gy3lbxln55n6sqqkm7m89dkqwha"
+  (make-linux-libre "4.9.131"
+                    "11pxwl7dmisbf2szg9qzkvhlpk68clh5l478n7b62q7hd8j3hxlv"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.4
-  (make-linux-libre "4.4.157"
-                    "00bnfqwkr0jfdabmwx5qk5bqxn5vwnnzwqbm5rfg7lggii74kk54"
+  (make-linux-libre "4.4.159"
+                    "12wrhni1ikmakwv55cgzsznx9llzp82irsisbjjs7bc8z2hzwr6l"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
@@ -3668,15 +3668,16 @@ The collection contains a set of bandwidth and latency benchmark such as:
 (define-public rng-tools
   (package
     (name "rng-tools")
-    (version "6.4")
+    (home-page "https://github.com/nhorman/rng-tools")
+    (version "6.5")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/nhorman/rng-tools/"
-                                  "archive/v" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "005krksl8iz37l5p1nx8apl1yg7q78yrsb6inby31d2g5ck8nnwa"))))
+                "11kw1rcgzmgzwk7g1w2g0nzjraqb0pf24gxpy50k4ls2qxslw3rk"))))
     (build-system gnu-build-system)
     (arguments
      `(;; Avoid using OpenSSL, curl, and libxml2, reducing the closure by 166 MiB.
@@ -3691,7 +3692,6 @@ The collection contains a set of bandwidth and latency benchmark such as:
     (description
      "Monitor a hardware random number generator, and supply entropy
 from that to the system kernel's @file{/dev/random} machinery.")
-    (home-page "https://sourceforge.net/projects/gkernel")
     ;; The source package is offered under the GPL2+, but the files
     ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
     (license (list license:gpl2 license:gpl2+))))
@@ -4827,19 +4827,20 @@ interface to this kernel feature.")
 (define-public mbpfan
   (package
     (name "mbpfan")
-    (version "2.0.2")
+    (version "2.1.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/dgraziotin/mbpfan/archive/v"
-                           version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dgraziotin/mbpfan.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "0wifsws9icki95hhfh4zw1hmk07ddmkcz9mg5a9jr7q2kkrk01cx"))))
+         "1gysq778rkl6dvvj9a1swxcl15wvz0bng5bn4nwq118cl8p8pask"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; no tests
+     '(#:tests? #f                      ; tests ask to be run as root
        #:make-flags (let ((out (assoc-ref %outputs "out")))
                       (list (string-append "DESTDIR=" out)
                             "CC=gcc"))
@@ -4850,7 +4851,7 @@ interface to this kernel feature.")
              (substitute* "Makefile"
                (("/usr") ""))
              #t))
-         (delete 'configure)))) ; There's no configure phase.
+         (delete 'configure))))         ; there's no configure phase
     (home-page "https://github.com/dgraziotin/mbpfan")
     (synopsis "Control fan speed on Macbooks")
     (description
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 5435f89c42..7348719ede 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2556,17 +2556,16 @@ PGP handling, multiple servers, and secure connections.")
 (define-public imapfilter
   (package
     (name "imapfilter")
-    (version "2.6.11")
+    (version "2.6.12")
     (source
      (origin
-       (method url-fetch)
-       (uri
-        (string-append "https://github.com/lefcha/imapfilter/archive/"
-                       "v" version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/lefcha/imapfilter.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1yslvwr3w5fnl06gfrp0lim8zdlasx3cvgd2fsqi0695xnb9bsms"))))
+        (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b8c1c8f951..36a869f488 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1702,13 +1702,21 @@ scientific applications modeled by partial differential equations.")
   (package (inherit petsc)
     (name "petsc-openmpi")
     (inputs
-     `(("openmpi" ,openmpi)
-       ("hdf5" ,hdf5-parallel-openmpi)
+     `(("hdf5" ,hdf5-parallel-openmpi)
+       ("metis" ,metis)
+       ("mumps" ,mumps-openmpi)
+       ("openmpi" ,openmpi)
+       ("scalapack" ,scalapack)
+       ("scotch" ,pt-scotch)
        ,@(package-inputs petsc)))
     (arguments
      (substitute-keyword-arguments (package-arguments petsc)
        ((#:configure-flags cf)
         ``("--with-mpiexec=mpirun"
+           "--with-metis=1"
+           "--with-mumps=1"
+           "--with-scalapack=1"
+           "--with-ptscotch=1"
            ,(string-append "--with-mpi-dir="
                            (assoc-ref %build-inputs "openmpi"))
            ,(string-append "--with-hdf5-include="
@@ -1718,9 +1726,9 @@ scientific applications modeled by partial differential equations.")
            ,@(delete "--with-mpi=0" ,cf)))
        ((#:phases phases)
         `(modify-phases ,phases
-           (add-before 'check 'mpi-setup
+           (add-before 'configure 'mpi-setup
              ,%openmpi-setup)))))
-    (synopsis "Library to solve PDEs (with MPI support)")))
+    (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
 
 (define-public petsc-complex-openmpi
   (package (inherit petsc-complex)
@@ -1737,7 +1745,6 @@ scientific applications modeled by partial differential equations.")
            ,@(delete "--with-mpi=0" ,cf)))))
     (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
 
-
 (define-public python-kiwisolver
   (package
     (name "python-kiwisolver")
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 9b1aea788c..af67c922b4 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1385,7 +1385,7 @@ protocol allows.")
 (define-public mcabber
   (package
     (name "mcabber")
-    (version "1.0.5")
+    (version "1.1.0")
     (source
      (origin
        (method url-fetch)
@@ -1393,7 +1393,7 @@ protocol allows.")
                            name "-" version ".tar.bz2"))
        (sha256
         (base32
-         "0ixdzk5b3s31a4bdfqgqrsiq7vbgdzhqr49p9pz9cq9bgn0h1wm0"))))
+         "1ggh865p1rf10ffsnf4g6qv9i8bls36dxdb1nzs5r9vdqci2rz04"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags (list "--enable-otr"
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 7dfec16fc7..fc8aadef29 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -125,7 +126,7 @@ bind processes, and much more.")
   ;; Note: 2.0 isn't the default yet, see above.
   (package
     (inherit hwloc)
-    (version "2.0.1")
+    (version "2.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.open-mpi.org/software/hwloc/v"
@@ -133,7 +134,7 @@ bind processes, and much more.")
                                   "/downloads/hwloc-" version ".tar.bz2"))
               (sha256
                (base32
-                "0jf0krj1h95flmb784ifv9vnkdnajjz00p4zbhmja7vm4v67axdr"))))
+                "1phc863d5b2fvwpyyq4mlh4rkjdslh6h0h197zmyk3prwrq7si8l"))))
 
     ;; libnuma is no longer needed.
     (inputs (alist-delete "numactl" (package-inputs hwloc)))
diff --git a/gnu/packages/mtools.scm b/gnu/packages/mtools.scm
index f49a035b41..e4750f579f 100644
--- a/gnu/packages/mtools.scm
+++ b/gnu/packages/mtools.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,7 +28,7 @@
 (define-public mtools
   (package
     (name "mtools")
-    (version "4.0.18")
+    (version "4.0.19")
     (source
      (origin
       (method url-fetch)
@@ -35,7 +36,7 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "1hxciksv7av5ilnkvwbidyxxr1gzn24lr0mz9z8drkml7780im1h"))))
+        "003qnj4rs22v2sih3is55scvav8xq9p1dp5b7gnyl67a60ky516r"))))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/mtools/")
     (synopsis "Access MS-DOS disks without mounting")
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index e563062018..2d834d8c1f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1996,7 +1996,7 @@ capabilities, custom envelopes, effects, etc.")
 (define-public yoshimi
   (package
     (name "yoshimi")
-    (version "1.5.8.2")
+    (version "1.5.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/yoshimi/"
@@ -2004,7 +2004,7 @@ capabilities, custom envelopes, effects, etc.")
                                   "/yoshimi-" version ".tar.bz2"))
               (sha256
                (base32
-                "1kg7d6mnzdwzsqhrf7pmrf1hzgfpbpm5lv8xkaz32wiv391qrnxc"))))
+                "1nqwxwq6814m860zrh33r85vdyi2bgkvjg5372h3ngcdmxnb7wr0"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ; there are no tests
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 4800c2496b..e3486ffadc 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -902,7 +902,7 @@ private (reserved).")
 (define-public perl-net-dns
  (package
   (name "perl-net-dns")
-  (version "1.17")
+  (version "1.18")
   (source
     (origin
       (method url-fetch)
@@ -914,7 +914,7 @@ private (reserved).")
                        version ".tar.gz")))
       (sha256
         (base32
-          "1q62w9rf2w8kjzqagzr0rdn20ybl8gj3l6cdq4k8fw0sxa7zsycs"))))
+          "1lx902cbvlfl63bqfdrnyavmfwbjvrfdnwgdc1dgs1wpzja19kjj"))))
   (build-system perl-build-system)
   (inputs
     `(("perl-digest-hmac" ,perl-digest-hmac)))
@@ -927,7 +927,7 @@ private (reserved).")
 (define-public perl-socket6
  (package
   (name "perl-socket6")
-  (version "0.28")
+  (version "0.29")
   (source
     (origin
       (method url-fetch)
@@ -937,7 +937,7 @@ private (reserved).")
              ".tar.gz"))
       (sha256
         (base32
-          "11j5jzqbzmwlws9zals43ry2f1nw9qy6im7yhn9ck5rikywrmm5z"))))
+          "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
   (build-system perl-build-system)
   (arguments
    `(#:phases
diff --git a/gnu/packages/nickle.scm b/gnu/packages/nickle.scm
index 860c111f43..c8179419bb 100644
--- a/gnu/packages/nickle.scm
+++ b/gnu/packages/nickle.scm
@@ -28,14 +28,14 @@
 (define-public nickle
   (package
     (name "nickle")
-    (version "2.81")
+    (version "2.82")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://nickle.org/release/nickle-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1daqsflnqqgfkq6w6dknbm42avz70f5qxn7qidvgp472i4a37acr"))))
+                "0jy96z01qbrnmsrywn5mfa14615qdix6b8520qd65c6yjyrk8gs0"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("readline" ,readline)))
diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm
index d32e696438..da979253b0 100644
--- a/gnu/packages/opencl.scm
+++ b/gnu/packages/opencl.scm
@@ -294,23 +294,23 @@ back-end for the LLVM compiler framework.")
 (define-public pocl
   (package
     (name "pocl")
-    (version "1.1")
+    (version "1.2")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/pocl/pocl.git")
              (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
        (sha256
-        (base32 "1z3sqn20ddv1030adchpzs65qng436gc2mb99p213mkh95jkh1l5"))))
+        (base32 "0fyiwd9nrqhl0jsac0bx17p9acpfzhyxp50mmp28mzn7psb9qidg"))
+       (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (native-inputs
      `(("libltdl" ,libltdl)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("clang" ,clang)
-       ("hwloc" ,hwloc "lib")
+       ("hwloc" ,hwloc-2.0 "lib")
        ("llvm" ,llvm)
        ("ocl-icd" ,ocl-icd)))
     (arguments
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index d1ab2ad6da..293573a816 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -101,8 +101,8 @@
   ;; Note: the 'update-guix-package.scm' script expects this definition to
   ;; start precisely like this.
   (let ((version "0.15.0")
-        (commit "3d43017026f9995ad128915db8ca5eafe061bf75")
-        (revision 3))
+        (commit "1d0be47ab680db938ac8da1ee65e1de91e198f67")
+        (revision 5))
     (package
       (name "guix")
 
@@ -118,7 +118,7 @@
                       (commit commit)))
                 (sha256
                  (base32
-                  "167rzz2h33xmmchkplwzfq94s5jwdn5nabsq2lb84s54ps0sm89m"))
+                  "19cn4ndmr9cqd7qh6w3nchbmdpaawdl9kc6g0v6g680vzcja417k"))
                 (file-name (string-append "guix-" version "-checkout"))))
       (build-system gnu-build-system)
       (arguments
@@ -493,7 +493,7 @@ symlinks to the files in a common directory such as /usr/local.")
 (define-public rpm
   (package
     (name "rpm")
-    (version "4.13.0.2")
+    (version "4.14.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://ftp.rpm.org/releases/rpm-"
@@ -501,40 +501,20 @@ symlinks to the files in a common directory such as /usr/local.")
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1521y4ghjns449kzpwkjn9cksh686383xnfx0linzlalqc3jqgig"))))
+                "0armd7dqr8bl0isx8l4xlylm7dikasmxhhcbz336fkp2x30w5jw0"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--with-external-db"   ;use the system's bdb
                            "--enable-python"
                            "--without-lua")
        #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'set-nspr-search-path
+                  (add-before 'configure 'set-nss-library-path
                     (lambda* (#:key inputs #:allow-other-keys)
-                      ;; nspr.pc contains the right -I flag pointing to
-                      ;; 'include/nspr', but unfortunately 'configure' doesn't
-                      ;; use 'pkg-config'.  Thus, augment CPATH.
-                      ;; Likewise for NSS.
-                      (let ((nspr (assoc-ref inputs "nspr"))
-                            (nss  (assoc-ref inputs "nss")))
-                        (setenv "CPATH"
-                                (string-append (getenv "C_INCLUDE_PATH") ":"
-                                               nspr "/include/nspr:"
-                                               nss "/include/nss"))
+                      (let ((nss (assoc-ref inputs "nss")))
                         (setenv "LIBRARY_PATH"
                                 (string-append (getenv "LIBRARY_PATH") ":"
                                                nss "/lib/nss"))
-                        #t)))
-                  (add-after 'install 'fix-rpm-symlinks
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; 'make install' gets these symlinks wrong.  Fix them.
-                      (let* ((out (assoc-ref outputs "out"))
-                             (bin (string-append out "/bin")))
-                        (with-directory-excursion bin
-                          (for-each (lambda (file)
-                                      (delete-file file)
-                                      (symlink "rpm" file))
-                                    '("rpmquery" "rpmverify"))
-                          #t)))))))
+                        #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
@@ -550,7 +530,7 @@ symlinks to the files in a common directory such as /usr/local.")
        ("bzip2" ,bzip2)
        ("zlib" ,zlib)
        ("cpio" ,cpio)))
-    (home-page "http://www.rpm.org/")
+    (home-page "http://rpm.org/")
     (synopsis "The RPM Package Manager")
     (description
      "The RPM Package Manager (RPM) is a command-line driven package
diff --git a/gnu/packages/patches/ghc-haddock-library-unbundle.patch b/gnu/packages/patches/ghc-haddock-library-unbundle.patch
new file mode 100644
index 0000000000..0e8b548956
--- /dev/null
+++ b/gnu/packages/patches/ghc-haddock-library-unbundle.patch
@@ -0,0 +1,86 @@
+This patch (inspired by Debian) allows ghc-haddock-library to use our
+ghc-attoparsec package instead of using a bundled version.
+
+--- a/haddock-library.cabal	2018-09-01 01:22:18.676855884 -0400
++++ b/haddock-library.cabal	2018-09-01 01:25:10.501150260 -0400
+@@ -10,7 +10,6 @@
+                       itself, see the ‘haddock’ package.
+ license:              BSD3
+ license-files:        LICENSE
+-                      vendor/attoparsec-0.13.1.0/LICENSE
+ maintainer:           Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
+ homepage:             http://www.haskell.org/haddock/
+ bug-reports:          https://github.com/haskell/haddock/issues
+@@ -28,7 +27,6 @@
+     , containers   >= 0.4.2.1 && < 0.6
+     , transformers >= 0.3.0   && < 0.6
+ 
+-  -- internal sub-lib
+   build-depends:        attoparsec
+ 
+   hs-source-dirs:       src
+@@ -49,42 +47,6 @@
+   if impl(ghc >= 8.0)
+     ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
+ 
+-library attoparsec
+-  default-language:     Haskell2010
+-
+-  build-depends:
+-      base         >= 4.5     && < 4.12
+-    , bytestring   >= 0.9.2.1 && < 0.11
+-    , deepseq      >= 1.3     && < 1.5
+-
+-  hs-source-dirs:       vendor/attoparsec-0.13.1.0
+-
+-  -- NB: haddock-library needs only small part of lib:attoparsec
+-  --     internally, so we only bundle that subset here
+-  exposed-modules:
+-    Data.Attoparsec.ByteString
+-    Data.Attoparsec.ByteString.Char8
+-    Data.Attoparsec.Combinator
+-
+-  other-modules:
+-    Data.Attoparsec
+-    Data.Attoparsec.ByteString.Buffer
+-    Data.Attoparsec.ByteString.FastSet
+-    Data.Attoparsec.ByteString.Internal
+-    Data.Attoparsec.Internal
+-    Data.Attoparsec.Internal.Fhthagn
+-    Data.Attoparsec.Internal.Types
+-    Data.Attoparsec.Number
+-
+-  ghc-options:          -funbox-strict-fields -Wall -fwarn-tabs -O2
+-
+-  ghc-options: -Wall
+-  if impl(ghc >= 8.0)
+-    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
+-  else
+-    build-depends: semigroups ^>= 0.18.3, fail ^>= 4.9.0.0
+-
+-
+ test-suite spec
+   type:             exitcode-stdio-1.0
+   default-language: Haskell2010
+@@ -115,11 +77,10 @@
+     , hspec         ^>= 2.4.4
+     , QuickCheck    ^>= 2.11
+ 
+-  -- internal sub-lib
+   build-depends: attoparsec
+ 
+   -- Versions for the dependencies below are transitively pinned by
+-  -- dependency on haddock-library:lib:attoparsec
++  -- dependency on attoparsec
+   build-depends:
+       base
+     , bytestring
+@@ -146,7 +107,7 @@
+     haddock-library
+ 
+   -- Versions for the dependencies below are transitively pinned by
+-  -- dependency on haddock-library:lib:attoparsec
++  -- dependency on attoparsec
+   build-depends:
+       base
+ 
diff --git a/gnu/packages/patches/icecat-avoid-bundled-libraries.patch b/gnu/packages/patches/icecat-avoid-bundled-libraries.patch
index b5e9fb887e..33203b1a33 100644
--- a/gnu/packages/patches/icecat-avoid-bundled-libraries.patch
+++ b/gnu/packages/patches/icecat-avoid-bundled-libraries.patch
@@ -33,3 +33,17 @@ Fixes needed when avoiding bundled libraries.
      '/dom/base',
      '/dom/storage',
      '/ipc/glue',
+--- icecat-60.2.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build.orig	2018-09-13 17:40:54.000000000 -0400
++++ icecat-60.2.0/media/webrtc/trunk/webrtc/base/rtc_task_queue_gn/moz.build	2018-09-23 21:33:12.319975105 -0400
+@@ -130,11 +130,6 @@
+     DEFINES["WEBRTC_POSIX"] = True
+     DEFINES["_FILE_OFFSET_BITS"] = "64"
+ 
+-    LOCAL_INCLUDES += [
+-        "/ipc/chromium/src/third_party/libevent/include/",
+-        "/ipc/chromium/src/third_party/libevent/linux/"
+-    ]
+-
+     UNIFIED_SOURCES += [
+         "/media/webrtc/trunk/webrtc/base/task_queue_libevent.cc",
+         "/media/webrtc/trunk/webrtc/base/task_queue_posix.cc"
diff --git a/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch b/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch
new file mode 100644
index 0000000000..94c211b797
--- /dev/null
+++ b/gnu/packages/patches/icecat-use-system-graphite2+harfbuzz.patch
@@ -0,0 +1,226 @@
+Allow building against system-wide graphite2/harfbuzz.
+See <https://bugzilla.mozilla.org/show_bug.cgi?id=847568>
+Based on:
+  https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-bug847568?revision=472833&view=co
+Modified for use with patch -p1, and to apply cleanly to GNU IceCat.
+
+--- icecat-60.2.0/config/system-headers.mozbuild
++++ icecat-60.2.0/config/system-headers.mozbuild
+@@ -1311,6 +1311,19 @@
+         'pixman.h',
+     ]
+ 
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++    system_headers += [
++        'graphite2/Font.h',
++        'graphite2/Segment.h',
++    ]
++
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    system_headers += [
++        'harfbuzz/hb-glib.h',
++        'harfbuzz/hb-ot.h',
++        'harfbuzz/hb.h',
++    ]
++
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+     system_headers += [
+         'vpx_mem/vpx_mem.h',
+--- icecat-60.2.0/dom/base/moz.build
++++ icecat-60.2.0/dom/base/moz.build
+@@ -474,6 +474,9 @@
+ if CONFIG['MOZ_X11']:
+     CXXFLAGS += CONFIG['TK_CFLAGS']
+ 
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ GENERATED_FILES += [
+     'PropertyUseCounterMap.inc',
+     'UseCounterList.h',
+--- icecat-60.2.0/gfx/graphite2/moz-gr-update.sh
++++ icecat-60.2.0/gfx/graphite2/moz-gr-update.sh
+@@ -1,6 +1,7 @@
+ #!/bin/bash
+ 
+ # Script used to update the Graphite2 library in the mozilla source tree
++# and bump version for --with-system-graphite2
+ 
+ # This script lives in gfx/graphite2, along with the library source,
+ # but must be run from the top level of the mozilla-central tree.
+@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
+ #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ 
++# chase version for --with-system-graphite2
++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
++  if /GR2_VERSION_REQUIRE/" old-configure.in
++
+ # summarize what's been touched
+ echo Updated to $RELEASE.
+ echo Here is what changed in the gfx/graphite2 directory:
+ echo
+ 
+-hg stat gfx/graphite2
++hg stat old-configure.in gfx/graphite2
+ 
+ echo
+ echo If gfx/graphite2/src/files.mk has changed, please make corresponding
+--- icecat-60.2.0/gfx/moz.build
++++ icecat-60.2.0/gfx/moz.build
+@@ -10,6 +10,12 @@ with Files('**'):
+ if CONFIG['MOZ_TREE_CAIRO']:
+     DIRS += ['cairo']
+ 
++if not CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++    DIRS += ['graphite2/src' ]
++
++if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    DIRS += ['harfbuzz/src']
++
+ DIRS += [
+     '2d',
+     'ycbcr',
+@@ -18,8 +24,6 @@ DIRS += [
+     'qcms',
+     'gl',
+     'layers',
+-    'graphite2/src',
+-    'harfbuzz/src',
+     'ots/src',
+     'thebes',
+     'ipc',
+--- icecat-60.2.0/gfx/skia/generate_mozbuild.py
++++ icecat-60.2.0/gfx/skia/generate_mozbuild.py
+@@ -148,6 +148,9 @@
+         '-Wno-unused-private-field',
+     ]
+ 
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
+     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+--- icecat-60.2.0/gfx/skia/moz.build
++++ icecat-60.2.0/gfx/skia/moz.build
+@@ -822,6 +822,9 @@
+         '-Wno-unused-private-field',
+     ]
+ 
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
+     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+--- icecat-60.2.0/gfx/thebes/moz.build
++++ icecat-60.2.0/gfx/thebes/moz.build
+@@ -272,7 +272,13 @@
+ 
+ LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
+ 
+-DEFINES['GRAPHITE2_STATIC'] = True
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
++else:
++    DEFINES['GRAPHITE2_STATIC'] = True
++
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+ 
+ if CONFIG['CC_TYPE'] == 'clang':
+     # Suppress warnings from Skia header files.
+--- icecat-60.2.0/intl/unicharutil/util/moz.build
++++ icecat-60.2.0/intl/unicharutil/util/moz.build
+@@ -25,4 +25,7 @@ UNIFIED_SOURCES += [
+     'nsUnicodeProperties.cpp',
+ ]
+ 
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ FINAL_LIBRARY = 'xul'
+--- icecat-60.2.0/netwerk/dns/moz.build
++++ icecat-60.2.0/netwerk/dns/moz.build
+@@ -76,3 +76,6 @@
+ 
+ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+     CXXFLAGS += ['-Wno-error=shadow']
++
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+--- icecat-60.2.0/old-configure.in
++++ icecat-60.2.0/old-configure.in
+@@ -3995,6 +3995,27 @@
+ AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
+ 
+ dnl ========================================================
++dnl Check for graphite2
++dnl ========================================================
++if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
++    dnl graphite2.pc has bogus version, check manually
++    _SAVE_CFLAGS=$CFLAGS
++    CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
++    AC_TRY_COMPILE([ #include <graphite2/Font.h>
++                     #define GR2_VERSION_REQUIRE(major,minor,bugfix)  \
++                             ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
++                               * 100 + GR2_VERSION_BUGFIX >= \
++                               (major) * 10000 + (minor) * 100 + (bugfix) )
++                   ], [
++                     #if !GR2_VERSION_REQUIRE(1,3,10)
++                     #error "Insufficient graphite2 version."
++                     #endif
++                   ], [],
++                   [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
++    CFLAGS=$_SAVE_CFLAGS
++fi
++
++dnl ========================================================
+ dnl Check for pixman and cairo
+ dnl ========================================================
+ 
+--- icecat-60.2.0/toolkit/library/moz.build
++++ icecat-60.2.0/toolkit/library/moz.build
+@@ -235,6 +235,12 @@
+ if CONFIG['MOZ_SYSTEM_PNG']:
+     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
+ 
++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
++    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
++
++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
++    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+ 
+--- icecat-60.2.0/toolkit/moz.configure
++++ icecat-60.2.0/toolkit/moz.configure
+@@ -1051,6 +1051,26 @@
+ add_old_configure_assignment('FT2_CFLAGS',
+                              ft2_info.cflags)
+ 
++# Graphite2
++# ==============================================================
++option('--with-system-graphite2',
++       help="Use system graphite2 (located with pkgconfig)")
++
++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
++                                     when='--with-system-graphite2')
++
++set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
++
++# HarfBuzz
++# ==============================================================
++option('--with-system-harfbuzz',
++       help="Use system harfbuzz (located with pkgconfig)")
++
++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.7.4',
++                                    when='--with-system-harfbuzz')
++
++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
++
+ # Mortar
+ # ==============================================================
+ option('--enable-mortar', help='Enable mortar extension')
diff --git a/gnu/packages/patches/icecat-use-system-graphite2.patch b/gnu/packages/patches/icecat-use-system-graphite2.patch
deleted file mode 100644
index 188fba2bc9..0000000000
--- a/gnu/packages/patches/icecat-use-system-graphite2.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-Copied from <https://reviewboard.mozilla.org/r/90218/diff/4>
-See <https://bugzilla.mozilla.org/show_bug.cgi?id=847568>
-
-diff --git a/config/Makefile.in b/config/Makefile.in
---- a/config/Makefile.in
-+++ b/config/Makefile.in
-@@ -36,16 +36,17 @@ ifdef WRAP_SYSTEM_INCLUDES
- export-preqs = \
-   $(call mkdir_deps,system_wrappers) \
-   $(NULL)
- 
- export:: $(export-preqs)
- 	$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
- 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
- 		-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
-+		-DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
- 		-DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
- 		-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
- 		-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
- 		-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
- 		-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
- 		-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
- 		-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
- 		-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
-diff --git a/config/system-headers b/config/system-headers
---- a/config/system-headers
-+++ b/config/system-headers
-@@ -1260,16 +1260,20 @@ zlib.h
- #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
- libsn/sn.h
- libsn/sn-common.h
- libsn/sn-launchee.h
- libsn/sn-launcher.h
- libsn/sn-monitor.h
- libsn/sn-util.h
- #endif
-+#if MOZ_SYSTEM_GRAPHITE2==1
-+graphite2/Font.h
-+graphite2/Segment.h
-+#endif
- #if MOZ_SYSTEM_HARFBUZZ==1
- harfbuzz/hb-glib.h
- harfbuzz/hb-ot.h
- harfbuzz/hb.h
- #endif
- #if MOZ_SYSTEM_HUNSPELL==1
- hunspell.hxx
- #endif
-diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh
---- a/gfx/graphite2/moz-gr-update.sh
-+++ b/gfx/graphite2/moz-gr-update.sh
-@@ -1,11 +1,12 @@
- #!/bin/bash
- 
- # Script used to update the Graphite2 library in the mozilla source tree
-+# and bump version for --with-system-graphite2
- 
- # This script lives in gfx/graphite2, along with the library source,
- # but must be run from the top level of the mozilla-central tree.
- 
- # Run as
- #
- #    ./gfx/graphite2/moz-gr-update.sh RELEASE
- #
-@@ -32,22 +33,26 @@ echo "This directory contains the Graphi
- echo "$TARBALL" >> gfx/graphite2/README.mozilla
- echo ""
- echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
- 
- # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
- #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
- #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
- 
-+# chase version for --with-system-graphite2
-+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
-+  if /GR2_VERSION_REQUIRE/" old-configure.in
-+
- # summarize what's been touched
- echo Updated to $RELEASE.
- echo Here is what changed in the gfx/graphite2 directory:
- echo
- 
--hg stat gfx/graphite2
-+hg stat old-configure.in gfx/graphite2
- 
- echo
- echo If gfx/graphite2/src/files.mk has changed, please make corresponding
- echo changes to gfx/graphite2/src/moz.build
- echo
- 
- echo
- echo Now use hg commands to create a patch for the mozilla tree.
-diff --git a/gfx/moz.build b/gfx/moz.build
---- a/gfx/moz.build
-+++ b/gfx/moz.build
-@@ -2,28 +2,30 @@
- # vim: set filetype=python:
- # This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
- if CONFIG['MOZ_TREE_CAIRO']:
-     DIRS += ['cairo']
- 
-+if not CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    DIRS += ['graphite2/src' ]
-+
- if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-     DIRS += ['harfbuzz/src']
- 
- DIRS += [
-     '2d',
-     'ycbcr',
-     'angle',
-     'src',
-     'qcms',
-     'gl',
-     'layers',
--    'graphite2/src',
-     'ots/src',
-     'thebes',
-     'ipc',
-     'vr',
-     'config',
- ]
- 
- if CONFIG['MOZ_ENABLE_SKIA']:
-diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
---- a/gfx/thebes/moz.build
-+++ b/gfx/thebes/moz.build
-@@ -261,16 +261,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
-     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
- 
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
-     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
- 
- LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
- LOCAL_INCLUDES += ['/media/libyuv/include']
- 
--DEFINES['GRAPHITE2_STATIC'] = True
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
-+else:
-+    DEFINES['GRAPHITE2_STATIC'] = True
- 
- if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-     CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
- 
- if CONFIG['CLANG_CXX']:
-     # Suppress warnings from Skia header files.
-     SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
-diff --git a/moz.configure b/moz.configure
---- a/moz.configure
-+++ b/moz.configure
-@@ -260,16 +260,28 @@ def extra_programs(target):
- 
- check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'),
-            allow_missing=True)
- check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
-            allow_missing=True)
- check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
-            allow_missing=True)
- 
-+option('--with-system-graphite2',
-+       help="Use system graphite2 (located with pkgconfig)")
-+
-+@depends('--with-system-graphite2', compile_environment)
-+def check_for_graphite2(value, compile_env):
-+    return value and compile_env
-+
-+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
-+                                    check_for_graphite2)
-+
-+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
-+
- option('--with-system-harfbuzz',
-        help="Use system harfbuzz (located with pkgconfig)")
- 
- @depends('--with-system-harfbuzz', compile_environment)
- def check_for_harfbuzz(value, compile_env):
-     return value and compile_env
- 
- system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.3.3',
-diff --git a/old-configure.in b/old-configure.in
---- a/old-configure.in
-+++ b/old-configure.in
-@@ -5060,16 +5060,37 @@ if test "$USE_FC_FREETYPE"; then
-         CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
-         MOZ_CHECK_HEADERS([fontconfig/fcfreetype.h], ,
-             [AC_MSG_ERROR(Can't find header fontconfig/fcfreetype.h.)], [#include <fontconfig/fontconfig.h>])
-         CPPFLAGS="$_SAVE_CPPFLAGS"
-     fi
- fi
- 
- dnl ========================================================
-+dnl Check for graphite2
-+dnl ========================================================
-+if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
-+    dnl graphite2.pc has bogus version, check manually
-+    _SAVE_CFLAGS=$CFLAGS
-+    CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
-+    AC_TRY_COMPILE([ #include <graphite2/Font.h>
-+                     #define GR2_VERSION_REQUIRE(major,minor,bugfix)  \
-+                             ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
-+                               * 100 + GR2_VERSION_BUGFIX >= \
-+                               (major) * 10000 + (minor) * 100 + (bugfix) )
-+                   ], [
-+                     #if !GR2_VERSION_REQUIRE(1,3,8)
-+                     #error "Insufficient graphite2 version."
-+                     #endif
-+                   ], [],
-+                   [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
-+    CFLAGS=$_SAVE_CFLAGS
-+fi
-+
-+dnl ========================================================
- dnl Check for pixman and cairo
- dnl ========================================================
- 
- MOZ_TREE_CAIRO=1
- MOZ_ARG_ENABLE_BOOL(system-cairo,
- [  --enable-system-cairo   Use system cairo (located with pkgconfig)],
- MOZ_TREE_CAIRO=,
- MOZ_TREE_CAIRO=1 )
-diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
---- a/toolkit/library/moz.build
-+++ b/toolkit/library/moz.build
-@@ -221,16 +221,19 @@ if CONFIG['SERVO_TARGET_DIR']:
-         OS_LIBS += ['-L%s' % CONFIG['SERVO_TARGET_DIR'], '-lgeckoservo']
- 
- if CONFIG['MOZ_SYSTEM_JPEG']:
-     OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_PNG']:
-     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
- 
-+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
-+    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
-+
- if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-     OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_HUNSPELL']:
-     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_LIBEVENT']:
-     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
-
diff --git a/gnu/packages/patches/icecat-use-system-harfbuzz.patch b/gnu/packages/patches/icecat-use-system-harfbuzz.patch
deleted file mode 100644
index 083d404c13..0000000000
--- a/gnu/packages/patches/icecat-use-system-harfbuzz.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-Copied from <https://reviewboard.mozilla.org/r/35763/diff/9>
-See <https://bugzilla.mozilla.org/show_bug.cgi?id=847568>
-
-diff --git a/config/Makefile.in b/config/Makefile.in
---- a/config/Makefile.in
-+++ b/config/Makefile.in
-@@ -36,16 +36,17 @@ ifdef WRAP_SYSTEM_INCLUDES
- export-preqs = \
-   $(call mkdir_deps,system_wrappers) \
-   $(NULL)
- 
- export:: $(export-preqs)
- 	$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
- 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
- 		-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
-+		-DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
- 		-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
- 		-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
- 		-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
- 		-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
- 		-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
- 		-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
- 		-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
- 		-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
-diff --git a/config/system-headers b/config/system-headers
---- a/config/system-headers
-+++ b/config/system-headers
-@@ -1260,16 +1260,21 @@ zlib.h
- #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
- libsn/sn.h
- libsn/sn-common.h
- libsn/sn-launchee.h
- libsn/sn-launcher.h
- libsn/sn-monitor.h
- libsn/sn-util.h
- #endif
-+#if MOZ_SYSTEM_HARFBUZZ==1
-+harfbuzz/hb-glib.h
-+harfbuzz/hb-ot.h
-+harfbuzz/hb.h
-+#endif
- #if MOZ_SYSTEM_HUNSPELL==1
- hunspell.hxx
- #endif
- #if MOZ_SYSTEM_BZ2==1
- bzlib.h
- #endif
- #ifdef MOZ_ENABLE_GIO
- gio/gio.h
-diff --git a/dom/base/moz.build b/dom/base/moz.build
---- a/dom/base/moz.build
-+++ b/dom/base/moz.build
-@@ -474,16 +474,19 @@ for var in ('MOZ_B2G_RIL'):
-         DEFINES[var] = True
- 
- if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
-     DEFINES['HAVE_SIDEBAR'] = True
- 
- if CONFIG['MOZ_X11']:
-     CXXFLAGS += CONFIG['TK_CFLAGS']
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- GENERATED_FILES += [
-     'PropertyUseCounterMap.inc',
-     'UseCounterList.h',
- ]
- 
- countermap = GENERATED_FILES['PropertyUseCounterMap.inc']
- countermap.script = 'gen-usecounters.py:property_map'
- countermap.inputs = ['UseCounters.conf']
-diff --git a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla
---- a/gfx/harfbuzz/README-mozilla
-+++ b/gfx/harfbuzz/README-mozilla
-@@ -14,8 +14,13 @@ this file when updating harfbuzz, and ch
- 
- The normal approach to updating harfbuzz, therefore, is to pull the latest HB
- source into a scratch directory and do a local build; then copy the original
- sources AND the generated header mentioned above from the build directory into
- the mozilla tree.
- 
- If the collection of source files changes, manual updates to moz.build may be
- needed, as we don't use the upstream makefiles.
-+
-+The in-tree copy may be omitted during build by --with-system-harfbuzz.
-+Make sure to keep pkg-config version check within old-configure.in in sync
-+with checkout version or increment latest tag by one if it's not based
-+on upstream release.
-diff --git a/gfx/moz.build b/gfx/moz.build
---- a/gfx/moz.build
-+++ b/gfx/moz.build
-@@ -2,26 +2,28 @@
- # vim: set filetype=python:
- # This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
- if CONFIG['MOZ_TREE_CAIRO']:
-     DIRS += ['cairo']
- 
-+if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    DIRS += ['harfbuzz/src']
-+
- DIRS += [
-     '2d',
-     'ycbcr',
-     'angle',
-     'src',
-     'qcms',
-     'gl',
-     'layers',
-     'graphite2/src',
--    'harfbuzz/src',
-     'ots/src',
-     'thebes',
-     'ipc',
-     'vr',
-     'config',
- ]
- 
- if CONFIG['MOZ_ENABLE_SKIA']:
-diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py
---- a/gfx/skia/generate_mozbuild.py
-+++ b/gfx/skia/generate_mozbuild.py
-@@ -138,16 +138,19 @@ if CONFIG['GNU_CXX'] and not CONFIG['CLA
- if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
-     CXXFLAGS += [
-         '-Wno-implicit-fallthrough',
-         '-Wno-inconsistent-missing-override',
-         '-Wno-macro-redefined',
-         '-Wno-unused-private-field',
-     ]
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
-     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
-     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
- 
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
-     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
- """
- 
-diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
---- a/gfx/skia/moz.build
-+++ b/gfx/skia/moz.build
-@@ -748,14 +748,17 @@ if CONFIG['GNU_CXX'] and not CONFIG['CLA
- if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
-     CXXFLAGS += [
-         '-Wno-implicit-fallthrough',
-         '-Wno-inconsistent-missing-override',
-         '-Wno-macro-redefined',
-         '-Wno-unused-private-field',
-     ]
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
-     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
-     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
- 
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
-     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
-diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build
---- a/gfx/thebes/moz.build
-+++ b/gfx/thebes/moz.build
-@@ -263,11 +263,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
- if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
-     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
- 
- LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
- LOCAL_INCLUDES += ['/media/libyuv/include']
- 
- DEFINES['GRAPHITE2_STATIC'] = True
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- if CONFIG['CLANG_CXX']:
-     # Suppress warnings from Skia header files.
-     SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough']
-diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build
---- a/intl/unicharutil/util/moz.build
-+++ b/intl/unicharutil/util/moz.build
-@@ -37,9 +37,12 @@ if CONFIG['_MSC_VER']:
-     DEFINES['_USE_ANSI_CPP'] = True
-     # Don't include directives about which CRT to use
-     CFLAGS += ['-Zl']
-     CXXFLAGS += ['-Zl']
- 
- if CONFIG['ENABLE_INTL_API']:
-     USE_LIBS += ['icu']
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- DIST_INSTALL = True
-diff --git a/moz.configure b/moz.configure
---- a/moz.configure
-+++ b/moz.configure
-@@ -260,16 +260,28 @@ def extra_programs(target):
- 
- check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'),
-            allow_missing=True)
- check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
-            allow_missing=True)
- check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
-            allow_missing=True)
- 
-+option('--with-system-harfbuzz',
-+       help="Use system harfbuzz (located with pkgconfig)")
-+
-+@depends('--with-system-harfbuzz', compile_environment)
-+def check_for_harfbuzz(value, compile_env):
-+    return value and compile_env
-+
-+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.3.3',
-+                                    check_for_harfbuzz)
-+
-+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
-+
- option('--enable-system-hunspell',
-        help="Use system hunspell (located with pkgconfig)")
- 
- @depends('--enable-system-hunspell', compile_environment)
- def check_for_hunspell(value, compile_env):
-     return value and compile_env
- 
- system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell',
-diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build
---- a/netwerk/dns/moz.build
-+++ b/netwerk/dns/moz.build
-@@ -61,16 +61,19 @@ etld_data = GENERATED_FILES['etld_data.i
- etld_data.script = 'prepare_tlds.py'
- etld_data.inputs = ['effective_tld_names.dat']
- 
- # need to include etld_data.inc
- LOCAL_INCLUDES += [
-     '/netwerk/base',
- ]
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
-+
- if CONFIG['ENABLE_INTL_API']:
-     DEFINES['IDNA2008'] = True
-     USE_LIBS += ['icu']
- else:
-     UNIFIED_SOURCES += [
-         'nameprep.c',
-     ]
- 
-diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
---- a/toolkit/library/moz.build
-+++ b/toolkit/library/moz.build
-@@ -221,16 +221,19 @@ if CONFIG['SERVO_TARGET_DIR']:
-         OS_LIBS += ['-L%s' % CONFIG['SERVO_TARGET_DIR'], '-lgeckoservo']
- 
- if CONFIG['MOZ_SYSTEM_JPEG']:
-     OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_PNG']:
-     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
- 
-+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
-+    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
-+
- if CONFIG['MOZ_SYSTEM_HUNSPELL']:
-     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_LIBEVENT']:
-     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
- 
- if CONFIG['MOZ_SYSTEM_LIBVPX']:
-     OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
-
diff --git a/gnu/packages/patches/icecat-use-system-media-libs.patch b/gnu/packages/patches/icecat-use-system-media-libs.patch
new file mode 100644
index 0000000000..648585a6f0
--- /dev/null
+++ b/gnu/packages/patches/icecat-use-system-media-libs.patch
@@ -0,0 +1,381 @@
+Support building with system media libraries.
+See <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>
+
+Based on:
+  https://svnweb.freebsd.org/ports/head/www/firefox-esr/files/patch-z-bug517422?revision=472833&view=markup
+
+Changes to files within the bundled libraries are omitted, since those files
+are removed from Guix sources.  Modified for use with patch -p1, and to apply
+cleanly to GNU IceCat.
+
+--- icecat-60.2.0/build/moz.configure/old.configure
++++ icecat-60.2.0/build/moz.configure/old.configure
+@@ -273,7 +273,12 @@
+     '--with-system-libvpx',
+     '--with-system-nspr',
+     '--with-system-nss',
++    '--with-system-ogg',
+     '--with-system-png',
++    '--with-system-soundtouch',
++    '--with-system-theora',
++    '--with-system-tremor',
++    '--with-system-vorbis',
+     '--with-system-zlib',
+     '--with-thumb',
+     '--with-thumb-interwork',
+--- icecat-60.2.0/config/external/moz.build
++++ icecat-60.2.0/config/external/moz.build
+@@ -23,12 +23,21 @@
+ 
+ external_dirs += ['modules/xz-embedded']
+ 
+-if CONFIG['MOZ_VORBIS']:
++if not CONFIG['MOZ_SYSTEM_OGG']:
++    external_dirs += ['media/libogg']
++
++if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_SYSTEM_VORBIS']:
+     external_dirs += ['media/libvorbis']
+ 
+-if CONFIG['MOZ_TREMOR']:
++if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_SYSTEM_TREMOR']:
+     external_dirs += ['media/libtremor']
+ 
++if not CONFIG['MOZ_SYSTEM_THEORA']:
++    external_dirs += ['media/libtheora']
++
++if not CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
++    external_dirs += ['media/libsoundtouch']
++
+ if CONFIG['MOZ_WEBM_ENCODER']:
+     external_dirs += ['media/libmkv']
+ 
+@@ -51,11 +60,8 @@
+     'media/kiss_fft',
+     'media/libcubeb',
+     'media/libnestegg',
+-    'media/libogg',
+     'media/libopus',
+-    'media/libtheora',
+     'media/libspeex_resampler',
+-    'media/libsoundtouch',
+     'media/mp4parse-rust',
+     'media/psshparser'
+ ]
+--- icecat-60.2.0/config/system-headers.mozbuild
++++ icecat-60.2.0/config/system-headers.mozbuild
+@@ -1324,6 +1324,28 @@
+         'harfbuzz/hb.h',
+     ]
+ 
++if CONFIG['MOZ_SYSTEM_OGG']:
++    system_headers += [
++        'ogg/ogg.h',
++        'ogg/os_types.h',
++    ]
++
++if CONFIG['MOZ_SYSTEM_THEORA']:
++    system_headers += [
++        'theora/theoradec.h',
++    ]
++
++if CONFIG['MOZ_SYSTEM_VORBIS']:
++    system_headers += [
++        'vorbis/codec.h',
++        'vorbis/vorbisenc.h',
++    ]
++
++if CONFIG['MOZ_SYSTEM_TREMOR']:
++    system_headers += [
++        'tremor/ivorbiscodec.h',
++    ]
++
+ if CONFIG['MOZ_SYSTEM_LIBVPX']:
+     system_headers += [
+         'vpx_mem/vpx_mem.h',
+--- icecat-60.2.0/dom/media/AudioStream.cpp
++++ icecat-60.2.0/dom/media/AudioStream.cpp
+@@ -121,7 +121,9 @@
+   : mMonitor("AudioStream")
+   , mChannels(0)
+   , mOutChannels(0)
++#ifndef MOZ_SYSTEM_SOUNDTOUCH
+   , mTimeStretcher(nullptr)
++#endif
+   , mDumpFile(nullptr)
+   , mState(INITIALIZED)
+   , mDataSource(aSource)
+@@ -142,9 +144,11 @@
+   if (mDumpFile) {
+     fclose(mDumpFile);
+   }
++#ifndef MOZ_SYSTEM_SOUNDTOUCH
+   if (mTimeStretcher) {
+     soundtouch::destroySoundTouchObj(mTimeStretcher);
+   }
++#endif
+ #if defined(XP_WIN)
+   if (XRE_IsContentProcess()) {
+     audio::AudioNotificationReceiver::Unregister(this);
+@@ -168,7 +172,11 @@
+ {
+   mMonitor.AssertCurrentThreadOwns();
+   if (!mTimeStretcher) {
++#ifdef MOZ_SYSTEM_SOUNDTOUCH
++    mTimeStretcher = new soundtouch::SoundTouch();
++#else
+     mTimeStretcher = soundtouch::createSoundTouchObj();
++#endif
+     mTimeStretcher->setSampleRate(mAudioClock.GetInputRate());
+     mTimeStretcher->setChannels(mOutChannels);
+     mTimeStretcher->setPitch(1.0);
+--- icecat-60.2.0/dom/media/AudioStream.h
++++ icecat-60.2.0/dom/media/AudioStream.h
+@@ -15,7 +15,11 @@
+ #include "mozilla/TimeStamp.h"
+ #include "mozilla/UniquePtr.h"
+ #include "CubebUtils.h"
++#ifdef MOZ_SYSTEM_SOUNDTOUCH
++#include "soundtouch/SoundTouch.h"
++#else
+ #include "soundtouch/SoundTouchFactory.h"
++#endif
+ 
+ #if defined(XP_WIN)
+ #include "mozilla/audio/AudioNotificationReceiver.h"
+@@ -297,7 +301,11 @@
+   uint32_t mChannels;
+   uint32_t mOutChannels;
+   AudioClock mAudioClock;
++#ifdef MOZ_SYSTEM_SOUNDTOUCH
++  nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher;
++#else
+   soundtouch::SoundTouch* mTimeStretcher;
++#endif
+ 
+   // Output file for dumping audio
+   FILE* mDumpFile;
+--- icecat-60.2.0/dom/media/moz.build
++++ icecat-60.2.0/dom/media/moz.build
+@@ -327,6 +327,21 @@
+ 
+ DEFINES['MOZILLA_INTERNAL_API'] = True
+ 
++if CONFIG['MOZ_SYSTEM_OGG']:
++    CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
++
++if CONFIG['MOZ_SYSTEM_THEORA']:
++    CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
++
++if CONFIG['MOZ_SYSTEM_VORBIS']:
++    CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
++
++if CONFIG['MOZ_SYSTEM_TREMOR']:
++    CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
++
++if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
++    CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
++
+ if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
+     DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
+ 
+--- icecat-60.2.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
++++ icecat-60.2.0/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
+@@ -15,9 +15,13 @@
+ #include <windows.h>
+ #endif
+ 
++#ifdef MOZ_SYSTEM_SOUNDTOUCH
++#include "nsXPCOMPrivate.h" // for XUL_DLL
++#else
+ // We use a known symbol located in lgpllibs to determine its location.
+ // soundtouch happens to be always included in lgpllibs
+ #include "soundtouch/SoundTouch.h"
++#endif
+ 
+ namespace mozilla {
+ 
+@@ -64,6 +68,12 @@
+ 
+   sLinkStatus = LinkStatus_FAILED;
+ 
++#ifdef MOZ_SYSTEM_SOUNDTOUCH
++  // We retrieve the path of the XUL library as this is where mozavcodec and
++  // mozavutil libs are located.
++  char* path =
++    PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init);
++#else
+   // We retrieve the path of the lgpllibs library as this is where mozavcodec
+   // and mozavutil libs are located.
+   PathString lgpllibsname = GetLibraryName(nullptr, "lgpllibs");
+@@ -73,6 +83,7 @@
+   PathString path =
+     GetLibraryFilePathname(lgpllibsname.get(),
+                            (PRFuncPtr)&soundtouch::SoundTouch::getVersionId);
++#endif
+   if (path.IsEmpty()) {
+     return false;
+   }
+--- icecat-60.2.0/old-configure.in
++++ icecat-60.2.0/old-configure.in
+@@ -2451,6 +2451,111 @@
+ fi
+ fi # COMPILE_ENVIRONMENT
+ 
++dnl ========================================================
++dnl Check for libogg
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-ogg,
++[  --with-system-ogg       Use system libogg (located with pkgconfig)],
++MOZ_SYSTEM_OGG=1,
++MOZ_SYSTEM_OGG=)
++
++if test -n "$MOZ_SYSTEM_OGG"; then
++    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.3)
++
++    _SAVE_LIBS=$LIBS
++    LIBS="$LIBS $MOZ_OGG_LIBS"
++    AC_CHECK_FUNC(ogg_set_mem_functions, [],
++      [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
++    LIBS=$_SAVE_LIBS
++fi
++
++AC_SUBST(MOZ_SYSTEM_OGG)
++
++dnl ========================================================
++dnl Check for libvorbis
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-vorbis,
++[  --with-system-vorbis    Use system libvorbis (located with pkgconfig)],
++MOZ_SYSTEM_VORBIS=1,
++MOZ_SYSTEM_VORBIS=)
++
++if test -n "$MOZ_SYSTEM_VORBIS"; then
++    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.6)
++fi
++
++AC_SUBST(MOZ_SYSTEM_VORBIS)
++
++dnl ========================================================
++dnl Check for integer-only libvorbis aka tremor
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-tremor,
++[  --with-system-tremor    Use system libtremor (located with pkgconfig)],
++MOZ_SYSTEM_TREMOR=1,
++MOZ_SYSTEM_TREMOR=)
++
++if test -n "$MOZ_SYSTEM_TREMOR"; then
++    PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
++fi
++
++AC_SUBST(MOZ_SYSTEM_TREMOR)
++
++dnl ========================================================
++dnl Check for libtheora
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-theora,
++[  --with-system-theora    Use system libtheora (located with pkgconfig)],
++MOZ_SYSTEM_THEORA=1,
++MOZ_SYSTEM_THEORA=)
++
++if test -n "$MOZ_SYSTEM_THEORA"; then
++    PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
++fi
++
++AC_SUBST(MOZ_SYSTEM_THEORA)
++
++dnl ========================================================
++dnl Check for libSoundTouch
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-soundtouch,
++[  --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)],
++MOZ_SYSTEM_SOUNDTOUCH=1,
++MOZ_SYSTEM_SOUNDTOUCH=)
++
++if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
++    PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0)
++
++    AC_LANG_SAVE
++    AC_LANG_CPLUSPLUS
++    _SAVE_CXXFLAGS=$CXXFLAGS
++    CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
++    AC_CACHE_CHECK(for soundtouch sample type,
++                   ac_cv_soundtouch_sample_type,
++                   [AC_TRY_COMPILE([#include <SoundTouch.h>
++                                    #ifndef SOUNDTOUCH_INTEGER_SAMPLES
++                                    #error soundtouch expects float samples
++                                    #endif],
++                                   [],
++                                   [ac_cv_soundtouch_sample_type=short],
++                                   [ac_cv_soundtouch_sample_type=float])])
++    CXXFLAGS=$_SAVE_CXXFLAGS
++    AC_LANG_RESTORE
++
++    if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
++         -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
++        AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.])
++    fi
++fi
++
++if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
++    AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH)
++fi
++AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH)
++
+ dnl system libvpx Support
+ dnl ========================================================
+ MOZ_ARG_WITH_BOOL(system-libvpx,
+--- icecat-60.2.0/toolkit/library/moz.build
++++ icecat-60.2.0/toolkit/library/moz.build
+@@ -244,6 +244,21 @@
+ if CONFIG['MOZ_SYSTEM_HUNSPELL']:
+     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+ 
++if CONFIG['MOZ_SYSTEM_OGG']:
++    OS_LIBS += CONFIG['MOZ_OGG_LIBS']
++
++if CONFIG['MOZ_SYSTEM_THEORA']:
++    OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
++
++if CONFIG['MOZ_SYSTEM_VORBIS']:
++    OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
++
++if CONFIG['MOZ_SYSTEM_TREMOR']:
++    OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
++
++if CONFIG['MOZ_SYSTEM_SOUNDTOUCH']:
++    OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
++
+ if CONFIG['MOZ_SYSTEM_LIBEVENT']:
+     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+ 
+--- icecat-60.2.0/xpcom/build/XPCOMInit.cpp
++++ icecat-60.2.0/xpcom/build/XPCOMInit.cpp
+@@ -138,7 +138,9 @@
+ 
+ #include "mozilla/ipc/GeckoChildProcessHost.h"
+ 
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ #include "ogg/ogg.h"
++#endif
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ #if defined(HAVE_STDINT_H)
+ // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in
+@@ -639,11 +641,13 @@
+   // this oddness.
+   mozilla::SetICUMemoryFunctions();
+ 
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+   // Do the same for libogg.
+   ogg_set_mem_functions(OggReporter::CountingMalloc,
+                         OggReporter::CountingCalloc,
+                         OggReporter::CountingRealloc,
+                         OggReporter::CountingFree);
++#endif
+ 
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+   // And for VPX.
diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch b/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch
new file mode 100644
index 0000000000..6bbec67e75
--- /dev/null
+++ b/gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch
@@ -0,0 +1,45 @@
+From: Jean Delvare <jdelvare@suse.de>
+Subject: compat/getopt: Allow non-digit parameter embedded in short option
+
+The compatibility getopt script allows only digit parameters to be
+embedded in short options. Util-linux's getopt implementation does
+not have such a restriction and allows any parameter to be embedded
+in short options. As a consequence, using the compatibility getopt
+script would choke for example on "-pab", which is a legal option
+of the "quilt refresh" command.
+
+Remove the limitation on digits so that the compatibility getopt
+script allows what util-linux allows. This fixes the second half
+of bug #54772:
+https://savannah.nongnu.org/bugs/index.php?54772
+
+As a side note, this feature of the compatibility script was broken
+anyway, as it would output the digits in reverse order.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+ compat/getopt.in |   13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+--- quilt.orig/compat/getopt.in	2018-10-03 16:05:56.818667040 +0200
++++ quilt/compat/getopt.in	2018-10-03 16:12:17.624841732 +0200
+@@ -108,15 +108,10 @@ foreach my $word (@words) {
+ 				if (scalar(@letters) == 0) {
+ 					$need_param = $letter;
+ 				} else {
+-					# short options can have numerical args
+-					# embedded in the short option list: -UO
+-					die "unexpected character after option $letter"
+-						if ($letters[$#letters] !~ /[0-9]/);
+-					my @digits;
+-					while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) {
+-						push @digits, pop @letters;
+-					}
+-					push @options, quote_word(join('', reverse @digits));
++					# short options can have args
++					# embedded in the short option list
++					push @options, quote_word(join('', reverse @letters));
++					@letters = ();
+ 				}
+ 			}
+ 		}
diff --git a/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch b/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch
new file mode 100644
index 0000000000..cde2c8d41c
--- /dev/null
+++ b/gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch
@@ -0,0 +1,58 @@
+From: Jean Delvare <jdelvare@suse.de>
+Subject: compat/getopt: Handle a second separator
+
+getopt can be passed 2 '--' separators. The first one tells that
+getopt options are over and target program options start. The second
+one tells that the target program's options are over and following
+arguments should be treated as non-options even if they look like
+options.
+
+This second separator was not handled, causing the compatibility
+getopt script to treat the following arguments as options, eventually
+failing one way or another.
+
+Properly detect and handle the second separator. This fixes the first
+half of bug #54772:
+https://savannah.nongnu.org/bugs/index.php?54772
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+ compat/getopt.in |   13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- quilt.orig/compat/getopt.in	2018-10-03 15:23:21.147620172 +0200
++++ quilt/compat/getopt.in	2018-10-03 16:05:56.818667040 +0200
+@@ -8,12 +8,12 @@
+ 
+ use strict;
+ 
+-my $opts;
++my $opts = '';
+ my @words;
+ my $found_sep = 0;
+ 
+ foreach my $arg (@ARGV) {
+-  if ($arg eq '--') {
++  if (!$found_sep && $arg eq '--') {
+     $found_sep = 1;
+   }
+   else {
+@@ -62,10 +62,17 @@ sub quote_word
+ 	return "'$word'";
+ }
+ 
++# there can be a second separator, to inhibit processing following arguments
++# as options
++$found_sep = 0;
+ foreach my $word (@words) {
++	if ($word eq '--') {
++		$found_sep = 1;
++		next;
++	}
+ 
+ 	# allow '-' to be an option value
+-	if (!$need_param && $word !~ /^-./) {
++	if ($found_sep || (!$need_param && $word !~ /^-./)) {
+ 		push @barewords, quote_word($word);
+ 		next;
+ 	}
diff --git a/gnu/packages/patches/quilt-test-fix-regex.patch b/gnu/packages/patches/quilt-test-fix-regex.patch
new file mode 100644
index 0000000000..2e249ac55b
--- /dev/null
+++ b/gnu/packages/patches/quilt-test-fix-regex.patch
@@ -0,0 +1,41 @@
+From 5193b137b5a9034ce79946edd40760df2f63a82a Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Tue, 25 Apr 2017 15:17:53 +0200
+Subject: test: Escape curly braces in regex
+
+Curly braces in perl regex are supposed to be escaped, recent
+versions of perl complain when they aren't:
+
+Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114.
+Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290.
+
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+---
+ test/run | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/run b/test/run
+index 942014e..03afc7a 100755
+--- a/test/run
++++ b/test/run
+@@ -112,7 +112,7 @@ sub flush_output()
+ sub substitute_vars($)
+ {
+ 	my ($line) = @_;
+-	$line =~ s[%{(\w+)}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
++	$line =~ s[%\{(\w+)\}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
+ 	return $line;
+ }
+ 
+@@ -288,7 +288,7 @@ while (defined(my $line = <SOURCE>)) {
+ 	# Parse the next command
+ 	if ($line =~ s/^\s*\$ ?//) {
+ 		# Substitute %{?} with the last command's status
+-		$line =~ s[%{\?}][$last_status]eg;
++		$line =~ s[%\{\?\}][$last_status]eg;
+ 
+ 		chomp($prog = substitute_vars($line));
+ 		$prog_line = $lineno;
+-- 
+cgit v1.0-41-gc330
+
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index a68e369912..688e62cdc8 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015, 2018 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
@@ -31,11 +31,13 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages less)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages xml))
 
 (define-public patchutils
@@ -92,7 +94,7 @@ listing the files modified by a patch.")
 (define-public quilt
   (package
     (name "quilt")
-    (version "0.61")
+    (version "0.65")
     (source
      (origin
       (method url-fetch)
@@ -100,12 +102,18 @@ listing the files modified by a patch.")
                           name "-" version ".tar.gz"))
       (sha256
        (base32
-        "1hwz58djkq9cv46sjwxbp2v5m8yjr41kd0nm1zm1xm6418khmv0y"))))
+        "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn"))
+      (patches (search-patches "quilt-test-fix-regex.patch"
+                               "quilt-compat-getopt-fix-second-separator.patch"
+                               "quilt-compat-getopt-fix-option-with-nondigit-param.patch"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("gettext" ,gnu-gettext)))
     (inputs `(("perl" ,perl)
               ("less" ,less)
               ("file" ,file)
-              ("ed" ,ed)))
+              ("ed" ,ed)
+              ("diffstat" ,diffstat)))
     (arguments
      '(#:parallel-tests? #f
        #:phases
@@ -116,8 +124,6 @@ listing the files modified by a patch.")
                  '("test/run"
                    "test/edit.test") 
                (("/bin/sh") (which "sh")))
-             ;; TODO: Run the mail tests once the mail feature can be supported.
-             (delete-file "test/mail.test")
              #t))
          (add-after 'install 'wrap-program
            ;; quilt's configure checks for the absolute path to the utilities it
@@ -128,6 +134,7 @@ listing the files modified by a patch.")
                     (coreutils (assoc-ref inputs "coreutils"))
                     (diffutils (assoc-ref inputs "diffutils"))
                     (findutils (assoc-ref inputs "findutils"))
+                    (diffstat  (assoc-ref inputs "diffstat"))
                     (less      (assoc-ref inputs "less"))
                     (file      (assoc-ref inputs "file"))
                     (ed        (assoc-ref inputs "ed"))
@@ -139,7 +146,8 @@ listing the files modified by a patch.")
                    ,(map (lambda (dir)
                            (string-append dir "/bin"))
                          (list coreutils diffutils findutils
-                               less file ed sed bash grep)))))
+                               less file ed sed bash grep
+                               diffstat)))))
              #t)))))
     (home-page "https://savannah.nongnu.org/projects/quilt/")
     (synopsis "Script for managing patches to software")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f7369cedef..d63e263e3c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10391,7 +10391,7 @@ theme for the Sphinx documentation system.  It's the default theme of Sphinx.")
              (setenv "CC" "gcc")
              ;; No need to extend PYTHONPATH to find the built package, since
              ;; the Makefile will build anyway
-             (zero? (system* "make" "check")))))))
+             (invoke "make" "check"))))))
   (native-inputs
    `(("procps" ,procps))) ; required for tests
   (home-page
diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm
index 2a35aa0cdb..e9668cba26 100644
--- a/gnu/packages/re2c.scm
+++ b/gnu/packages/re2c.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Sergei Trofimovich <slyfox@inbox.ru>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,7 +26,7 @@
 (define-public re2c
   (package
     (name "re2c")
-    (version "1.0.3")
+    (version "1.1.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/skvadrik/" name
@@ -33,7 +34,7 @@
                                  name "-" version ".tar.gz"))
              (sha256
               (base32
-               "0lnbj15hhgi3r40ipskmg178m18d8n5nph78sci6lprk7zgf0mng"))))
+               "1ksifjn18v6nra935dpqllmvkqgcdsggfjgmj77282x0gqrrfrc5"))))
     (build-system gnu-build-system)
     (home-page "http://re2c.org/")
     (synopsis "Lexer generator for C/C++")
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 55ce45ce78..caa1d6d1c1 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -33,6 +33,7 @@
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages fcitx)
@@ -40,6 +41,7 @@
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages haskell)
   #:use-module (gnu packages ibus)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
@@ -520,3 +522,93 @@ sound and device input (keyboards, joysticks, mice, etc.).")
 The bindings are written in pure Scheme using Guile's foreign function
 interface.")
     (license lgpl3+)))
+
+(define-public ghc-sdl2
+  (package
+    (name "ghc-sdl2")
+    (version "2.4.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "sdl2/sdl2-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0p4b12fmxps0sbnkqdfy0qw19s355yrkw7fgw6xz53wzq706k991"))))
+    (build-system haskell-build-system)
+    (arguments '(#:tests? #f)) ; tests require graphical environment
+    (inputs
+     `(("ghc-exceptions" ,ghc-exceptions)
+       ("ghc-linear" ,ghc-linear)
+       ("ghc-statevar" ,ghc-statevar)
+       ("ghc-text" ,ghc-text)
+       ("ghc-vector" ,ghc-vector)
+       ("sdl2" ,sdl2)))
+    (native-inputs
+     `(("ghc-weigh" ,ghc-weigh)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://hackage.haskell.org/package/sdl2")
+    (synopsis "High- and low-level bindings to the SDL library")
+    (description
+     "This package contains bindings to the SDL 2 library, in both high- and
+low-level forms.  The @code{SDL} namespace contains high-level bindings, where
+enumerations are split into sum types, and we perform automatic
+error-checking.  The @code{SDL.Raw} namespace contains an almost 1-1
+translation of the C API into Haskell FFI calls.  As such, this does not
+contain sum types nor error checking.  Thus this namespace is suitable for
+building your own abstraction over SDL, but is not recommended for day-to-day
+programming.")
+    (license bsd-3)))
+
+(define-public ghc-sdl2-mixer
+  (package
+    (name "ghc-sdl2-mixer")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/sdl2-mixer/"
+                           "sdl2-mixer-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1k8avyccq5l9z7bwxigim312yaancxl1sr3q6a96bcm7pnhiak0g"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-data-default-class" ,ghc-data-default-class)
+       ("ghc-lifted-base" ,ghc-lifted-base)
+       ("ghc-monad-control" ,ghc-monad-control)
+       ("ghc-sdl2" ,ghc-sdl2)
+       ("ghc-vector" ,ghc-vector)
+       ("sdl2-mixer" ,sdl2-mixer)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://hackage.haskell.org/package/sdl2-mixer")
+    (synopsis "Bindings to SDL2 mixer")
+    (description "This package provides Haskell bindings to
+@code{SDL2_mixer}.")
+    (license bsd-3)))
+
+(define-public ghc-sdl2-image
+  (package
+    (name "ghc-sdl2-image")
+    (version "2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/sdl2-image/"
+                           "sdl2-image-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1pr6dkg73cy9z0w54lrkj9c5bhxj56nl92lxikjy8kz6nyr455rr"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-sdl2" ,ghc-sdl2)
+       ("ghc-text" ,ghc-text)
+       ("sdl2-image" ,sdl2-image)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://hackage.haskell.org/package/sdl2-image")
+    (synopsis "Bindings to SDL2_image")
+    (description "This package provides Haskell bindings to
+@code{SDL2_image}.")
+    (license expat)))
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 29caaaf02e..2e936eef7d 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -30,7 +30,7 @@
 (define-public syncthing
   (package
     (name "syncthing")
-    (version "0.14.50")
+    (version "0.14.51")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/syncthing/syncthing"
@@ -38,7 +38,7 @@
                                   "/syncthing-source-v" version ".tar.gz"))
               (sha256
                (base32
-                "0yjj6zzivzw289bhwqjb4xcv8p39n5mcwwr5w6xf5ykzljc5pk55"))
+                "17phn8l2afhgzh0q9ambi28awj2m905sr1bicq2wc7ghypk5vgqh"))
               (modules '((guix build utils)))
               ;; Delete bundled ("vendored") free software source code.
               (snippet '(begin
@@ -59,7 +59,7 @@
          (add-before 'build 'increase-test-timeout
            (lambda _
              (substitute* "src/github.com/syncthing/syncthing/build.go"
-               (("60s") "999s"))
+               (("120s") "999s"))
              #t))
 
          (replace 'build
@@ -138,6 +138,7 @@
        ("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
        ("go-github-com-rcrowley-go-metrics" ,go-github-com-rcrowley-go-metrics)
        ("go-github-com-sasha-s-go-deadlock" ,go-github-com-sasha-s-go-deadlock)
+       ("go-github-com-syncthing-notify" ,go-github-com-syncthing-notify)
        ("go-github-com-syndtr-goleveldb" ,go-github-com-syndtr-goleveldb)
        ("go-github-com-thejerf-suture" ,go-github-com-thejerf-suture)
        ("go-github-com-vitrun-qart" ,(go-github-com-vitrun-qart-union))
@@ -145,7 +146,7 @@
        ("go-golang-org-x-net-union" ,(go-golang-org-x-net-union))
        ("go-golang-org-x-text" ,(go-golang-org-x-text-union))
        ("go-golang-org-x-time-rate" ,go-golang-org-x-time-rate)
-       ("go-github-com-syncthing-notify" ,go-github-com-syncthing-notify)
+       ("go-gopkg.in-ldap.v2" ,go-gopkg.in-ldap.v2)
        ;; For tests
        ("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff)))
     (synopsis "Decentralized continuous file system synchronization")
@@ -678,11 +679,11 @@ database in Go.")
       (license bsd-2))))
 
 (define-public go-github-com-thejerf-suture
-  (let ((commit "3f1fb62fe0a3cc6429122d7dc45588a8b59c5bb6")
+  (let ((commit "bf6ee6a0b047ebbe9ae07d847f750dd18c6a9276")
         (revision "0"))
     (package
       (name "go-github-com-thejerf-suture")
-      (version (git-version "2.0.3" revision commit))
+      (version (git-version "3.0.0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -691,7 +692,7 @@ database in Go.")
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "0mp7gz6bp6xhggkgmbl33vpmrq3a6n2dkgcxbkb7csnpv4r4d59k"))))
+                  "0rzx9k408vaglwnnpgpcs6y7ff7p65915nbg33rvbaz13hxwkz3y"))))
       (build-system go-build-system)
       (arguments
        `(#:import-path "github.com/thejerf/suture"))
@@ -1366,3 +1367,50 @@ Prometheus HTTP API.")
     (description "This is a union of Go Prometheus libraries")
     (home-page (package-home-page go-github-com-client-golang-prometheus))
     (license (package-license go-github-com-client-golang-prometheus))))
+
+(define-public go-gopkg.in-asn1-ber.v1
+  (package
+    (name "go-gopkg.in-asn1-ber.v1")
+    (version "1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://gopkg.in/asn1-ber.v1")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1y8bvzbxpw0lfnn7pbcdwzqj4l90qj6xf88dvv9pxd9yl5g6cskx"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "gopkg.in/asn1-ber.v1"))
+    (synopsis "ASN.1 BER encoding and decoding in Go")
+    (description "This package provides ASN.1 BER encoding and decoding in the
+Go language.")
+    (home-page "https://gopkg.in/asn1-ber.v1")
+    (license expat)))
+
+(define-public go-gopkg.in-ldap.v2
+  (package
+    (name "go-gopkg.in-ldap.v2")
+    (version "2.5.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://gopkg.in/ldap.v2")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1wf81wy04nhkqs0dg5zkivr4sh37r83bxrfwjz9vr4jq6vmljr3h"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "gopkg.in/ldap.v2"
+       #:tests? #f)) ; the test suite requires network access
+    (propagated-inputs
+     `(("go-gopkg.in-asn1-ber.v1" ,go-gopkg.in-asn1-ber.v1)))
+    (synopsis "LDAP v3 functionality for Go")
+    (description "This package provides basic LDAP v3 functionality in the Go
+language.")
+    (home-page "https://gopkg.in/ldap.v2")
+    (license expat)))
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index 6247d1f3b6..a7c685fdc1 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -35,7 +35,7 @@
 (define-public newsboat
   (package
     (name "newsboat")
-    (version "2.12")
+    (version "2.13")
     (source
      (origin
        (method url-fetch)
@@ -43,7 +43,7 @@
                            "/newsboat-" version ".tar.xz"))
        (sha256
         (base32
-         "1x23zlgljaqf46v7sp8wnkyf6wighvirvn48ankpa34yr8mvrgcv"))))
+         "0pik1d98ydzqi6055vdbkjg5krwifbk2hy2f5jp5p1wcy2s16dn7"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index ce34423713..7e26bdcf63 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -84,7 +84,7 @@ to DOS format and vice versa.")
 (define-public recode
   (package
     (name "recode")
-    (version "3.7")
+    (version "3.7.1")
     (source
      (origin
        (method url-fetch)
@@ -92,7 +92,7 @@ to DOS format and vice versa.")
                            "download/v" version "/" name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0r4yhf7i7zp2nl2apyzz7r3i2in12n385hmr8zcfr18ly0ly530q"))
+         "0215hfj0rhlh0grg91qfx75pp6z09bpv8211qdxqihniw7y9a4fs"))
        (modules '((guix build utils)))
        (snippet '(begin
                    (delete-file "tests/Recode.c")
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 4d6e88bf3d..d9fc601066 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -665,7 +665,7 @@ servers or clients for more complicated applications.")
 (define-public perl-crypt-openssl-rsa
  (package
   (name "perl-crypt-openssl-rsa")
-  (version "0.30")
+  (version "0.31")
   (source
     (origin
       (method url-fetch)
@@ -675,7 +675,7 @@ servers or clients for more complicated applications.")
              ".tar.gz"))
       (sha256
         (base32
-          "1b19kaaw4wda8dy6kjiwqa2prpbs2dqcyjyj9zdh5wbs74qkbq93"))))
+          "0djl5i6kibl7862b6ih29q8dhg5zpwzq77q9j8hp6xngshx40ws1"))))
   (build-system perl-build-system)
   (native-inputs
    `(("perl-crypt-openssl-guess" ,perl-crypt-openssl-guess)))
@@ -826,7 +826,7 @@ then ported to the GNU / Linux environment.")
 (define-public mbedtls-apache
   (package
     (name "mbedtls-apache")
-    (version "2.7.6")
+    (version "2.13.0")
     (source
      (origin
        (method url-fetch)
@@ -836,13 +836,14 @@ then ported to the GNU / Linux environment.")
                            version "-apache.tgz"))
        (sha256
         (base32
-         "0fl2nrxvlgx9ja7yy3kd1zadpr98fxbvn3f6fl2mj87gryhkfqlk"))))
+         "1nh6xfyxs3mnnpgc6pancvdhv6ihz9lhsxdlg90gqa8n5r6lwfsr"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
        (list "-DUSE_SHARED_MBEDTLS_LIBRARY=ON")))
     (native-inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("python" ,python)))
     (synopsis "Small TLS library")
     (description
      "@code{mbed TLS}, formerly known as PolarSSL, makes it trivially easy
@@ -852,21 +853,38 @@ coding footprint.")
     (home-page "https://tls.mbed.org")
     (license license:asl2.0)))
 
+;; The Hiawatha Web server requires some specific features to be enabled.
+(define-public mbedtls-for-hiawatha
+  (hidden-package
+   (package
+     (inherit mbedtls-apache)
+     (arguments
+      (substitute-keyword-arguments
+          `(#:phases
+            (modify-phases %standard-phases
+              (add-after 'configure 'configure-extra-features
+                (lambda _
+                  (for-each (lambda (feature)
+                              (invoke "scripts/config.pl" "set" feature))
+                            (list "MBEDTLS_THREADING_C"
+                                  "MBEDTLS_THREADING_PTHREAD"))
+                  #t)))
+            ,@(package-arguments mbedtls-apache)))))))
+
 (define-public ghc-tls
   (package
     (name "ghc-tls")
-    (version "1.3.8")
+    (version "1.4.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://hackage.haskell.org/package/"
                                   "tls/tls-" version ".tar.gz"))
               (sha256
                (base32
-                "1rdidf18i781c0vdvy9yn79yh08hmcacf6fp3sgghyiy3h0wyh5l"))))
+                "1y083724mym28n6xfaz7pcc7zqxdhjpaxpbvzxfbs25qq2px3smv"))))
     (build-system haskell-build-system)
     (inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-cereal" ,ghc-cereal)
+     `(("ghc-cereal" ,ghc-cereal)
        ("ghc-data-default-class" ,ghc-data-default-class)
        ("ghc-memory" ,ghc-memory)
        ("ghc-cryptonite" ,ghc-cryptonite)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 204ec403f6..cc892b9c62 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
-;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017, 2018 Nils Gillmann <ng0@n0.is>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -1031,12 +1031,48 @@ also walk each side of a merge and test those changes individually.")
                           ((" perl -")
                            (string-append " " perl " -")))
 
+                        (substitute* (find-files "src/triggers" ".*")
+                          ((" sed ")
+                           (string-append " " (which "sed") " ")))
+
+                        (substitute*
+                            '("src/triggers/post-compile/update-gitweb-access-list"
+                              "src/triggers/post-compile/ssh-authkeys-split"
+                              "src/triggers/upstream")
+                          ((" grep ")
+                           (string-append " " (which "grep") " ")))
+
                         ;; Avoid references to the store in authorized_keys.
                         ;; This works because gitolite-shell is in the PATH.
                         (substitute* "src/triggers/post-compile/ssh-authkeys"
                           (("\\$glshell \\$user")
                            "gitolite-shell $user"))
                         #t)))
+                  (add-before 'install 'patch-source
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      ;; Gitolite uses cat to test the readability of the
+                      ;; pubkey
+                      (substitute* "src/lib/Gitolite/Setup.pm"
+                        (("\"cat ")
+                         (string-append "\"" (which "cat") " "))
+                        (("\"ssh-keygen")
+                         (string-append "\"" (which "ssh-keygen"))))
+
+                      (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
+                                     "src/lib/Gitolite/Hooks/Update.pm")
+                        (("/usr/bin/perl")
+                         (string-append (assoc-ref inputs "perl")
+                                        "/bin/perl")))
+
+                      (substitute* "src/lib/Gitolite/Common.pm"
+                        (("\"ssh-keygen")
+                         (string-append "\"" (which "ssh-keygen")))
+                        (("\"logger\"")
+                         (string-append "\""
+                                        (assoc-ref inputs "inetutils")
+                                        "/bin/logger\"")))
+
+                      #t))
                   (replace 'install
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((output (assoc-ref outputs "out"))
@@ -1050,9 +1086,24 @@ also walk each side of a merge and test those changes individually.")
                                     (symlink (string-append sharedir "/" script)
                                              (string-append bindir "/" script)))
                                   '("gitolite" "gitolite-shell"))
+                        #t)))
+                  (add-after 'install 'wrap-scripts
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out"))
+                            (coreutils (assoc-ref inputs "coreutils"))
+                            (findutils (assoc-ref inputs "findutils"))
+                            (git (assoc-ref inputs "git")))
+                        (wrap-program (string-append out "/bin/gitolite")
+                          `("PATH" ":" prefix
+                            ,(map (lambda (dir)
+                                    (string-append dir "/bin"))
+                                  (list out coreutils findutils git))))
                         #t))))))
     (inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("coreutils" ,coreutils)
+       ("findutils" ,findutils)
+       ("inetutils" ,inetutils)))
     ;; git and openssh are propagated because trying to patch the source via
     ;; regexp matching is too brittle and prone to false positives.
     (propagated-inputs
@@ -1844,7 +1895,6 @@ be served with a HTTP file server of your choice.")
        ("ghc-hashable" ,ghc-hashable)
        ("ghc-html" ,ghc-html)
        ("ghc-mmap" ,ghc-mmap)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-old-time" ,ghc-old-time)
        ("ghc-parsec" ,ghc-parsec)
        ("ghc-random" ,ghc-random)
@@ -2053,7 +2103,7 @@ directory full of HOWTOs.")
 (define-public git-annex
   (package
     (name "git-annex")
-    (version "6.20180807")
+    (version "6.20180926")
     (source
      (origin
        (method url-fetch)
@@ -2061,7 +2111,7 @@ directory full of HOWTOs.")
                            "git-annex/git-annex-" version ".tar.gz"))
        (sha256
         (base32
-         "1wkqh1y58m0z1mf2j33qhndpxcjwv8mbv384kdk17vn0lp9zas1s"))))
+         "1251rj8h63y30sfqk0zh670yhz14p256y59n3590pg015pf3575d"))))
     (build-system haskell-build-system)
     (arguments
      `(#:configure-flags
@@ -2137,7 +2187,6 @@ directory full of HOWTOs.")
        ("ghc-memory" ,ghc-memory)
        ("ghc-monad-control" ,ghc-monad-control)
        ("ghc-monad-logger" ,ghc-monad-logger)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-network" ,ghc-network)
        ("ghc-old-locale" ,ghc-old-locale)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 448773e0d9..2f6a89e14d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1121,7 +1121,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.29.0")
+    (version "0.29.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1129,7 +1129,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
                     ".tar.gz"))
               (sha256
                (base32
-                "06bk8836brzik1qmq8kycwg5n35r438sd2176k6msjg5rrwghakp"))
+                "08x63hlpj6s8xixmdbx6raff5p5mih7cnk0bcql9f3wrs5hx9ygr"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
@@ -1271,7 +1271,7 @@ access to mpv's powerful playback capabilities.")
 (define-public youtube-dl
   (package
     (name "youtube-dl")
-    (version "2018.09.08")
+    (version "2018.09.18")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://yt-dl.org/downloads/"
@@ -1279,7 +1279,7 @@ access to mpv's powerful playback capabilities.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0vwc4faqdddrb3nm4fzmkr60n5rc2zwyy8jwrrjad60kcp8isf05"))))
+                "0mlsdmddmyy3xaqy366k48xds14g17l81al3kglndjkbrrji63sb"))))
     (build-system python-build-system)
     (arguments
      ;; The problem here is that the directory for the man page and completion
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 85bbe7e9c6..9b1f26aa7d 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -347,6 +347,16 @@ private network between hosts on the internet.")
         (base32
          "0pqk43kd7crqhg6qgnl8kapncwgw1xgaf02zarzypcw64kvdih9h"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-FHS-file-names
+           (lambda _
+             (substitute* "sshuttle/client.py"
+               (("/usr/bin/env") (which "env")))
+             (substitute* "sshuttle/ssh.py"
+               (("/bin/sh") "sh"))
+             #t)))))
     (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)
        ;; For tests only.
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0cbade457f..4a8699c4c0 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -124,14 +124,14 @@
 (define-public httpd
   (package
     (name "httpd")
-    (version "2.4.34")
+    (version "2.4.35")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://apache/httpd/httpd-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1w1q2smdgf6ln0x741lk5pv5r0gzrxj2iza1vslhifzy65bcjlzs"))))
+               "0mlvwsm7hmpc7db6lfc2nx3v4cll3qljjxhjhgsw6aniskywc1r6"))))
     (build-system gnu-build-system)
     (native-inputs `(("pcre" ,pcre "bin")))       ;for 'pcre-config'
     (inputs `(("apr" ,apr)
@@ -1862,15 +1862,15 @@ MIME type directly to the browser, without being processed through Catalyst.")
 (define-public perl-catalyst-runtime
   (package
     (name "perl-catalyst-runtime")
-    (version "5.90118")
+    (version "5.90119")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/H/HA/HAARG/"
+       (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
                            "Catalyst-Runtime-" version ".tar.gz"))
        (sha256
         (base32
-         "0cws3szx3vvh0372qdx8fypgv6qphcc3v81rbq30sl1ghby7ksd3"))))
+         "1iw7x9rqk3sz2hm1bw01blz5vwm7zlljdf4xj3r8vz54f1yggzqr"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-fatal" ,perl-test-fatal)))
@@ -5173,7 +5173,7 @@ functions of Tidy.")
 (define-public hiawatha
   (package
     (name "hiawatha")
-    (version "10.7")
+    (version "10.8.3")
     (source
      (origin
        (method url-fetch)
@@ -5181,28 +5181,34 @@ functions of Tidy.")
                            "hiawatha-" version ".tar.gz"))
        (modules '((guix build utils)))
        (snippet '(begin
-                   ;; We use our packaged mbedtls, so delete the included copy.
-                   (delete-file-recursively "mbedtls")
+                   ;; We use packaged libraries, so delete the bundled copies.
+                   (for-each delete-file-recursively
+                             (list "nghttp2" "mbedtls"))
                    #t))
        (sha256
         (base32
-         "0x2zfc8kc6c7rl4gwymwmg13w1c60biv6c6c9fvzpnl59bc9jgin"))))
+         "0w7047pwijhsbvvv1qjynp7gvn0nil56w82f7ax0gabrg7ddzk6s"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f ; No tests included
+     `(#:tests? #f                      ; no tests included
        #:configure-flags (list (string-append "-DUSE_SYSTEM_MBEDTLS=on")
+                               (string-append "-DENABLE_HTTP2=on")
+                               (string-append "-DUSE_SYSTEM_NGHTTP2=on")
                                (string-append "-DENABLE_TOMAHAWK=on")
+                               (string-append "-DLOG_DIR=/var/log/hiawatha")
+                               (string-append "-DPID_DIR=/run")
                                (string-append "-DWEBROOT_DIR="
                                               (assoc-ref %outputs "out")
-                                              "/share/hiawatha/html"))
+                                              "/share/hiawatha/html")
+                               (string-append "-DWORK_DIR=/var/lib/hiawatha"))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'remove-empty-dirs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out")))
-               ;; The directories in "var" are empty, remove them.
-               (delete-file-recursively (string-append out "/var"))
-               #t)))
+         (add-after 'unpack 'install-no-empty-directories
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("install\\(DIRECTORY DESTINATION" match)
+                (string-append "#" match)))
+             #t))
          (add-after 'install 'wrap
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Make sure 'hiawatha' finds 'mbedtls'.
@@ -5212,11 +5218,12 @@ functions of Tidy.")
                (wrap-program (string-append sbin "/hiawatha")
                  `("PATH" ":" prefix (,mbed)))))))))
     (inputs
-     ;; TODO: package "hiawatha-monitor", an optional dependency of "hiawatha"
-     `(("mbedtls-apache" ,mbedtls-apache) ;Hiawatha includes this version.
-       ("zlib" ,zlib)
-       ("libxslt" ,libxslt)
-       ("libxml2" ,libxml2)))
+     ;; TODO: package "hiawatha-monitor", an optional dependency of "hiawatha".
+     `(("libxslt" ,libxslt)
+       ("libxml2" ,libxml2)
+       ("mbedtls-apache" ,mbedtls-for-hiawatha)
+       ("nghttp2" ,nghttp2 "lib")
+       ("zlib" ,zlib)))
     (home-page "https://www.hiawatha-webserver.org")
     (synopsis "Webserver with focus on security")
     (description
diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm
index 782776606d..68839038b7 100644
--- a/gnu/packages/wine.scm
+++ b/gnu/packages/wine.scm
@@ -225,7 +225,7 @@ integrate Windows applications into your desktop.")
 (define-public wine-staging-patchset-data
   (package
    (name "wine-staging-patchset-data")
-   (version "3.16")
+   (version "3.17")
    (source
     (origin
       (method git-fetch)
@@ -235,7 +235,7 @@ integrate Windows applications into your desktop.")
       (file-name (git-file-name name version))
       (sha256
        (base32
-        "0c1bs9qpxlvld6jkwjri2v8jaixxn1r5b0m9r5hnkfrnpl7z7cfv"))))
+        "1ds9q90xjg59ikic98kqkhmijnqx4yplvwsm6rav4mx72yci7d4w"))))
    (build-system trivial-build-system)
    (native-inputs
     `(("bash" ,bash)
@@ -281,7 +281,7 @@ integrate Windows applications into your desktop.")
               (file-name (string-append name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0g55l41apiwgblfk9ihzd96003gd32w5ng79f96hmiwhyzwbqhxd"))))
+                "08fcziadw40153a9rv630m7iz6ipfzylms5y191z4sj2vvhy5vac"))))
     (inputs `(("autoconf" ,autoconf) ; for autoreconf
               ("gtk+" ,gtk+)
               ("libva" ,libva)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 08f82ba2d2..7c58770de7 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -455,7 +455,7 @@ desktop environment.")
 (define-public xmonad
   (package
     (name "xmonad")
-    (version "0.14")
+    (version "0.14.2")
     (synopsis "Tiling window manager")
     (source (origin
               (method url-fetch)
@@ -463,11 +463,10 @@ desktop environment.")
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0lq3k0ap7jxrrswpd954mqa6h8diccbif5srcgbmr39y6y8x0mm4"))))
+                "0gqyivpw8z1x73p1l1fpyq1wc013a1c07r6xn1a82liijs91b949"))))
     (build-system haskell-build-system)
     (inputs
      `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
-       ("ghc-mtl"                   ,ghc-mtl)
        ("ghc-quickcheck"            ,ghc-quickcheck)
        ("ghc-semigroups"            ,ghc-semigroups)
        ("ghc-setlocale"             ,ghc-setlocale)
@@ -505,14 +504,14 @@ tiled on several screens.")
 (define-public xmobar
   (package
     (name "xmobar")
-    (version "0.27")
+    (version "0.28")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://hackage/package/xmobar/"
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0agx490q6sbmv3vfq33ys8dsrgwizj3bmha4i1pkxz5wp5q8cx3l"))))
+                "1xh87asg8y35srvp7d3gyyy4bkxsw122liihxgzgm8pqv2z3h4zd"))))
     (build-system haskell-build-system)
     (native-inputs
      `(("ghc-hspec" ,ghc-hspec)
@@ -560,11 +559,11 @@ Haskell, no knowledge of the language is required to install and use it.")
          "1660w3xhbfrlq8b8s1rviq2mcn1vyqpypli4023gqxwry52brk6y"))))
     (build-system haskell-build-system)
     (propagated-inputs
-     `(("ghc-mtl" ,ghc-mtl)
-       ("ghc-old-time" ,ghc-old-time)
+     `(("ghc-old-time" ,ghc-old-time)
        ("ghc-random" ,ghc-random)
        ("ghc-utf8-string" ,ghc-utf8-string)
        ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
+       ("ghc-semigroups", ghc-semigroups)
        ("ghc-x11" ,ghc-x11)
        ("ghc-x11-xft" ,ghc-x11-xft)
        ("xmonad" ,xmonad)))
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index a3b6e22607..ad0e530c4b 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -786,17 +786,17 @@ server, collect the answer, and finally decoding the XML to Perl.")
 (define-public perl-xml-feed
   (package
     (name "perl-xml-feed")
-    (version "0.53")
+    (version "0.54")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
                                   "XML-Feed-" version ".tar.gz"))
               (sha256
                (base32
-                "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
+                "0ydyi7wdhv8325h7j27vrlwiqxll56sn8zy5nbzhpma3nrf61bci"))))
     (build-system perl-build-system)
     (arguments
-     `(#:tests? #f)) ; Tests require internet connection
+     `(#:tests? #f))                    ; tests require internet connection
     (native-inputs
      `(("perl-module-build" ,perl-module-build)
        ("perl-uri" ,perl-uri)
@@ -1136,7 +1136,7 @@ XSLT and EXSLT.")
 (define-public html-xml-utils
  (package
    (name "html-xml-utils")
-   (version "7.6")
+   (version "7.7")
    (source
     (origin
       (method url-fetch)
@@ -1145,7 +1145,7 @@ XSLT and EXSLT.")
             version ".tar.gz"))
       (sha256
        (base32
-        "0l97ps089byy62838wf2jwvvc465iw29z9r5kwmwcq7f3bn11y3m"))))
+        "1vwqp5q276j8di9zql3kygf31z2frp2c59yjqlrvvwcvccvkcdwr"))))
    (build-system gnu-build-system)
    (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
    (synopsis "Command line utilities to manipulate HTML and XML files")
@@ -2094,7 +2094,6 @@ derivations of regular expressions.")
     (build-system haskell-build-system)
     (inputs
      `(("ghc-parsec" ,ghc-parsec)
-       ("ghc-mtl" ,ghc-mtl)
        ("ghc-hxt-charproperties" ,ghc-hxt-charproperties)
        ("ghc-hxt-unicode" ,ghc-hxt-unicode)
        ("ghc-hxt-regex-xmlschema" ,ghc-hxt-regex-xmlschema)
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index f08c896334..d7bda61ed7 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -125,11 +125,9 @@ for ROTATION."
 
 (define (default-jobs rottlog)
   (list #~(job '(next-hour '(0))                  ;midnight
-               (lambda ()
-                 (system* #$(file-append rottlog "/sbin/rottlog"))))
+               #$(file-append rottlog "/sbin/rottlog"))
         #~(job '(next-hour '(12))                 ;noon
-               (lambda ()
-                 (system* #$(file-append rottlog "/sbin/rottlog"))))))
+               #$(file-append rottlog "/sbin/rottlog"))))
 
 (define-record-type* <rottlog-configuration>
   rottlog-configuration make-rottlog-configuration
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 5ba2c6b86d..47c7d8bb27 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -685,17 +685,20 @@ to add @var{device} to the kernel's entropy pool.  The service will fail if
   (shepherd-service-type
    'virtual-terminal
    (lambda (utf8?)
-     (shepherd-service
-      (documentation "Set virtual terminals in UTF-8 module.")
-      (provision '(virtual-terminal))
-      (requirement '(root-file-system))
-      (start #~(lambda _
-                 (call-with-output-file
-                     "/sys/module/vt/parameters/default_utf8"
-                   (lambda (port)
-                     (display 1 port)))
-                 #t))
-      (stop #~(const #f))))
+     (let ((knob "/sys/module/vt/parameters/default_utf8"))
+       (shepherd-service
+        (documentation "Set virtual terminals in UTF-8 module.")
+        (provision '(virtual-terminal))
+        (requirement '(root-file-system))
+        (start #~(lambda _
+                   ;; In containers /sys is read-only so don't insist on
+                   ;; writing to this file.
+                   (unless (= 1 (call-with-input-file #$knob read))
+                     (call-with-output-file #$knob
+                       (lambda (port)
+                         (display 1 port))))
+                   #t))
+        (stop #~(const #f)))))
    #t))                                           ;default to UTF-8
 
 (define console-keymap-service-type
@@ -1881,7 +1884,12 @@ item of @var{packages}."
                             (string-append linux-module-directory "/"
                                            kernel-release))
                            (old-umask (umask #o022)))
-                      (make-static-device-nodes directory)
+                      ;; If we're in a container, DIRECTORY might not exist,
+                      ;; for instance because the host runs a different
+                      ;; kernel.  In that case, skip it; we'll just miss a few
+                      ;; nodes like /dev/fuse.
+                      (when (file-exists? directory)
+                        (make-static-device-nodes directory))
                       (umask old-umask))
 
                     (let ((pid (fork+exec-command (list udevd))))
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 8c96b70731..8ff817759d 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -50,6 +50,7 @@
             unload-services
             unload-service
             load-services
+            load-services/safe
             start-service
             stop-service))
 
@@ -232,6 +233,25 @@ returns a shepherd <service> object."
                          `(primitive-load ,file))
                        files))))
 
+(define (load-services/safe files)
+  "This is like 'load-services', but make sure only the subset of FILES that
+can be safely reloaded is actually reloaded.
+
+This is done to accommodate the Shepherd < 0.15.0 where services lacked the
+'replacement' slot, and where 'register-services' would throw an exception
+when passed a service with an already-registered name."
+  (eval-there `(let* ((services     (map primitive-load ',files))
+                      (slots        (map slot-definition-name
+                                         (class-slots <service>)))
+                      (can-replace? (memq 'replacement slots)))
+                 (define (registered? service)
+                   (not (null? (lookup-services (canonical-name service)))))
+
+                 (apply register-services
+                        (if can-replace?
+                            services
+                            (remove registered? services))))))
+
 (define (start-service name)
   (with-shepherd-action name ('start) result
     result))
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index bd1d5a2706..3fdb2bb9f7 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -191,19 +191,7 @@ fe80::1%lo0 apps.facebook.com\n")
                              (cons* #$dhclient "-nw"
                                     "-pf" #$pid-file ifaces))))
                    (and (zero? (cdr (waitpid pid)))
-                        (let loop ()
-                          (catch 'system-error
-                            (lambda ()
-                              (call-with-input-file #$pid-file read))
-                            (lambda args
-                              ;; 'dhclient' returned before PID-FILE was created,
-                              ;; so try again.
-                              (let ((errno (system-error-errno args)))
-                                (if (= ENOENT errno)
-                                    (begin
-                                      (sleep 1)
-                                      (loop))
-                                    (apply throw args))))))))))
+                        (read-pid-file #$pid-file)))))
       (stop #~(make-kill-destructor))))))
 
 (define* (dhcp-client-service #:key (dhcp isc-dhcp))
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 4cd2249841..49d08cc30f 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -58,6 +59,7 @@
             %default-modules
 
             shepherd-service-file
+            %containerized-shepherd-service
 
             shepherd-service-lookup-procedure
             shepherd-service-back-edges
@@ -326,10 +328,25 @@ symbols provided/required by a service."
   (lambda (service)
     (vhash-foldq* cons '() service edges)))
 
+(define %containerized-shepherd-service
+  ;; XXX: This service works around a bug in the Shepherd 0.5.0: shepherd
+  ;; calls reboot(2) (via 'disable-reboot-on-ctrl-alt-del') when it starts,
+  ;; but in a container that fails with EINVAL.  This was fixed in Shepherd
+  ;; commit 92e806bac1abaeeaf5d60f0ab50d1ae85ba6a62f.
+  (simple-service 'containerized-shepherd
+                  shepherd-root-service-type
+                  (list (shepherd-service
+                         (provision '(containerized-shepherd))
+                         (start #~(lambda ()
+                                    (set! (@@ (shepherd)
+                                              disable-reboot-on-ctrl-alt-del)
+                                      (const #t))
+                                    #t))))))
+
 (define (shepherd-service-upgrade live target)
   "Return two values: the subset of LIVE (a list of <live-service>) that needs
 to be unloaded, and the subset of TARGET (a list of <shepherd-service>) that
-needs to be loaded."
+need to be restarted to complete their upgrade."
   (define (essential? service)
     (memq (first (live-service-provision service))
           '(root shepherd)))
@@ -346,12 +363,6 @@ needs to be loaded."
     (and=> (lookup-live (shepherd-service-canonical-name service))
            live-service-running))
 
-  (define (stopped service)
-    (match (lookup-live (shepherd-service-canonical-name service))
-      (#f #f)
-      (service (and (not (live-service-running service))
-                    service))))
-
   (define live-service-dependents
     (shepherd-service-back-edges live
                                  #:provision live-service-provision
@@ -362,16 +373,14 @@ needs to be loaded."
       (#f (every obsolete? (live-service-dependents service)))
       (_  #f)))
 
-  (define to-load
-    ;; Only load services that are either new or currently stopped.
-    (remove running? target))
+  (define to-restart
+    ;; Restart services that are currently running.
+    (filter running? target))
 
   (define to-unload
-    ;; Unload services that are (1) no longer required, or (2) are in TO-LOAD.
-    (remove essential?
-            (append (filter obsolete? live)
-                    (filter-map stopped to-load))))
+    ;; Unload services that are no longer required.
+    (remove essential? (filter obsolete? live)))
 
-  (values to-unload to-load))
+  (values to-unload to-restart))
 
 ;;; shepherd.scm ends here
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 58274c8bee..13669925ab 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@member.fsf.org>
 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +33,7 @@
   #:use-module (guix store)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
+  #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:export (git-daemon-service
             git-daemon-service-type
@@ -40,7 +42,23 @@
 
             git-http-configuration
             git-http-configuration?
-            git-http-nginx-location-configuration))
+            git-http-nginx-location-configuration
+
+            <gitolite-configuration>
+            gitolite-configuration
+            gitolite-configuration-package
+            gitolite-configuration-user
+            gitolite-configuration-rc-file
+            gitolite-configuration-admin-pubkey
+
+            <gitolite-rc-file>
+            gitolite-rc-file
+            gitolite-rc-file-umask
+            gitolite-rc-file-git-config-keys
+            gitolite-rc-file-roles
+            gitolite-rc-file-enable
+
+            gitolite-service-type))
 
 ;;; Commentary:
 ;;;
@@ -197,3 +215,163 @@ access to exported repositories under @file{/srv/git}."
             "")
         (list "fastcgi_param GIT_PROJECT_ROOT " git-root ";")
         "fastcgi_param PATH_INFO $1;"))))))
+
+
+;;;
+;;; Gitolite
+;;;
+
+(define-record-type* <gitolite-rc-file>
+  gitolite-rc-file make-gitolite-rc-file
+  gitolite-rc-file?
+  (umask           gitolite-rc-file-umask
+                   (default #o0077))
+  (git-config-keys gitolite-rc-file-git-config-keys
+                   (default ""))
+  (roles           gitolite-rc-file-roles
+                   (default '(("READERS" . 1)
+                              ("WRITERS" . 1))))
+  (enable          gitolite-rc-file-enable
+                   (default '("help"
+                              "desc"
+                              "info"
+                              "perms"
+                              "writable"
+                              "ssh-authkeys"
+                              "git-config"
+                              "daemon"
+                              "gitweb"))))
+
+(define-gexp-compiler (gitolite-rc-file-compiler
+                       (file <gitolite-rc-file>) system target)
+  (match file
+    (($ <gitolite-rc-file> umask git-config-keys roles enable)
+     (apply text-file* "gitolite.rc"
+      `("%RC = (\n"
+        "    UMASK => " ,(format #f "~4,'0o" umask) ",\n"
+        "    GIT_CONFIG_KEYS => '" ,git-config-keys "',\n"
+        "    ROLES => {\n"
+        ,@(map (match-lambda
+                 ((role . value)
+                  (simple-format #f "        ~A => ~A,\n" role value)))
+               roles)
+        "    },\n"
+        "\n"
+        "    ENABLE => [\n"
+        ,@(map (lambda (value)
+                 (simple-format #f "        '~A',\n" value))
+               enable)
+        "    ],\n"
+        ");\n"
+        "\n"
+        "1;\n")))))
+
+(define-record-type* <gitolite-configuration>
+  gitolite-configuration make-gitolite-configuration
+  gitolite-configuration?
+  (package        gitolite-configuration-package
+                  (default gitolite))
+  (user           gitolite-configuration-user
+                  (default "git"))
+  (group          gitolite-configuration-group
+                  (default "git"))
+  (home-directory gitolite-configuration-home-directory
+                  (default "/var/lib/gitolite"))
+  (rc-file        gitolite-configuration-rc-file
+                  (default (gitolite-rc-file)))
+  (admin-pubkey   gitolite-configuration-admin-pubkey))
+
+(define gitolite-accounts
+  (match-lambda
+    (($ <gitolite-configuration> package user group home-directory
+                                 rc-file admin-pubkey)
+     ;; User group and account to run Gitolite.
+     (list (user-group (name user) (system? #t))
+           (user-account
+            (name user)
+            (group group)
+            (system? #t)
+            (comment "Gitolite user")
+            (home-directory home-directory))))))
+
+(define gitolite-activation
+  (match-lambda
+    (($ <gitolite-configuration> package user group home
+                                 rc-file admin-pubkey)
+     #~(begin
+         (use-modules (ice-9 match)
+                      (guix build utils))
+
+         (let* ((user-info (getpwnam #$user))
+                (admin-pubkey #$admin-pubkey)
+                (pubkey-file (string-append
+                              #$home "/"
+                              (basename
+                               (strip-store-file-name admin-pubkey)))))
+
+           (simple-format #t "guix: gitolite: installing ~A\n" #$rc-file)
+           (copy-file #$rc-file #$(string-append home "/.gitolite.rc"))
+
+           ;; The key must be writable, so copy it from the store
+           (copy-file admin-pubkey pubkey-file)
+
+           (chmod pubkey-file #o500)
+           (chown pubkey-file
+                  (passwd:uid user-info)
+                  (passwd:gid user-info))
+
+           ;; Set the git configuration, to avoid gitolite trying to use
+           ;; the hostname command, as the network might not be up yet
+           (with-output-to-file #$(string-append home "/.gitconfig")
+             (lambda ()
+               (display "[user]
+        name = GNU Guix
+        email = guix@localhost
+")))
+           ;; Run Gitolite setup, as this updates the hooks and include the
+           ;; admin pubkey if specified. The admin pubkey is required for
+           ;; initial setup, and will replace the previous key if run after
+           ;; initial setup
+           (match (primitive-fork)
+             (0
+              ;; Exit with a non-zero status code if an exception is thrown.
+              (dynamic-wind
+                (const #t)
+                (lambda ()
+                  (setenv "HOME" (passwd:dir user-info))
+                  (setenv "USER" #$user)
+                  (setgid (passwd:gid user-info))
+                  (setuid (passwd:uid user-info))
+                  (primitive-exit
+                   (system* #$(file-append package "/bin/gitolite")
+                            "setup"
+                            "-m" "gitolite setup by GNU Guix"
+                            "-pk" pubkey-file)))
+                (lambda ()
+                  (primitive-exit 1))))
+             (pid (waitpid pid)))
+
+           (when (file-exists? pubkey-file)
+             (delete-file pubkey-file)))))))
+
+(define gitolite-service-type
+  (service-type
+   (name 'gitolite)
+   (extensions
+    (list (service-extension activation-service-type
+                             gitolite-activation)
+          (service-extension account-service-type
+                             gitolite-accounts)
+          (service-extension profile-service-type
+                             ;; The Gitolite package in Guix uses
+                             ;; gitolite-shell in the authorized_keys file, so
+                             ;; gitolite-shell needs to be on the PATH for
+                             ;; gitolite to work.
+                             (lambda (config)
+                               (list
+                                (gitolite-configuration-package config))))))
+   (description
+    "Setup @command{gitolite}, a Git hosting tool providing access over SSH..
+By default, the @code{git} user is used, but this is configurable.
+Additionally, Gitolite can integrate with with tools like gitweb or cgit to
+provide a web interface to view selected repositories.")))
diff --git a/gnu/system.scm b/gnu/system.scm
index e4a57475a9..99bc09873d 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -501,7 +501,7 @@ a container or that of a \"bare metal\" system."
                    ;; Add the firmware service, unless we are building for a
                    ;; container.
                    (if container?
-                       '()
+                       (list %containerized-shepherd-service)
                        (list %linux-bare-metal-service
                              (service firmware-service-type
                                       (operating-system-firmware os))))))))
diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm
index 3b935a1b48..4409b8a12b 100644
--- a/gnu/tests/version-control.scm
+++ b/gnu/tests/version-control.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,14 +28,17 @@
   #:use-module (gnu services)
   #:use-module (gnu services version-control)
   #:use-module (gnu services cgit)
+  #:use-module (gnu services ssh)
   #:use-module (gnu services web)
   #:use-module (gnu services networking)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages ssh)
   #:use-module (guix gexp)
   #:use-module (guix store)
   #:use-module (guix modules)
   #:export (%test-cgit
-            %test-git-http))
+            %test-git-http
+            %test-gitolite))
 
 (define README-contents
   "Hello!  This is what goes inside the 'README' file.")
@@ -300,3 +304,111 @@ HTTP-PORT."
    (name "git-http")
    (description "Connect to a running Git HTTP server.")
    (value (run-git-http-test))))
+
+
+;;;
+;;; Gitolite.
+;;;
+
+(define %gitolite-test-admin-keypair
+  (computed-file
+   "gitolite-test-admin-keypair"
+   (with-imported-modules (source-module-closure
+                           '((guix build utils)))
+     #~(begin
+         (use-modules (ice-9 match) (srfi srfi-26)
+                      (guix build utils))
+
+         (mkdir #$output)
+         (invoke #$(file-append openssh "/bin/ssh-keygen")
+                 "-f" (string-append #$output "/test-admin")
+                 "-t" "rsa"
+                 "-q"
+                 "-N" "")))))
+
+(define %gitolite-os
+  (simple-operating-system
+   (dhcp-client-service)
+   (service openssh-service-type)
+   (service gitolite-service-type
+            (gitolite-configuration
+             (admin-pubkey
+              (file-append %gitolite-test-admin-keypair "/test-admin.pub"))))))
+
+(define (run-gitolite-test)
+  (define os
+    (marionette-operating-system
+     %gitolite-os
+     #:imported-modules '((gnu services herd)
+                          (guix combinators))))
+
+  (define vm
+    (virtual-machine
+     (operating-system os)
+     (port-forwardings `((2222 . 22)))))
+
+  (define test
+    (with-imported-modules '((gnu build marionette)
+                             (guix build utils))
+      #~(begin
+          (use-modules (srfi srfi-64)
+                       (rnrs io ports)
+                       (gnu build marionette)
+                       (guix build utils))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          (mkdir #$output)
+          (chdir #$output)
+
+          (test-begin "gitolite")
+
+          ;; Wait for sshd to be up and running.
+          (test-assert "service running"
+            (marionette-eval
+             '(begin
+                (use-modules (gnu services herd))
+                (start-service 'ssh-daemon))
+             marionette))
+
+          (display #$%gitolite-test-admin-keypair)
+
+          (setenv "GIT_SSH_VARIANT" "ssh")
+          (setenv "GIT_SSH_COMMAND"
+                  (string-join
+                   '(#$(file-append openssh "/bin/ssh")
+                     "-i" #$(file-append %gitolite-test-admin-keypair
+                                         "/test-admin")
+                     "-o" "UserKnownHostsFile=/dev/null"
+                     "-o" "StrictHostKeyChecking=no")))
+
+          (test-assert "cloning the admin repository"
+            (invoke #$(file-append git "/bin/git")
+                    "clone" "-v"
+                    "ssh://git@localhost:2222/gitolite-admin"
+                    "/tmp/clone"))
+
+          (test-assert "admin key exists"
+            (file-exists? "/tmp/clone/keydir/test-admin.pub"))
+
+          (with-directory-excursion "/tmp/clone"
+            (invoke #$(file-append git "/bin/git")
+                    "-c" "user.name=Guix" "-c" "user.email=guix"
+                    "commit"
+                    "-m" "Test commit"
+                    "--allow-empty")
+
+            (test-assert "pushing, and the associated hooks"
+              (invoke #$(file-append git "/bin/git") "push")))
+
+          (test-end)
+          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+  (gexp->derivation "gitolite" test))
+
+(define %test-gitolite
+  (system-test
+   (name "gitolite")
+   (description "Clone the Gitolite admin repository.")
+   (value (run-gitolite-test))))
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index bcc919137b..2e209fee97 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
+;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index 1cb734631c..1ec11c71d8 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -21,6 +21,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix derivations)
+  #:use-module (guix download)
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
@@ -48,14 +49,35 @@
   (let ((haskell (resolve-interface '(gnu packages haskell))))
     (module-ref haskell 'ghc)))
 
+(define (source-url->revision-url url revision)
+  "Convert URL (a Hackage source URL) to the URL for the Cabal file at
+version REVISION."
+  (let* ((last-slash (string-rindex url #\/))
+         (next-slash (string-rindex url #\/ 0 last-slash)))
+    (string-append (substring url 0 next-slash)
+                   (substring url last-slash (- (string-length url)
+                                                (string-length ".tar.gz")))
+                   "/revision/" revision ".cabal")))
+
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (haskell (default-haskell))
+                cabal-revision
                 #:allow-other-keys
                 #:rest arguments)
   "Return a bag for NAME."
   (define private-keywords
-    '(#:target #:haskell #:inputs #:native-inputs))
+    '(#:target #:haskell #:cabal-revision #:inputs #:native-inputs))
+
+  (define (cabal-revision->origin cabal-revision)
+    (match cabal-revision
+      ((revision hash)
+       (origin
+         (method url-fetch)
+         (uri (source-url->revision-url (origin-uri source) revision))
+         (sha256 (base32 hash))
+         (file-name (string-append name "-" revision ".cabal"))))
+      (#f #f)))
 
   (and (not target)                               ;XXX: no cross-compilation
        (bag
@@ -64,6 +86,9 @@
          (host-inputs `(,@(if source
                               `(("source" ,source))
                               '())
+                        ,@(match (cabal-revision->origin cabal-revision)
+                            (#f '())
+                            (revision `(("cabal-revision" ,revision))))
                         ,@inputs
 
                         ;; Keep the standard inputs of 'gnu-build-system'.
@@ -103,6 +128,11 @@ provides a 'Setup.hs' file as its build system."
                                    source)
                                   (source
                                    source))
+                      #:cabal-revision ,(match (assoc-ref inputs
+                                                          "cabal-revision")
+                                          (((? derivation? revision))
+                                           (derivation->output-path revision))
+                                          (revision revision))
                       #:configure-flags ,configure-flags
                       #:haddock-flags ,haddock-flags
                       #:system ,system
diff --git a/guix/build/download.scm b/guix/build/download.scm
index 315a3554ec..54163849a2 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -115,7 +115,7 @@ and 'guix publish', something like
         (string-drop path 33)
         path)))
 
-(define* (ftp-fetch uri file #:key timeout)
+(define* (ftp-fetch uri file #:key timeout print-build-trace?)
   "Fetch data from URI and write it to FILE.  Return FILE on success.  Bail
 out if the connection could not be established in less than TIMEOUT seconds."
   (let* ((conn (match (and=> (uri-userinfo uri)
@@ -136,12 +136,17 @@ out if the connection could not be established in less than TIMEOUT seconds."
       (lambda (out)
         (dump-port* in out
                     #:buffer-size %http-receive-buffer-size
-                    #:reporter (progress-reporter/file
-                                (uri-abbreviation uri) size))))
-
-    (ftp-close conn))
-    (newline)
-  file)
+                    #:reporter
+                    (if print-build-trace?
+                        (progress-reporter/trace
+                         file (uri->string uri) size)
+                        (progress-reporter/file
+                         (uri-abbreviation uri) size)))))
+
+    (ftp-close conn)
+    (unless print-build-trace?
+      (newline))
+    file))
 
 ;; Autoload GnuTLS so that this module can be used even when GnuTLS is
 ;; not available.  At compile time, this yields "possibly unbound
@@ -723,7 +728,8 @@ Return a list of URIs."
                     #:key
                     (timeout 10) (verify-certificate? #t)
                     (mirrors '()) (content-addressed-mirrors '())
-                    (hashes '()))
+                    (hashes '())
+                    print-build-trace?)
   "Fetch FILE from URL; URL may be either a single string, or a list of
 string denoting alternate URLs for FILE.  Return #f on failure, and FILE
 on success.
@@ -759,13 +765,18 @@ otherwise simply ignore them."
             (lambda (output)
               (dump-port* port output
                           #:buffer-size %http-receive-buffer-size
-                          #:reporter (progress-reporter/file
-                                      (uri-abbreviation uri) size))
+                          #:reporter (if print-build-trace?
+                                         (progress-reporter/trace
+                                          file (uri->string uri) size)
+                                         (progress-reporter/file
+                                          (uri-abbreviation uri) size)))
               (newline)))
           file)))
       ((ftp)
        (false-if-exception* (ftp-fetch uri file
-                                       #:timeout timeout)))
+                                       #:timeout timeout
+                                       #:print-build-trace?
+                                       print-build-trace?)))
       (else
        (format #t "skipping URI with unsupported scheme: ~s~%"
                uri)
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 5a72d22842..72714a29ad 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -28,6 +28,7 @@
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
+  #:use-module (ice-9 ftw)
   #:export (%standard-phases
             haskell-build))
 
@@ -266,8 +267,19 @@ given Haskell package."
     (run-setuphs "haddock" haddock-flags))
   #t)
 
+(define* (patch-cabal-file #:key cabal-revision #:allow-other-keys)
+  (when cabal-revision
+    ;; Cabal requires there to be a single file with the suffix ".cabal".
+    (match (scandir "." (cut string-suffix? ".cabal" <>))
+      ((original)
+       (format #t "replacing ~s with ~s~%" original cabal-revision)
+       (copy-file cabal-revision original))
+      (_ (error "Could not find a Cabal file to patch."))))
+  #t)
+
 (define %standard-phases
   (modify-phases gnu:%standard-phases
+    (add-after 'unpack 'patch-cabal-file patch-cabal-file)
     (delete 'bootstrap)
     (add-before 'configure 'setup-compiler setup-compiler)
     (add-before 'install 'haddock haddock)
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 6470cfec97..97bc6197a3 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -84,11 +84,12 @@
 (define (normalize-dependency dependency)
   "Normalize the name of DEPENDENCY.  Handles dependency definitions of the
 dependency-def form described by
-<https://common-lisp.net/project/asdf/asdf.html#The-defsystem-grammar>."
+<https://common-lisp.net/project/asdf/asdf.html#The-defsystem-grammar>.
+Assume that any symbols in DEPENDENCY will be in upper-case."
   (match dependency
-    ((':version name rest ...)
+    ((':VERSION name rest ...)
      `(:version ,(normalize-string name) ,@rest))
-    ((':feature feature-specification dependency-specification)
+    ((':FEATURE feature-specification dependency-specification)
      `(:feature
        ,feature-specification
        ,(normalize-dependency dependency-specification)))
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index afd5d997ae..1c1e73a723 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -43,15 +43,12 @@
 
 (define (lts-info-ghc-version lts-info)
   "Retruns the version of the GHC compiler contained in LTS-INFO."
-  (match lts-info
-    ((("snapshot" ("ghc" . version) _ _) _)  version)
-    (_ #f)))
+  (and=> (assoc-ref lts-info "snapshot")
+         (cut assoc-ref <> "ghc")))
 
 (define (lts-info-packages lts-info)
-  "Returns the alist of packages contained in LTS-INFO."
-  (match lts-info
-    ((("packages" pkg ...) . _) pkg)
-    (_ '())))
+  "Retruns the alist of packages contained in LTS-INFO."
+  (or (assoc-ref lts-info "packages") '()))
 
 (define (leave-with-message fmt . args)
   (raise (condition (&message (message (apply format #f fmt args))))))
diff --git a/guix/progress.scm b/guix/progress.scm
index 53aea1c56d..f846944952 100644
--- a/guix/progress.scm
+++ b/guix/progress.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Steve Sprang <scs@stevesprang.com>
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +38,11 @@
             progress-reporter/silent
             progress-reporter/file
             progress-reporter/bar
+            progress-reporter/trace
 
+            display-download-progress
+            erase-current-line
+            progress-bar
             byte-count->string
             current-terminal-columns
 
@@ -183,6 +187,46 @@ width of the bar is BAR-WIDTH."
 move the cursor to the beginning of the line."
   (display "\r\x1b[K" port))
 
+(define* (display-download-progress file size
+                                    #:key
+                                    start-time (transferred 0)
+                                    (log-port (current-error-port)))
+  "Write the progress report to LOG-PORT.  Use START-TIME (a SRFI-19 time
+object) and TRANSFERRED (a total number of bytes) to determine the
+throughput."
+  (define elapsed
+    (duration->seconds
+     (time-difference (current-time time-monotonic) start-time)))
+  (if (number? size)
+      (let* ((%  (* 100.0 (/ transferred size)))
+             (throughput (/ transferred elapsed))
+             (left       (format #f " ~a  ~a" file
+                                 (byte-count->string size)))
+             (right      (format #f "~a/s ~a ~a~6,1f%"
+                                 (byte-count->string throughput)
+                                 (seconds->string elapsed)
+                                 (progress-bar %) %)))
+        (erase-current-line log-port)
+        (display (string-pad-middle left right
+                                    (current-terminal-columns))
+                 log-port)
+        (force-output log-port))
+      (let* ((throughput (/ transferred elapsed))
+             (left       (format #f " ~a" file))
+             (right      (format #f "~a/s ~a | ~a transferred"
+                                 (byte-count->string throughput)
+                                 (seconds->string elapsed)
+                                 (byte-count->string transferred))))
+        (erase-current-line log-port)
+        (display (string-pad-middle left right
+                                    (current-terminal-columns))
+                 log-port)
+        (force-output log-port))))
+
+(define %progress-interval
+  ;; Default interval between subsequent outputs for rate-limited displays.
+  (make-time time-monotonic 200000000 0))
+
 (define* (progress-reporter/file file size
                                  #:optional (log-port (current-output-port))
                                  #:key (abbreviation basename))
@@ -192,44 +236,16 @@ ABBREVIATION used to shorten FILE for display."
   (let ((start-time (current-time time-monotonic))
         (transferred 0))
     (define (render)
-      "Write the progress report to LOG-PORT."
-      (define elapsed
-        (duration->seconds
-         (time-difference (current-time time-monotonic) start-time)))
-      (if (number? size)
-          (let* ((%  (* 100.0 (/ transferred size)))
-                 (throughput (/ transferred elapsed))
-                 (left       (format #f " ~a  ~a"
-                                     (abbreviation file)
-                                     (byte-count->string size)))
-                 (right      (format #f "~a/s ~a ~a~6,1f%"
-                                     (byte-count->string throughput)
-                                     (seconds->string elapsed)
-                                     (progress-bar %) %)))
-            (erase-current-line log-port)
-            (display (string-pad-middle left right
-                                        (current-terminal-columns))
-                     log-port)
-            (force-output log-port))
-          (let* ((throughput (/ transferred elapsed))
-                 (left       (format #f " ~a"
-                                     (abbreviation file)))
-                 (right      (format #f "~a/s ~a | ~a transferred"
-                                     (byte-count->string throughput)
-                                     (seconds->string elapsed)
-                                     (byte-count->string transferred))))
-            (erase-current-line log-port)
-            (display (string-pad-middle left right
-                                        (current-terminal-columns))
-                     log-port)
-            (force-output log-port))))
+      (display-download-progress (abbreviation file) size
+                                 #:start-time start-time
+                                 #:transferred transferred
+                                 #:log-port log-port))
 
     (progress-reporter
      (start render)
      ;; Report the progress every 300ms or longer.
      (report
-      (let ((rate-limited-render
-             (rate-limited render (make-time time-monotonic 300000000 0))))
+      (let ((rate-limited-render (rate-limited render %progress-interval)))
         (lambda (value)
           (set! transferred value)
           (rate-limited-render))))
@@ -269,6 +285,32 @@ tasks is performed.  Write PREFIX at the beginning of the line."
              (newline port))
            (force-output port)))))
 
+(define* (progress-reporter/trace file url size
+                                  #:optional (log-port (current-output-port)))
+  "Like 'progress-reporter/file', but instead of returning human-readable
+progress reports, write \"build trace\" lines to be processed elsewhere."
+  (define (report-progress transferred)
+    (define message
+      (format #f "@ download-progress ~a ~a ~a ~a~%"
+              file url (or size "-") transferred))
+
+    (display message log-port)                    ;should be atomic
+    (flush-output-port log-port))
+
+  (progress-reporter
+   (start (lambda ()
+            (display (format #f "@ download-started ~a ~a ~a~%"
+                             file url (or size "-"))
+                     log-port)))
+   (report (rate-limited report-progress %progress-interval))
+   (stop (lambda ()
+           (let ((size (or (and=> (stat file #f) stat:size)
+                           size)))
+             (report-progress size)
+             (display (format #f "@ download-succeeded ~a ~a ~a~%"
+                              file url size)
+                      log-port))))))
+
 ;; TODO: replace '(@ (guix build utils) dump-port))'.
 (define* (dump-port* in out
                      #:key (buffer-size 16384)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 9d38610633..5a6ba62bc3 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -45,6 +45,9 @@
   #:use-module (srfi srfi-37)
   #:autoload   (gnu packages) (specification->package %package-module-path)
   #:autoload   (guix download) (download-to-store)
+  #:use-module (guix status)
+  #:use-module ((guix progress) #:select (current-terminal-columns))
+  #:use-module ((guix build syscalls) #:select (terminal-columns))
   #:export (%standard-build-options
             set-build-options-from-command-line
             set-build-options-from-command-line*
@@ -390,6 +393,8 @@ options handled by 'set-build-options-from-command-line', and listed in
                      #:max-silent-time (assoc-ref opts 'max-silent-time)
                      #:timeout (assoc-ref opts 'timeout)
                      #:print-build-trace (assoc-ref opts 'print-build-trace?)
+                     #:print-extended-build-trace?
+                     (assoc-ref opts 'print-extended-build-trace?)
                      #:verbosity (assoc-ref opts 'verbosity)))
 
 (define set-build-options-from-command-line*
@@ -499,6 +504,7 @@ options handled by 'set-build-options-from-command-line', and listed in
     (substitutes? . #t)
     (build-hook? . #t)
     (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)
     (verbosity . 0)))
 
 (define (show-help)
@@ -733,11 +739,12 @@ needed."
         ;; Set the build options before we do anything else.
         (set-build-options-from-command-line store opts)
 
-        (parameterize ((current-build-output-port
+        (parameterize ((current-terminal-columns (terminal-columns))
+                       (current-build-output-port
                         (if quiet?
                             (%make-void-port "w")
-                            (build-output-port #:verbose? #t
-                                               #:port (duplicate-port (current-error-port) "w")))))
+                            (build-event-output-port
+                             (build-status-updater print-build-event)))))
           (let* ((mode  (assoc-ref opts 'build-mode))
                  (drv   (options->derivations store opts))
                  (urls  (map (cut string-append <> "/log")
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 1c04800e42..9fc7edcd36 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -21,6 +21,7 @@
 (define-module (guix scripts environment)
   #:use-module (guix ui)
   #:use-module (guix store)
+  #:use-module (guix status)
   #:use-module (guix grafts)
   #:use-module (guix derivations)
   #:use-module (guix packages)
@@ -173,6 +174,8 @@ COMMAND or an interactive shell in that environment.\n"))
     (substitutes? . #t)
     (build-hook? . #t)
     (graft? . #t)
+    (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)
     (verbosity . 0)))
 
 (define (tag-package-arg opts arg)
@@ -661,59 +664,60 @@ message if any test fails."
         (leave (G_ "'--user' cannot be used without '--container'~%")))
 
       (with-store store
-        (set-build-options-from-command-line store opts)
-
-        ;; Use the bootstrap Guile when requested.
-        (parameterize ((%graft? (assoc-ref opts 'graft?))
-                       (%guile-for-build
-                        (package-derivation
-                         store
-                         (if bootstrap?
-                             %bootstrap-guile
-                             (canonical-package guile-2.2)))))
-          (run-with-store store
-            ;; Containers need a Bourne shell at /bin/sh.
-            (mlet* %store-monad ((bash       (environment-bash container?
-                                                               bootstrap?
-                                                               system))
-                                 (prof-drv   (manifest->derivation
-                                              manifest system bootstrap?))
-                                 (profile -> (derivation->output-path prof-drv))
-                                 (gc-root -> (assoc-ref opts 'gc-root)))
-
-              ;; First build the inputs.  This is necessary even for
-              ;; --search-paths.  Additionally, we might need to build bash for
-              ;; a container.
-              (mbegin %store-monad
-                (build-environment (if (derivation? bash)
-                                       (list prof-drv bash)
-                                       (list prof-drv))
-                                   opts)
-                (mwhen gc-root
-                  (register-gc-root profile gc-root))
-
-                (cond
-                 ((assoc-ref opts 'dry-run?)
-                  (return #t))
-                 ((assoc-ref opts 'search-paths)
-                  (show-search-paths profile manifest #:pure? pure?)
-                  (return #t))
-                 (container?
-                  (let ((bash-binary
-                         (if bootstrap?
-                             bash
-                             (string-append (derivation->output-path bash)
-                                            "/bin/sh"))))
-                    (launch-environment/container #:command command
-                                                  #:bash bash-binary
-                                                  #:user user
-                                                  #:user-mappings mappings
-                                                  #:profile profile
-                                                  #:manifest manifest
-                                                  #:link-profile? link-prof?
-                                                  #:network? network?)))
-                 (else
-                  (return
-                   (exit/status
-                    (launch-environment/fork command profile manifest
-                                             #:pure? pure?)))))))))))))
+        (with-status-report print-build-event
+          (set-build-options-from-command-line store opts)
+
+          ;; Use the bootstrap Guile when requested.
+          (parameterize ((%graft? (assoc-ref opts 'graft?))
+                         (%guile-for-build
+                          (package-derivation
+                           store
+                           (if bootstrap?
+                               %bootstrap-guile
+                               (canonical-package guile-2.2)))))
+            (run-with-store store
+              ;; Containers need a Bourne shell at /bin/sh.
+              (mlet* %store-monad ((bash       (environment-bash container?
+                                                                 bootstrap?
+                                                                 system))
+                                   (prof-drv   (manifest->derivation
+                                                manifest system bootstrap?))
+                                   (profile -> (derivation->output-path prof-drv))
+                                   (gc-root -> (assoc-ref opts 'gc-root)))
+
+                ;; First build the inputs.  This is necessary even for
+                ;; --search-paths.  Additionally, we might need to build bash for
+                ;; a container.
+                (mbegin %store-monad
+                  (build-environment (if (derivation? bash)
+                                         (list prof-drv bash)
+                                         (list prof-drv))
+                                     opts)
+                  (mwhen gc-root
+                    (register-gc-root profile gc-root))
+
+                  (cond
+                   ((assoc-ref opts 'dry-run?)
+                    (return #t))
+                   ((assoc-ref opts 'search-paths)
+                    (show-search-paths profile manifest #:pure? pure?)
+                    (return #t))
+                   (container?
+                    (let ((bash-binary
+                           (if bootstrap?
+                               bash
+                               (string-append (derivation->output-path bash)
+                                              "/bin/sh"))))
+                      (launch-environment/container #:command command
+                                                    #:bash bash-binary
+                                                    #:user user
+                                                    #:user-mappings mappings
+                                                    #:profile profile
+                                                    #:manifest manifest
+                                                    #:link-profile? link-prof?
+                                                    #:network? network?)))
+                   (else
+                    (return
+                     (exit/status
+                      (launch-environment/fork command profile manifest
+                                               #:pure? pure?))))))))))))))
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 1916f3b9d7..163f5b1dc1 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -25,6 +25,7 @@
   #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix store)
+  #:use-module (guix status)
   #:use-module (guix grafts)
   #:use-module (guix monads)
   #:use-module (guix modules)
@@ -538,6 +539,8 @@ please email '~a'~%")
     (substitutes? . #t)
     (build-hook? . #t)
     (graft? . #t)
+    (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)
     (verbosity . 0)
     (symlinks . ())
     (compressor . ,(first %compressors))))
@@ -684,72 +687,73 @@ Create a bundle of PACKAGE.\n"))
 
   (with-error-handling
     (with-store store
-      ;; Set the build options before we do anything else.
-      (set-build-options-from-command-line store opts)
-
-      (parameterize ((%graft? (assoc-ref opts 'graft?))
-                     (%guile-for-build (package-derivation
-                                        store
-                                        (if (assoc-ref opts 'bootstrap?)
-                                            %bootstrap-guile
-                                            (canonical-package guile-2.2))
-                                        (assoc-ref opts 'system)
-                                        #:graft? (assoc-ref opts 'graft?))))
-        (let* ((dry-run?    (assoc-ref opts 'dry-run?))
-               (relocatable? (assoc-ref opts 'relocatable?))
-               (manifest    (let ((manifest (manifest-from-args store opts)))
-                              ;; Note: We cannot honor '--bootstrap' here because
-                              ;; 'glibc-bootstrap' lacks 'libc.a'.
-                              (if relocatable?
-                                  (map-manifest-entries wrapped-package manifest)
-                                  manifest)))
-               (pack-format (assoc-ref opts 'format))
-               (name        (string-append (symbol->string pack-format)
-                                           "-pack"))
-               (target      (assoc-ref opts 'target))
-               (bootstrap?  (assoc-ref opts 'bootstrap?))
-               (compressor  (if bootstrap?
-                                bootstrap-xz
-                                (assoc-ref opts 'compressor)))
-               (archiver    (if (equal? pack-format 'squashfs)
-                                squashfs-tools-next
-                                (if bootstrap?
-                                    %bootstrap-coreutils&co
-                                    tar)))
-               (symlinks    (assoc-ref opts 'symlinks))
-               (build-image (match (assq-ref %formats pack-format)
-                              ((? procedure? proc) proc)
-                              (#f
-                               (leave (G_ "~a: unknown pack format~%")
-                                      pack-format))))
-               (localstatedir? (assoc-ref opts 'localstatedir?)))
-          (run-with-store store
-            (mlet* %store-monad ((profile (profile-derivation
-                                           manifest
-                                           #:relative-symlinks? relocatable?
-                                           #:hooks (if bootstrap?
-                                                       '()
-                                                       %default-profile-hooks)
-                                           #:locales? (not bootstrap?)
-                                           #:target target))
-                                 (drv (build-image name profile
-                                                   #:target
-                                                   target
-                                                   #:compressor
-                                                   compressor
-                                                   #:symlinks
-                                                   symlinks
-                                                   #:localstatedir?
-                                                   localstatedir?
-                                                   #:archiver
-                                                   archiver)))
-              (mbegin %store-monad
-                (show-what-to-build* (list drv)
-                                     #:use-substitutes?
-                                     (assoc-ref opts 'substitutes?)
-                                     #:dry-run? dry-run?)
-                (munless dry-run?
-                  (built-derivations (list drv))
-                  (return (format #t "~a~%"
-                                  (derivation->output-path drv))))))
-            #:system (assoc-ref opts 'system)))))))
+      (with-status-report print-build-event
+        ;; Set the build options before we do anything else.
+        (set-build-options-from-command-line store opts)
+
+        (parameterize ((%graft? (assoc-ref opts 'graft?))
+                       (%guile-for-build (package-derivation
+                                          store
+                                          (if (assoc-ref opts 'bootstrap?)
+                                              %bootstrap-guile
+                                              (canonical-package guile-2.2))
+                                          (assoc-ref opts 'system)
+                                          #:graft? (assoc-ref opts 'graft?))))
+          (let* ((dry-run?    (assoc-ref opts 'dry-run?))
+                 (relocatable? (assoc-ref opts 'relocatable?))
+                 (manifest    (let ((manifest (manifest-from-args store opts)))
+                                ;; Note: We cannot honor '--bootstrap' here because
+                                ;; 'glibc-bootstrap' lacks 'libc.a'.
+                                (if relocatable?
+                                    (map-manifest-entries wrapped-package manifest)
+                                    manifest)))
+                 (pack-format (assoc-ref opts 'format))
+                 (name        (string-append (symbol->string pack-format)
+                                             "-pack"))
+                 (target      (assoc-ref opts 'target))
+                 (bootstrap?  (assoc-ref opts 'bootstrap?))
+                 (compressor  (if bootstrap?
+                                  bootstrap-xz
+                                  (assoc-ref opts 'compressor)))
+                 (archiver    (if (equal? pack-format 'squashfs)
+                                  squashfs-tools-next
+                                  (if bootstrap?
+                                      %bootstrap-coreutils&co
+                                      tar)))
+                 (symlinks    (assoc-ref opts 'symlinks))
+                 (build-image (match (assq-ref %formats pack-format)
+                                ((? procedure? proc) proc)
+                                (#f
+                                 (leave (G_ "~a: unknown pack format~%")
+                                        pack-format))))
+                 (localstatedir? (assoc-ref opts 'localstatedir?)))
+            (run-with-store store
+              (mlet* %store-monad ((profile (profile-derivation
+                                             manifest
+                                             #:relative-symlinks? relocatable?
+                                             #:hooks (if bootstrap?
+                                                         '()
+                                                         %default-profile-hooks)
+                                             #:locales? (not bootstrap?)
+                                             #:target target))
+                                   (drv (build-image name profile
+                                                     #:target
+                                                     target
+                                                     #:compressor
+                                                     compressor
+                                                     #:symlinks
+                                                     symlinks
+                                                     #:localstatedir?
+                                                     localstatedir?
+                                                     #:archiver
+                                                     archiver)))
+                (mbegin %store-monad
+                  (show-what-to-build* (list drv)
+                                       #:use-substitutes?
+                                       (assoc-ref opts 'substitutes?)
+                                       #:dry-run? dry-run?)
+                  (munless dry-run?
+                    (built-derivations (list drv))
+                    (return (format #t "~a~%"
+                                    (derivation->output-path drv))))))
+              #:system (assoc-ref opts 'system))))))))
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index c3ed2ac935..93a77915fe 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -24,6 +24,7 @@
 
 (define-module (guix scripts package)
   #:use-module (guix ui)
+  #:use-module (guix status)
   #:use-module (guix store)
   #:use-module (guix grafts)
   #:use-module (guix derivations)
@@ -330,7 +331,8 @@ ENTRIES, a list of manifest entries, in the context of PROFILE."
     (graft? . #t)
     (substitutes? . #t)
     (build-hook? . #t)
-    (print-build-trace? . #t)))
+    (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)))
 
 (define (show-help)
   (display (G_ "Usage: guix package [OPTION]...
@@ -941,15 +943,12 @@ processed, #f otherwise."
     (or (process-query opts)
         (parameterize ((%store  (open-connection))
                        (%graft? (assoc-ref opts 'graft?)))
-          (set-build-options-from-command-line (%store) opts)
-
-          (parameterize ((%guile-for-build
-                          (package-derivation
-                           (%store)
-                           (if (assoc-ref opts 'bootstrap?)
-                               %bootstrap-guile
-                               (canonical-package guile-2.2))))
-                         (current-build-output-port
-                          (build-output-port #:verbose? verbose?
-                                             #:port (duplicate-port (current-error-port) "w"))))
-            (process-actions (%store) opts))))))
+          (with-status-report print-build-event/quiet
+            (set-build-options-from-command-line (%store) opts)
+            (parameterize ((%guile-for-build
+                            (package-derivation
+                             (%store)
+                             (if (assoc-ref opts 'bootstrap?)
+                                 %bootstrap-guile
+                                 (canonical-package guile-2.2)))))
+              (process-actions (%store) opts)))))))
diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm
index 18e2fc92f2..df787a9940 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,7 +41,8 @@
     (module-use! module (resolve-interface '(guix base32)))
     module))
 
-(define* (perform-download drv #:optional output)
+(define* (perform-download drv #:optional output
+                           #:key print-build-trace?)
   "Perform the download described by DRV, a fixed-output derivation, to
 OUTPUT.
 
@@ -67,6 +68,7 @@ actual output is different from that when we're doing a 'bmCheck' or
 
       ;; We're invoked by the daemon, which gives us write access to OUTPUT.
       (when (url-fetch url output
+                       #:print-build-trace? print-build-trace?
                        #:mirrors (if mirrors
                                      (call-with-input-file mirrors read)
                                      '())
@@ -98,6 +100,11 @@ allows us to sidestep bootstrapping problems, such downloading the source code
 of GnuTLS over HTTPS, before we have built GnuTLS.  See
 <http://bugs.gnu.org/22774>."
 
+  (define print-build-trace?
+    (match (getenv "_NIX_OPTIONS")
+      (#f #f)
+      (str (string-contains str "print-extended-build-trace=1"))))
+
   ;; This program must be invoked by guix-daemon under an unprivileged UID to
   ;; prevent things downloading from 'file:///etc/shadow' or arbitrary code
   ;; execution via the content-addressed mirror procedures.  (That means we
@@ -107,10 +114,12 @@ of GnuTLS over HTTPS, before we have built GnuTLS.  See
       (((? derivation-path? drv) (? store-path? output))
        (assert-low-privileges)
        (perform-download (read-derivation-from-file drv)
-                         output))
+                         output
+                         #:print-build-trace? print-build-trace?))
       (((? derivation-path? drv))                 ;backward compatibility
        (assert-low-privileges)
-       (perform-download (read-derivation-from-file drv)))
+       (perform-download (read-derivation-from-file drv)
+                         #:print-build-trace? print-build-trace?))
       (("--version")
        (show-version-and-exit))
       (x
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 39aebb18e2..803f7cf142 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -20,6 +20,7 @@
 (define-module (guix scripts pull)
   #:use-module (guix ui)
   #:use-module (guix utils)
+  #:use-module (guix status)
   #:use-module (guix scripts)
   #:use-module (guix store)
   #:use-module (guix config)
@@ -61,6 +62,8 @@
   `((system . ,(%current-system))
     (substitutes? . #t)
     (build-hook? . #t)
+    (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)
     (graft? . #t)
     (verbosity . 0)))
 
@@ -447,36 +450,37 @@ Use '~/.config/guix/channels.scm' instead."))
               #t)                                 ;XXX: not very useful
              (else
               (with-store store
-                (parameterize ((%graft? (assoc-ref opts 'graft?))
-                               (%repository-cache-directory cache))
-                  (set-build-options-from-command-line store opts)
-                  (honor-x509-certificates store)
-
-                  (let ((instances (latest-channel-instances store channels)))
-                    (format (current-error-port)
-                            (N_ "Building from this channel:~%"
-                                "Building from these channels:~%"
-                                (length instances)))
-                    (for-each (lambda (instance)
-                                (let ((channel
-                                       (channel-instance-channel instance)))
-                                  (format (current-error-port)
-                                          "  ~10a~a\t~a~%"
-                                          (channel-name channel)
-                                          (channel-url channel)
-                                          (string-take
-                                           (channel-instance-commit instance)
-                                           7))))
-                              instances)
-                    (parameterize ((%guile-for-build
-                                    (package-derivation
-                                     store
-                                     (if (assoc-ref opts 'bootstrap?)
-                                         %bootstrap-guile
-                                         (canonical-package guile-2.2)))))
-                      (run-with-store store
-                        (build-and-install instances profile
-                                           #:verbose?
-                                           (assoc-ref opts 'verbose?)))))))))))))
+                (with-status-report print-build-event
+                  (parameterize ((%graft? (assoc-ref opts 'graft?))
+                                 (%repository-cache-directory cache))
+                    (set-build-options-from-command-line store opts)
+                    (honor-x509-certificates store)
+
+                    (let ((instances (latest-channel-instances store channels)))
+                      (format (current-error-port)
+                              (N_ "Building from this channel:~%"
+                                  "Building from these channels:~%"
+                                  (length instances)))
+                      (for-each (lambda (instance)
+                                  (let ((channel
+                                         (channel-instance-channel instance)))
+                                    (format (current-error-port)
+                                            "  ~10a~a\t~a~%"
+                                            (channel-name channel)
+                                            (channel-url channel)
+                                            (string-take
+                                             (channel-instance-commit instance)
+                                             7))))
+                                instances)
+                      (parameterize ((%guile-for-build
+                                      (package-derivation
+                                       store
+                                       (if (assoc-ref opts 'bootstrap?)
+                                           %bootstrap-guile
+                                           (canonical-package guile-2.2)))))
+                        (run-with-store store
+                          (build-and-install instances profile
+                                             #:verbose?
+                                             (assoc-ref opts 'verbose?))))))))))))))
 
 ;;; pull.scm ends here
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 50c6a22064..eb82224016 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -837,7 +837,16 @@ REPORTER, which should be a <progress-reporter> object."
        (make-custom-binary-input-port "progress-port-proc"
                                       read! #f #f
                                       (lambda ()
-                                        (stop)
+                                        ;; XXX: Kludge!  When used through
+                                        ;; 'decompressed-port', this port ends
+                                        ;; up being closed twice: once in a
+                                        ;; child process early on, and at the
+                                        ;; end in the parent process.  Ignore
+                                        ;; the early close so we don't output
+                                        ;; a spurious "download-succeeded"
+                                        ;; trace.
+                                        (unless (zero? total)
+                                          (stop))
                                         (close-port port)))))))
 
 (define-syntax with-networking
@@ -930,7 +939,7 @@ authorized substitutes."
      (error "unknown `--query' command" wtf))))
 
 (define* (process-substitution store-item destination
-                               #:key cache-urls acl)
+                               #:key cache-urls acl print-build-trace?)
   "Substitute STORE-ITEM (a store file name) from CACHE-URLS, and write it to
 DESTINATION as a nar file.  Verify the substitute against ACL."
   (let* ((narinfo (lookup-narinfo cache-urls store-item
@@ -943,8 +952,10 @@ DESTINATION as a nar file.  Verify the substitute against ACL."
     ;; Tell the daemon what the expected hash of the Nar itself is.
     (format #t "~a~%" (narinfo-hash narinfo))
 
-    (format (current-error-port)
-            (G_ "Downloading ~a...~%") (uri->string uri))
+    (unless print-build-trace?
+      (format (current-error-port)
+              (G_ "Downloading ~a...~%") (uri->string uri)))
+
     (let*-values (((raw download-size)
                    ;; Note that Hydra currently generates Nars on the fly
                    ;; and doesn't specify a Content-Length, so
@@ -955,10 +966,15 @@ DESTINATION as a nar file.  Verify the substitute against ACL."
                           (dl-size  (or download-size
                                         (and (equal? comp "none")
                                              (narinfo-size narinfo))))
-                          (reporter (progress-reporter/file
-                                     (uri->string uri) dl-size
-                                     (current-error-port)
-                                     #:abbreviation nar-uri-abbreviation)))
+                          (reporter (if print-build-trace?
+                                        (progress-reporter/trace
+                                         destination
+                                         (uri->string uri) dl-size
+                                         (current-error-port))
+                                        (progress-reporter/file
+                                         (uri->string uri) dl-size
+                                         (current-error-port)
+                                         #:abbreviation nar-uri-abbreviation))))
                      (progress-report-port reporter raw)))
                   ((input pids)
                    ;; NOTE: This 'progress' port of current process will be
@@ -1058,6 +1074,13 @@ default value."
 
 (define (guix-substitute . args)
   "Implement the build daemon's substituter protocol."
+  (define print-build-trace?
+    (match (or (find-daemon-option "untrusted-print-extended-build-trace")
+               (find-daemon-option "print-extended-build-trace"))
+      (#f #f)
+      ((= string->number number) (> number 0))
+      (_ #f)))
+
   (mkdir-p %narinfo-cache-directory)
   (maybe-remove-expired-cache-entries %narinfo-cache-directory
                                       cached-narinfo-files
@@ -1111,7 +1134,8 @@ default value."
         (parameterize ((current-terminal-columns (client-terminal-columns)))
           (process-substitution store-path destination
                                 #:cache-urls (substitute-urls)
-                                #:acl (current-acl))))
+                                #:acl (current-acl)
+                                #:print-build-trace? print-build-trace?)))
        ((or ("-V") ("--version"))
         (show-version-and-exit "guix substitute"))
        (("--help")
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 69bd05b516..f9d6b9e5b6 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -23,6 +23,7 @@
 (define-module (guix scripts system)
   #:use-module (guix config)
   #:use-module (guix ui)
+  #:use-module (guix status)
   #:use-module (guix store)
   #:autoload   (guix store database) (register-path)
   #:use-module (guix grafts)
@@ -310,9 +311,9 @@ names of services to load (upgrade), and the list of names of services to
 unload."
   (match (current-services)
     ((services ...)
-     (let-values (((to-unload to-load)
+     (let-values (((to-unload to-restart)
                    (shepherd-service-upgrade services new-services)))
-       (mproc to-load
+       (mproc to-restart
               (map (compose first live-service-provision)
                    to-unload))))
     (#f
@@ -335,25 +336,32 @@ bring the system down."
   ;; Arrange to simply emit a warning if the service upgrade fails.
   (with-shepherd-error-handling
    (call-with-service-upgrade-info new-services
-     (lambda (to-load to-unload)
+     (lambda (to-restart to-unload)
         (for-each (lambda (unload)
                     (info (G_ "unloading service '~a'...~%") unload)
                     (unload-service unload))
                   to-unload)
 
         (with-monad %store-monad
-          (munless (null? to-load)
-            (let ((to-load-names  (map shepherd-service-canonical-name to-load))
-                  (to-start       (filter shepherd-service-auto-start? to-load)))
-              (info (G_ "loading new services:~{ ~a~}...~%") to-load-names)
+          (munless (null? new-services)
+            (let ((new-service-names  (map shepherd-service-canonical-name new-services))
+                  (to-restart-names   (map shepherd-service-canonical-name to-restart))
+                  (to-start           (filter shepherd-service-auto-start? new-services)))
+              (info (G_ "loading new services:~{ ~a~}...~%") new-service-names)
+              (unless (null? to-restart-names)
+                ;; Listing TO-RESTART-NAMES in the message below wouldn't help
+                ;; because many essential services cannot be meaningfully
+                ;; restarted.  See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22039#30>.
+                (format #t (G_ "To complete the upgrade, run 'herd restart SERVICE' to stop,
+upgrade, and restart each service that was not automatically restarted.\n")))
               (mlet %store-monad ((files (mapm %store-monad
                                                (compose lower-object
                                                         shepherd-service-file)
-                                               to-load)))
+                                               new-services)))
                 ;; Here we assume that FILES are exactly those that were computed
                 ;; as part of the derivation that built OS, which is normally the
                 ;; case.
-                (load-services (map derivation->output-path files))
+                (load-services/safe (map derivation->output-path files))
 
                 (for-each start-service
                           (map shepherd-service-canonical-name to-start))
@@ -1072,6 +1080,8 @@ Some ACTIONS support additional ARGS.\n"))
   `((system . ,(%current-system))
     (substitutes? . #t)
     (build-hook? . #t)
+    (print-build-trace? . #t)
+    (print-extended-build-trace? . #t)
     (graft? . #t)
     (verbosity . 0)
     (file-system-type . "ext4")
@@ -1246,9 +1256,11 @@ argument list and OPTS is the option alist."
                                          parse-sub-command))
            (args     (option-arguments opts))
            (command  (assoc-ref opts 'action)))
-      (parameterize ((%graft? (assoc-ref opts 'graft?))
-                     (current-terminal-columns (terminal-columns)))
-        (process-command command args opts)))))
+      (parameterize ((%graft? (assoc-ref opts 'graft?)))
+        (with-status-report (if (memq command '(init reconfigure))
+                                print-build-event/quiet
+                                print-build-event)
+          (process-command command args opts))))))
 
 ;;; Local Variables:
 ;;; eval: (put 'call-with-service-upgrade-info 'scheme-indent-function 1)
diff --git a/guix/status.scm b/guix/status.scm
new file mode 100644
index 0000000000..c6956066fd
--- /dev/null
+++ b/guix/status.scm
@@ -0,0 +1,501 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix status)
+  #:use-module (guix records)
+  #:use-module (guix i18n)
+  #:use-module ((guix ui) #:select (colorize-string))
+  #:use-module (guix progress)
+  #:autoload   (guix build syscalls) (terminal-columns)
+  #:use-module ((guix build download)
+                #:select (nar-uri-abbreviation))
+  #:use-module (guix store)
+  #:use-module (guix derivations)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-9)
+  #:use-module (srfi srfi-19)
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 regex)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
+  #:use-module (ice-9 binary-ports)
+  #:use-module (rnrs bytevectors)
+  #:use-module ((system foreign)
+                #:select (bytevector->pointer pointer->bytevector))
+  #:export (build-event-output-port
+            compute-status
+
+            build-status
+            build-status?
+            build-status-building
+            build-status-downloading
+            build-status-builds-completed
+            build-status-downloads-completed
+
+            download?
+            download
+            download-item
+            download-uri
+            download-size
+            download-start
+            download-end
+            download-transferred
+
+            build-status-updater
+            print-build-event
+            print-build-event/quiet
+            print-build-status
+
+            with-status-report))
+
+;;; Commentary:
+;;;
+;;; This module provides facilities to track the status of ongoing builds and
+;;; downloads in a given session, as well as tools to report about the current
+;;; status to user interfaces.  It does so by analyzing the output of
+;;; 'current-build-output-port'.  The build status is maintained in a
+;;; <build-status> record.
+;;;
+;;; Code:
+
+
+;;;
+;;; Build status tracking.
+;;;
+
+;; Builds and substitutions performed by the daemon.
+(define-record-type* <build-status> build-status make-build-status
+  build-status?
+  (building     build-status-building             ;list of drv
+                (default '()))
+  (downloading  build-status-downloading          ;list of <download>
+                (default '()))
+  (builds-completed build-status-builds-completed ;list of drv
+                    (default '()))
+  (downloads-completed build-status-downloads-completed ;list of store items
+                       (default '())))
+
+;; On-going or completed downloads.  Downloads can be stem from substitutes
+;; and from "builtin:download" fixed-output derivations.
+(define-record-type <download>
+  (%download item uri size start end transferred)
+  download?
+  (item         download-item)            ;store item
+  (uri          download-uri)             ;string | #f
+  (size         download-size)            ;integer | #f
+  (start        download-start)           ;<time>
+  (end          download-end)             ;#f | <time>
+  (transferred  download-transferred))    ;integer
+
+(define* (download item uri
+                   #:key size
+                   (start (current-time time-monotonic)) end
+                   (transferred 0))
+  "Return a new download."
+  (%download item uri size start end transferred))
+
+(define (matching-download item)
+  "Return a predicate that matches downloads of ITEM."
+  (lambda (download)
+    (string=? item (download-item download))))
+
+(define* (compute-status event status
+                         #:key (current-time current-time))
+  "Given EVENT, a tuple like (build-started \"/gnu/store/...-foo.drv\" ...),
+compute a new status based on STATUS."
+  (match event
+    (('build-started drv _ ...)
+     (build-status
+      (inherit status)
+      (building (cons drv (build-status-building status)))))
+    (((or 'build-succeeded 'build-failed) drv _ ...)
+     (build-status
+      (inherit status)
+      (building (delete drv (build-status-building status)))
+      (builds-completed (cons drv (build-status-builds-completed status)))))
+
+    ;; Note: Ignore 'substituter-started' and 'substituter-succeeded' because
+    ;; they're not as informative as 'download-started' and
+    ;; 'download-succeeded'.
+
+    (('download-started item uri (= string->number size))
+     ;; This is presumably a fixed-output derivation so move it from
+     ;; 'building' to 'downloading'.  XXX: This doesn't work in 'check' mode
+     ;; because ITEM is different from DRV's output.
+     (build-status
+      (inherit status)
+      (building (remove (lambda (drv)
+                          (equal? (false-if-exception
+                                   (derivation->output-path
+                                    (read-derivation-from-file drv)))
+                                  item))
+                        (build-status-building status)))
+      (downloading (cons (download item uri #:size size
+                                   #:start (current-time time-monotonic))
+                         (build-status-downloading status)))))
+    (('download-succeeded item uri (= string->number size))
+     (let ((current (find (matching-download item)
+                          (build-status-downloading status))))
+       (build-status
+        (inherit status)
+        (downloading (delq current (build-status-downloading status)))
+        (downloads-completed
+         (cons (download item uri
+                         #:size size
+                         #:start (download-start current)
+                         #:transferred size
+                         #:end (current-time time-monotonic))
+               (build-status-downloads-completed status))))))
+    (('substituter-succeeded item _ ...)
+     (match (find (matching-download item)
+                  (build-status-downloading status))
+       (#f
+        ;; Presumably we already got a 'download-succeeded' event for ITEM,
+        ;; everything is fine.
+        status)
+       (current
+        ;; Maybe the build process didn't emit a 'download-succeeded' event
+        ;; for ITEM, so remove CURRENT from the queue now.
+        (build-status
+         (inherit status)
+         (downloading (delq current (build-status-downloading status)))
+         (downloads-completed
+          (cons (download item (download-uri current)
+                          #:size (download-size current)
+                          #:start (download-start current)
+                          #:transferred (download-size current)
+                          #:end (current-time time-monotonic))
+                (build-status-downloads-completed status)))))))
+    (('download-progress item uri
+                         (= string->number size)
+                         (= string->number transferred))
+     (let ((downloads (remove (matching-download item)
+                              (build-status-downloading status)))
+           (current   (find (matching-download item)
+                            (build-status-downloading status))))
+       (build-status
+        (inherit status)
+        (downloading (cons (download item uri
+                                     #:size size
+                                     #:start
+                                     (or (and current
+                                              (download-start current))
+                                         (current-time time-monotonic))
+                                     #:transferred transferred)
+                           downloads)))))
+    (_
+     status)))
+
+(define (simultaneous-jobs status)
+  "Return the number of on-going builds and downloads for STATUS."
+  (+ (length (build-status-building status))
+     (length (build-status-downloading status))))
+
+
+;;;
+;;; Rendering.
+;;;
+
+(define (extended-build-trace-supported?)
+  "Return true if the currently used store is known to support \"extended
+build traces\" such as \"@ download-progress\" traces."
+  ;; Support for extended build traces was added in protocol version #x162.
+  (and (current-store-protocol-version)
+       (>= (current-store-protocol-version) #x162)))
+
+(define spin!
+  (let ((steps (circular-list "\\" "|" "/" "-")))
+    (lambda (port)
+      "Display a spinner on PORT."
+      (match steps
+        ((first . rest)
+         (set! steps rest)
+         (display "\r\x1b[K" port)
+         (display first port)
+         (force-output port))))))
+
+(define (color-output? port)
+  "Return true if we should write colored output to PORT."
+  (and (not (getenv "INSIDE_EMACS"))
+       (not (getenv "NO_COLOR"))
+       (isatty? port)))
+
+(define-syntax color-rules
+  (syntax-rules ()
+    "Return a procedure that colorizes the string it is passed according to
+the given rules.  Each rule has the form:
+
+  (REGEXP COLOR1 COLOR2 ...)
+
+where COLOR1 specifies how to colorize the first submatch of REGEXP, and so
+on."
+    ((_ (regexp colors ...) rest ...)
+     (let ((next (color-rules rest ...))
+           (rx   (make-regexp regexp)))
+       (lambda (str)
+         (if (string-index str #\nul)
+             str
+             (match (regexp-exec rx str)
+               (#f (next str))
+               (m  (let loop ((n 1)
+                              (c '(colors ...))
+                              (result '()))
+                     (match c
+                       (()
+                        (string-concatenate-reverse result))
+                       ((first . tail)
+                        (loop (+ n 1) tail
+                              (cons (colorize-string (match:substring m n)
+                                                     first)
+                                    result)))))))))))
+    ((_)
+     (lambda (str)
+       str))))
+
+(define colorize-log-line
+  ;; Take a string and return a possibly colorized string according to the
+  ;; rules below.
+  (color-rules
+   ("^(phase)(.*)(succeeded after)(.*)(seconds)(.*)"
+    GREEN    BOLD GREEN          RESET  GREEN  BLUE)
+   ("^(phase)(.*)(failed after)(.*)(seconds)(.*)"
+    RED BLUE RED BLUE RED BLUE)
+   ("^(.*)(error|fail|failed|\\<FAIL|FAILED)([[:blank:]]*)(:)(.*)"
+    RESET  RED                           BOLD         BOLD BOLD)
+   ("^(.*)(warning)([[:blank:]]*)(:)(.*)"
+    RESET  MAGENTA   BOLD        BOLD BOLD)))
+
+(define* (print-build-event event old-status status
+                            #:optional (port (current-error-port))
+                            #:key
+                            (colorize? (color-output? port))
+                            (print-log? #t))
+  "Print information about EVENT and STATUS to PORT.  When COLORIZE? is true,
+produce colorful output.  When PRINT-LOG? is true, display the build log in
+addition to build events."
+  (define info
+    (if colorize?
+        (cut colorize-string <> 'BOLD)
+        identity))
+
+  (define success
+    (if colorize?
+        (cut colorize-string <> 'GREEN 'BOLD)
+        identity))
+
+  (define failure
+    (if colorize?
+        (cut colorize-string <> 'RED 'BOLD)
+        identity))
+
+  (define print-log-line
+    (if print-log?
+        (if colorize?
+            (lambda (line)
+              (display (colorize-log-line line) port))
+            (cut display <> port))
+        (lambda (line)
+          (spin! port))))
+
+  (display "\r" port)                             ;erase the spinner
+  (match event
+    (('build-started drv . _)
+     (format port (info (G_ "building ~a...")) drv)
+     (newline port))
+    (('build-succeeded drv . _)
+     (format port (success (G_ "successfully built ~a")) drv)
+     (newline port)
+     (match (build-status-building status)
+       (() #t)
+       (ongoing                                   ;when max-jobs > 1
+        (format port
+                (N_ "The following build is still in progress:~%~{  ~a~%~}~%"
+                    "The following builds are still in progress:~%~{  ~a~%~}~%"
+                    (length ongoing))
+                ongoing))))
+    (('build-failed drv . _)
+     (format port (failure (G_ "build of ~a failed")) drv)
+     (newline port)
+     (match (derivation-log-file drv)
+       (#f
+        (format port (failure (G_ "Could not find build log for '~a'."))
+                drv))
+       (log
+        (format port (info (G_ "View build log at '~a'.")) log)))
+     (newline port))
+    (('substituter-started item _ ...)
+     (when (or print-log? (not (extended-build-trace-supported?)))
+       (format port (info (G_ "substituting ~a...")) item)
+       (newline port)))
+    (('download-started item uri _ ...)
+     (format port (info (G_ "downloading from ~a...")) uri)
+     (newline port))
+    (('download-progress item uri
+                         (= string->number size)
+                         (= string->number transferred))
+     ;; Print a progress bar, but only if there's only one on-going
+     ;; job--otherwise the output would be intermingled.
+     (when (= 1 (simultaneous-jobs status))
+       (match (find (matching-download item)
+                    (build-status-downloading status))
+         (#f #f)                                  ;shouldn't happen!
+         (download
+          ;; XXX: It would be nice to memoize the abbreviation.
+          (let ((uri (if (string-contains uri "/nar/")
+                         (nar-uri-abbreviation uri)
+                         (basename uri))))
+            (display-download-progress uri size
+                                       #:start-time
+                                       (download-start download)
+                                       #:transferred transferred))))))
+    (('substituter-succeeded item _ ...)
+     ;; If there are no jobs running, we already reported download completion
+     ;; so there's nothing left to do.
+     (unless (and (zero? (simultaneous-jobs status))
+                  (extended-build-trace-supported?))
+       (format port (success (G_ "substitution of ~a complete")) item)
+       (newline port)))
+    (('substituter-failed item _ ...)
+     (format port (failure (G_ "substitution of ~a failed")) item)
+     (newline port))
+    (('hash-mismatch item algo expected actual _ ...)
+     ;; TRANSLATORS: The final string looks like "sha256 hash mismatch for
+     ;; /gnu/store/…-sth:", where "sha256" is the hash algorithm.
+     (format port (failure (G_ "~a hash mismatch for ~a:")) algo item)
+     (newline port)
+     (format port (info (G_ "\
+  expected hash: ~a
+  actual hash:   ~a~%"))
+             expected actual))
+    (('build-log line)
+     ;; TODO: Better distinguish daemon messages and build log lines.
+     (cond ((string-prefix? "substitute: " line)
+            ;; The daemon prefixes early messages coming with 'guix
+            ;; substitute' with "substitute:".  These are useful ("updating
+            ;; substitutes from URL"), so let them through.
+            (format port line)
+            (force-output port))
+           ((string-prefix? "waiting for locks" line)
+            ;; This is when a derivation is already being built and we're just
+            ;; waiting for the build to complete.
+            (display (info (string-trim-right line)) port)
+            (newline))
+           (else
+            (print-log-line line))))
+    (_
+     event)))
+
+(define* (print-build-event/quiet event old-status status
+                                  #:optional
+                                  (port (current-error-port))
+                                  #:key
+                                  (colorize? (color-output? port)))
+  (print-build-event event old-status status port
+                     #:colorize? colorize?
+                     #:print-log? #f))
+
+(define* (build-status-updater #:optional (on-change (const #t)))
+  "Return a procedure that can be passed to 'build-event-output-port'.  That
+procedure computes the new build status upon each event and calls ON-CHANGE:
+
+  (ON-CHANGE event status new-status)
+
+ON-CHANGE can display the build status, build events, etc."
+  (lambda (event status)
+    (let ((new (compute-status event status)))
+      (on-change event status new)
+      new)))
+
+
+;;;
+;;; Build port.
+;;;
+
+(define %newline
+  (char-set #\return #\newline))
+
+(define* (build-event-output-port proc #:optional (seed (build-status)))
+  "Return an output port for use as 'current-build-output-port' that calls
+PROC with its current state value, initialized with SEED, on every build
+event.  Build events passed to PROC are tuples corresponding to the \"build
+traces\" produced by the daemon:
+
+  (build-started \"/gnu/store/...-foo.drv\" ...)
+  (substituter-started \"/gnu/store/...-foo\" ...)
+
+and so on.
+
+The second return value is a thunk to retrieve the current state."
+  (define %fragments
+    ;; Line fragments received so far.
+    '())
+
+  (define %state
+    ;; Current state for PROC.
+    seed)
+
+  (define (process-line line)
+    (if (string-prefix? "@ " line)
+        (match (string-tokenize (string-drop line 2))
+          (((= string->symbol event-name) args ...)
+           (set! %state
+             (proc (cons event-name args)
+                   %state))))
+        (set! %state (proc (list 'build-log line)
+                           %state))))
+
+  (define (bytevector-range bv offset count)
+    (let ((ptr (bytevector->pointer bv offset)))
+      (pointer->bytevector ptr count)))
+
+  (define (write! bv offset count)
+    (let loop ((str (utf8->string (bytevector-range bv offset count))))
+      (match (string-index str %newline)
+        ((? integer? cr)
+         (let ((tail (string-take str (+ 1 cr))))
+           (process-line (string-concatenate-reverse
+                          (cons tail %fragments)))
+           (set! %fragments '())
+           (loop (string-drop str (+ 1 cr)))))
+        (#f
+         (unless (string-null? str)
+           (set! %fragments (cons str %fragments)))
+         count))))
+
+  (define port
+    (make-custom-binary-output-port "filtering-input-port"
+                                    write!
+                                    #f #f
+                                    #f))
+
+  ;; The build port actually receives Unicode strings.
+  (set-port-encoding! port "UTF-8")
+  (setvbuf port (cond-expand (guile-2.2 'line) (else _IOLBF)))
+
+  (values port (lambda () %state)))
+
+(define (call-with-status-report on-event thunk)
+  (parameterize ((current-terminal-columns (terminal-columns))
+                 (current-build-output-port
+                  (build-event-output-port (build-status-updater on-event))))
+    (thunk)))
+
+(define-syntax-rule (with-status-report on-event exp ...)
+  "Set up build status reporting to the user using the ON-EVENT procedure;
+evaluate EXP... in that context."
+  (call-with-status-report on-event (lambda () exp ...)))
diff --git a/guix/store.scm b/guix/store.scm
index f88cdefe87..8b35fc8d7a 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -50,9 +50,11 @@
             %default-substitute-urls
 
             nix-server?
+            nix-server-version
             nix-server-major-version
             nix-server-minor-version
             nix-server-socket
+            current-store-protocol-version        ;for internal use
 
             &nix-error nix-error?
             &nix-connection-error nix-connection-error?
@@ -150,9 +152,10 @@
             store-path-package-name
             store-path-hash-part
             direct-store-path
+            derivation-log-file
             log-file))
 
-(define %protocol-version #x161)
+(define %protocol-version #x162)
 
 (define %worker-magic-1 #x6e697863)               ; "nixc"
 (define %worker-magic-2 #x6478696f)               ; "dxio"
@@ -161,6 +164,8 @@
   (logand magic #xff00))
 (define (protocol-minor magic)
   (logand magic #x00ff))
+(define (protocol-version major minor)
+  (logior major minor))
 
 (define-syntax define-enumerate-type
   (syntax-rules ()
@@ -540,6 +545,11 @@ connection.  Use with care."
                       (make-hash-table 100)
                       (make-hash-table 100))))
 
+(define (nix-server-version store)
+  "Return the protocol version of STORE as an integer."
+  (protocol-version (nix-server-major-version store)
+                    (nix-server-minor-version store)))
+
 (define (write-buffered-output server)
   "Flush SERVER's output port."
   (force-output (nix-server-output-port server))
@@ -556,10 +566,20 @@ automatically close the store when the dynamic extent of EXP is left."
     (dynamic-wind
       (const #f)
       (lambda ()
-        exp ...)
+        (parameterize ((current-store-protocol-version
+                        (nix-server-version store)))
+         exp) ...)
       (lambda ()
         (false-if-exception (close-connection store))))))
 
+(define current-store-protocol-version
+  ;; Protocol version of the store currently used.  XXX: This is a hack to
+  ;; communicate the protocol version to the build output port.  It's a hack
+  ;; because it could be inaccurrate, for instance if there's code that
+  ;; manipulates several store connections at once; it works well for the
+  ;; purposes of (guix status) though.
+  (make-parameter #f))
+
 (define current-build-output-port
   ;; The port where build output is sent.
   (make-parameter (current-error-port)))
@@ -682,6 +702,13 @@ encoding conversion errors."
                             (build-verbosity 0)
                             (log-type 0)
                             (print-build-trace #t)
+
+                            ;; When true, provide machine-readable "build
+                            ;; traces" for use by (guix status).  Old clients
+                            ;; are unable to make sense, which is why it's
+                            ;; disabled by default.
+                            print-extended-build-trace?
+
                             build-cores
                             (use-substitutes? #t)
 
@@ -725,7 +752,12 @@ encoding conversion errors."
     (when (>= (nix-server-minor-version server) 10)
       (send (boolean use-substitutes?)))
     (when (>= (nix-server-minor-version server) 12)
-      (let ((pairs `(,@(if timeout
+      (let ((pairs `(;; This option is honored by 'guix substitute' et al.
+                     ,@(if print-build-trace
+                           `(("print-extended-build-trace"
+                              . ,(if print-extended-build-trace? "1" "0")))
+                           '())
+                     ,@(if timeout
                            `(("build-timeout" . ,(number->string timeout)))
                            '())
                      ,@(if max-silent-time
@@ -1064,13 +1096,15 @@ an arbitrary directory layout in the store without creating a derivation."
 outputs, and return when the worker is done building them.  Elements of THINGS
 that are not derivations can only be substituted and not built locally.
 Return #t on success."
-      (if (>= (nix-server-minor-version store) 15)
-          (build store things mode)
-          (if (= mode (build-mode normal))
-              (build/old store things)
-              (raise (condition (&nix-protocol-error
-                                 (message "unsupported build mode")
-                                 (status  1)))))))))
+      (parameterize ((current-store-protocol-version
+                      (nix-server-version store)))
+        (if (>= (nix-server-minor-version store) 15)
+            (build store things mode)
+            (if (= mode (build-mode normal))
+                (build/old store things)
+                (raise (condition (&nix-protocol-error
+                                   (message "unsupported build mode")
+                                   (status  1))))))))))
 
 (define-operation (add-temp-root (store-path path))
   "Make PATH a temporary root for the duration of the current session.
@@ -1673,21 +1707,26 @@ syntactically valid store path."
                 (and (string-every %nix-base32-charset hash)
                      hash))))))
 
+(define (derivation-log-file drv)
+  "Return the build log file for DRV, a derivation file name, or #f if it
+could not be found."
+  (let* ((base    (basename drv))
+         (log     (string-append (dirname %state-directory) ; XXX
+                                 "/log/guix/drvs/"
+                                 (string-take base 2) "/"
+                                 (string-drop base 2)))
+         (log.gz  (string-append log ".gz"))
+         (log.bz2 (string-append log ".bz2")))
+    (cond ((file-exists? log.gz) log.gz)
+          ((file-exists? log.bz2) log.bz2)
+          ((file-exists? log) log)
+          (else #f))))
+
 (define (log-file store file)
   "Return the build log file for FILE, or #f if none could be found.  FILE
 must be an absolute store file name, or a derivation file name."
   (cond ((derivation-path? file)
-         (let* ((base    (basename file))
-                (log     (string-append (dirname %state-directory) ; XXX
-                                        "/log/guix/drvs/"
-                                        (string-take base 2) "/"
-                                        (string-drop base 2)))
-                (log.gz  (string-append log ".gz"))
-                (log.bz2 (string-append log ".bz2")))
-           (cond ((file-exists? log.gz) log.gz)
-                 ((file-exists? log.bz2) log.bz2)
-                 ((file-exists? log) log)
-                 (else #f))))
+         (derivation-log-file file))
         (else
          (match (valid-derivers store file)
            ((derivers ...)
diff --git a/guix/ui.scm b/guix/ui.scm
index c55ae7e2f8..96f403acf5 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -119,7 +119,7 @@
             warning
             info
             guix-main
-            build-output-port))
+            colorize-string))
 
 ;;; Commentary:
 ;;;
@@ -1676,124 +1676,4 @@ be reset such that subsequent output will not have any colors in effect."
    str
    (color 'RESET)))
 
-(define* (build-output-port #:key
-                            (colorize? #t)
-                            verbose?
-                            (port (current-error-port)))
-  "Return a soft port that processes build output.  By default it colorizes
-phase announcements and replaces any other output with a spinner."
-  (define spun? #f)
-  (define spin!
-    (let ((steps (circular-list "\\" "|" "/" "-")))
-      (lambda ()
-        (match steps
-          ((first . rest)
-           (set! steps rest)
-           (set! spun? #t) ; remember to erase spinner
-           first)))))
-
-  (define use-color?
-    (and colorize?
-         (not (or (getenv "NO_COLOR")
-                  (getenv "INSIDE_EMACS")
-                  (not (isatty? port))))))
-
-  (define handle-string
-    (let* ((proc (if use-color?
-                     colorize-string
-                     (lambda (s . _) s)))
-           (rules `(("^(@ build-started) (.*) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Building " 'BLUE 'BOLD)
-                         (match:substring m 2) "\n")))
-                    ,(if verbose?
-                         ;; Err on the side of caution: show everything, even
-                         ;; if it might be redundant.
-                         `("^(@ build-failed)(.+)"
-                           #:transform
-                           ,(lambda (m)
-                              (string-append
-                               (proc "Build failed: " 'RED 'BOLD)
-                               (match:substring m 2))))
-                         ;; Show only that the build failed.
-                         `("^(@ build-failed)(.+) -.*"
-                           #:transform
-                           ,(lambda (m)
-                              (string-append
-                               (proc "Build failed: " 'RED 'BOLD)
-                               (match:substring m 2)
-                               "\n"))))
-                    ;; NOTE: this line contains "\n" characters.
-                    ("^(sha256 hash mismatch for output path)(.*)"
-                     RED BLACK)
-                    ("^(@ build-succeeded) (.*) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Built " 'GREEN 'BOLD)
-                         (match:substring m 2) "\n")))
-                    ("^(@ substituter-started) (.*) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Substituting " 'BLUE 'BOLD)
-                         (match:substring m 2) "\n")))
-                    ("^(@ substituter-failed) (.*) (.*) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Substituter failed: " 'RED 'BOLD)
-                         (match:substring m 2) "\n"
-                         (match:substring m 3) ": "
-                         (match:substring m 4) "\n")))
-                    ("^(@ substituter-succeeded) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Substituted " 'GREEN 'BOLD)
-                         (match:substring m 2) "\n")))
-                    ("^(starting phase )(.*)"
-                     BLUE GREEN)
-                    ("^(phase)(.*)(succeeded after)(.*)(seconds)(.*)"
-                     GREEN BLUE GREEN BLUE GREEN BLUE)
-                    ("^(phase)(.*)(failed after)(.*)(seconds)(.*)"
-                     RED BLUE RED BLUE RED BLUE))))
-      (lambda (str)
-        (let ((processed
-               (any (match-lambda
-                      ((pattern #:transform transform)
-                       (and=> (string-match pattern str)
-                              transform))
-                      ((pattern . colors)
-                       (and=> (string-match pattern str)
-                              (lambda (m)
-                                (let ((substrings
-                                       (map (cut match:substring m <>)
-                                            (iota (- (match:count m) 1) 1))))
-                                  (string-join (map proc substrings colors) ""))))))
-                    rules)))
-          (when spun?
-            (display (string #\backspace) port))
-          (if processed
-              (begin
-                (display processed port)
-                (set! spun? #f))
-              ;; Print unprocessed line, or replace with spinner
-              (display (if verbose? str (spin!)) port))))))
-  (make-soft-port
-   (vector
-    ;; procedure accepting one character for output
-    (cut write <> port)
-    ;; procedure accepting a string for output
-    handle-string
-    ;; thunk for flushing output
-    (lambda () (force-output port))
-    ;; thunk for getting one character
-    (const #t)
-    ;; thunk for closing port (not by garbage collection)
-    (lambda () (close port)))
-   "w"))
-
 ;;; ui.scm ends here
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index c7f32494d0..b2c319f00b 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2466,13 +2466,13 @@ void DerivationGoal::registerOutputs()
 
             /* Check the hash. */
             Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
-            if (h != h2)
-                throw BuildError(
-                    format("%1% hash mismatch for output path `%2%'\n"
-			   "  expected: %3%\n"
-			   "  actual:   %4%")
-                    % i->second.hashAlgo % path
-		    % printHash16or32(h) % printHash16or32(h2));
+            if (h != h2) {
+		if (settings.printBuildTrace)
+		    printMsg(lvlError, format("@ hash-mismatch %1% %2% %3% %4%")
+			     % path % i->second.hashAlgo
+			     % printHash16or32(h) % printHash16or32(h2));
+                throw BuildError(format("hash mismatch for store item '%1%'") % path);
+	    }
         }
 
         /* Get rid of all weird permissions.  This also checks that
@@ -3157,11 +3157,14 @@ void SubstitutionGoal::finished()
                 throw Error(format("unknown hash algorithm in `%1%'") % expectedHashStr);
             Hash expectedHash = parseHash16or32(hashType, string(expectedHashStr, n + 1));
             Hash actualHash = hashType == htSHA256 ? hash.first : hashPath(hashType, destPath).first;
-            if (expectedHash != actualHash)
-                throw SubstError(format("hash mismatch in downloaded path `%1%'\n"
-					"  expected: %2%\n"
-					"  actual:   %3%")
-                    % storePath % printHash(expectedHash) % printHash(actualHash));
+            if (expectedHash != actualHash) {
+		if (settings.printBuildTrace)
+		    printMsg(lvlError, format("@ hash-mismatch %1% %2% %3% %4%")
+			     % storePath % "sha256"
+			     % printHash16or32(expectedHash)
+			     % printHash16or32(actualHash));
+                throw SubstError(format("hash mismatch for substituted item `%1%'") % storePath);
+	    }
         }
 
     } catch (SubstError & e) {
diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc
index a5ebb47737..1f52511c80 100644
--- a/nix/libstore/builtins.cc
+++ b/nix/libstore/builtins.cc
@@ -1,5 +1,5 @@
 /* GNU Guix --- Functional package management for GNU
-   Copyright (C) 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+   Copyright (C) 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 
    This file is part of GNU Guix.
 
@@ -47,6 +47,9 @@ static void builtinDownload(const Derivation &drv,
        content-addressed mirrors) works correctly.  */
     setenv("NIX_STORE", settings.nixStore.c_str(), 1);
 
+    /* Tell it about options such as "print-extended-build-trace".  */
+    setenv("_NIX_OPTIONS", settings.pack().c_str(), 1);
+
     /* XXX: Hack our way to use the 'download' script from 'LIBEXECDIR/guix'
        or just 'LIBEXECDIR', depending on whether we're running uninstalled or
        not.  */
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc
index fcafac2df6..94c2e516f8 100644
--- a/nix/libstore/globals.cc
+++ b/nix/libstore/globals.cc
@@ -42,7 +42,6 @@ Settings::Settings()
     syncBeforeRegistering = false;
     useSubstitutes = true;
     useChroot = false;
-    useSshSubstituter = false;
     impersonateLinux26 = false;
     keepLog = true;
 #if HAVE_BZLIB_H
@@ -60,7 +59,6 @@ Settings::Settings()
     envKeepDerivations = false;
     lockCPU = getEnv("NIX_AFFINITY_HACK", "1") == "1";
     showTrace = false;
-    enableImportNative = false;
 }
 
 
@@ -142,11 +140,6 @@ void Settings::update()
     _get(gcKeepDerivations, "gc-keep-derivations");
     _get(autoOptimiseStore, "auto-optimise-store");
     _get(envKeepDerivations, "env-keep-derivations");
-    _get(sshSubstituterHosts, "ssh-substituter-hosts");
-    _get(useSshSubstituter, "use-ssh-substituter");
-    _get(logServers, "log-servers");
-    _get(enableImportNative, "allow-unsafe-native-code-during-evaluation");
-    _get(useCaseHack, "use-case-hack");
 
     string subs = getEnv("NIX_SUBSTITUTERS", "default");
     if (subs == "default") {
@@ -157,8 +150,6 @@ void Settings::update()
 #endif
         substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl");
         substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl");
-        if (useSshSubstituter)
-            substituters.push_back(nixLibexecDir + "/nix/substituters/download-via-ssh");
     } else
         substituters = tokenizeString<Strings>(subs, ":");
 }
diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh
index 1293625e1f..4c142e6933 100644
--- a/nix/libstore/globals.hh
+++ b/nix/libstore/globals.hh
@@ -161,12 +161,6 @@ struct Settings {
     /* Whether to build in chroot. */
     bool useChroot;
 
-    /* Set of ssh connection strings for the ssh substituter */
-    Strings sshSubstituterHosts;
-
-    /* Whether to use the ssh substituter at all */
-    bool useSshSubstituter;
-
     /* Whether to impersonate a Linux 2.6 machine on newer kernels. */
     bool impersonateLinux26;
 
@@ -212,12 +206,6 @@ struct Settings {
     /* Whether to show a stack trace if Nix evaluation fails. */
     bool showTrace;
 
-    /* A list of URL prefixes that can return Nix build logs. */
-    Strings logServers;
-
-    /* Whether the importNative primop should be enabled */
-    bool enableImportNative;
-
 private:
     SettingsMap settings, overrides;
 
diff --git a/nix/libstore/worker-protocol.hh b/nix/libstore/worker-protocol.hh
index efe9eadf23..103d60a8c2 100644
--- a/nix/libstore/worker-protocol.hh
+++ b/nix/libstore/worker-protocol.hh
@@ -6,7 +6,7 @@ namespace nix {
 #define WORKER_MAGIC_1 0x6e697863
 #define WORKER_MAGIC_2 0x6478696f
 
-#define PROTOCOL_VERSION 0x161
+#define PROTOCOL_VERSION 0x162
 #define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
 #define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
 
diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc
index 4e3d99356a..2599030454 100644
--- a/nix/libutil/archive.cc
+++ b/nix/libutil/archive.cc
@@ -21,14 +21,6 @@
 
 namespace nix {
 
-
-bool useCaseHack =
-#if __APPLE__
-    true;
-#else
-    false;
-#endif
-
 static string archiveVersion1 = "nix-archive-1";
 
 static string caseHackSuffix = "~nix~case~hack~";
@@ -85,19 +77,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter)
            the case hack applied by restorePath(). */
         std::map<string, string> unhacked;
         for (auto & i : readDirectory(path))
-            if (useCaseHack) {
-                string name(i.name);
-                size_t pos = i.name.find(caseHackSuffix);
-                if (pos != string::npos) {
-                    printMsg(lvlDebug, format("removing case hack suffix from `%1%'") % (path + "/" + i.name));
-                    name.erase(pos);
-                }
-                if (unhacked.find(name) != unhacked.end())
-                    throw Error(format("file name collision in between `%1%' and `%2%'")
-                        % (path + "/" + unhacked[name]) % (path + "/" + i.name));
-                unhacked[name] = i.name;
-            } else
-                unhacked[i.name] = i.name;
+	    unhacked[i.name] = i.name;
 
         for (auto & i : unhacked)
             if (filter(path + "/" + i.first)) {
@@ -251,15 +231,6 @@ static void parse(ParseSink & sink, Source & source, const Path & path)
                     if (name <= prevName)
                         throw Error("NAR directory is not sorted");
                     prevName = name;
-                    if (useCaseHack) {
-                        auto i = names.find(name);
-                        if (i != names.end()) {
-                            printMsg(lvlDebug, format("case collision between `%1%' and `%2%'") % i->first % name);
-                            name += caseHackSuffix;
-                            name += std::to_string(++i->second);
-                        } else
-                            names[name] = 0;
-                    }
                 } else if (s == "node") {
                     if (s.empty()) throw badArchive("entry name missing");
                     parse(sink, source, path + "/" + name);
diff --git a/nix/libutil/archive.hh b/nix/libutil/archive.hh
index c216e9768f..9b83a5f288 100644
--- a/nix/libutil/archive.hh
+++ b/nix/libutil/archive.hh
@@ -71,9 +71,4 @@ void parseDump(ParseSink & sink, Source & source);
 
 void restorePath(const Path & path, Source & source);
 
-
-// FIXME: global variables are bad m'kay.
-extern bool useCaseHack;
-
-
 }
diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in
index 2762ea078a..df2cf12de2 100644
--- a/po/guix/POTFILES.in
+++ b/po/guix/POTFILES.in
@@ -37,6 +37,7 @@ guix/scripts/container.scm
 guix/scripts/container/exec.scm
 guix/upstream.scm
 guix/ui.scm
+guix/status.scm
 guix/http-client.scm
 guix/nar.scm
 guix/channels.scm
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 380b83509a..bc83a8de8c 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -615,6 +615,8 @@
                                                 `(("graph" ,two))
                                                 #:modules
                                                 '((guix build store-copy)
+                                                  (guix progress)
+                                                  (guix records)
                                                   (guix sets)
                                                   (guix build utils))))
                          (ok? (built-derivations (list drv)))
@@ -817,6 +819,8 @@
        (two (gexp->derivation "two"
                               #~(symlink #$one #$output:chbouib)))
        (build -> (with-imported-modules '((guix build store-copy)
+                                          (guix progress)
+                                          (guix records)
                                           (guix sets)
                                           (guix build utils))
                    #~(begin
diff --git a/tests/services.scm b/tests/services.scm
index 1ad577e601..5827dee80d 100644
--- a/tests/services.scm
+++ b/tests/services.scm
@@ -207,13 +207,14 @@
     list))
 
 (test-equal "shepherd-service-upgrade: one unchanged, one upgraded, one new"
-  '(((bar))                                       ;unload
-    ((bar) (baz)))                                ;load
+  '(()                                            ;unload
+    ((foo)))                                      ;restart
   (call-with-values
       (lambda ()
-        ;; Here 'foo' is not upgraded because it is still running, whereas
-        ;; 'bar' is upgraded because it is not currently running.  'baz' is
-        ;; loaded because it's a new service.
+        ;; Here 'foo' is replaced and must be explicitly restarted later
+        ;; because it is still running, whereas 'bar' is upgraded right away
+        ;; because it is not currently running.  'baz' is loaded because it's
+        ;; a new service.
         (shepherd-service-upgrade
          (list (live-service '(foo) '() #t)
                (live-service '(bar) '() #f)
@@ -224,30 +225,31 @@
                                  (start #t))
                (shepherd-service (provision '(baz))
                                  (start #t)))))
-    (lambda (unload load)
+    (lambda (unload restart)
       (list (map live-service-provision unload)
-            (map shepherd-service-provision load)))))
+            (map shepherd-service-provision restart)))))
 
 (test-equal "shepherd-service-upgrade: service depended on is not unloaded"
   '(((baz))                                       ;unload
-    ())                                           ;load
+    ((foo)))                                      ;restart
   (call-with-values
       (lambda ()
         ;; Service 'bar' is not among the target services; yet, it must not be
-        ;; unloaded because 'foo' depends on it.
+        ;; unloaded because 'foo' depends on it.  'foo' gets replaced but it
+        ;; must be restarted manually.
         (shepherd-service-upgrade
          (list (live-service '(foo) '(bar) #t)
                (live-service '(bar) '() #t)       ;still used!
                (live-service '(baz) '() #t))
          (list (shepherd-service (provision '(foo))
                                  (start #t)))))
-    (lambda (unload load)
+    (lambda (unload restart)
       (list (map live-service-provision unload)
-            (map shepherd-service-provision load)))))
+            (map shepherd-service-provision restart)))))
 
 (test-equal "shepherd-service-upgrade: obsolete services that depend on each other"
   '(((foo) (bar) (baz))                           ;unload
-    ((qux)))                                      ;load
+    ())                                           ;restart
   (call-with-values
       (lambda ()
         ;; 'foo', 'bar', and 'baz' depend on each other, but all of them are
@@ -258,9 +260,9 @@
                (live-service '(baz) '() #t))      ;obsolete
          (list (shepherd-service (provision '(qux))
                                  (start #t)))))
-    (lambda (unload load)
+    (lambda (unload restart)
       (list (map live-service-provision unload)
-            (map shepherd-service-provision load)))))
+            (map shepherd-service-provision restart)))))
 
 (test-eq "lookup-service-types"
   system-service-type
diff --git a/tests/status.scm b/tests/status.scm
new file mode 100644
index 0000000000..04dedb702c
--- /dev/null
+++ b/tests/status.scm
@@ -0,0 +1,115 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (test-status)
+  #:use-module (guix status)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-64))
+
+(test-begin "status")
+
+(test-equal "compute-status, no-op"
+  (build-status)
+  (let-values (((port get-status)
+                (build-event-output-port compute-status)))
+    (display "foo\nbar\n\baz\n" port)
+    (get-status)))
+
+(test-equal "compute-status, builds + substitutes"
+  (list (build-status
+         (building '("foo.drv"))
+         (downloading (list (download "bar" "http://example.org/bar"
+                                      #:size 500
+                                      #:start 'now))))
+        (build-status
+         (building '("foo.drv"))
+         (downloading (list (download "bar" "http://example.org/bar"
+                                      #:size 500
+                                      #:transferred 42
+                                      #:start 'now))))
+        (build-status
+         (builds-completed '("foo.drv"))
+         (downloads-completed (list (download "bar" "http://example.org/bar"
+                                              #:size 500
+                                              #:transferred 500
+                                              #:start 'now
+                                              #:end 'now)))))
+  (let-values (((port get-status)
+                (build-event-output-port (lambda (event status)
+                                           (compute-status event status
+                                                           #:current-time
+                                                           (const 'now))))))
+    (display "@ build-started foo.drv\n" port)
+    (display "@ substituter-started bar\n" port)
+    (display "@ download-started bar http://example.org/bar 500\n" port)
+    (display "various\nthings\nget\nwritten\n" port)
+    (let ((first (get-status)))
+      (display "@ download-progress bar http://example.org/bar 500 42\n"
+               port)
+      (let ((second (get-status)))
+        (display "@ download-progress bar http://example.org/bar 500 84\n"
+                 port)
+        (display "@ build-succeeded foo.drv\n" port)
+        (display "@ download-succeeded bar http://example.org/bar 500\n" port)
+        (display "Almost done!\n" port)
+        (display "@ substituter-succeeded bar\n" port)
+        (list first second (get-status))))))
+
+(test-equal "compute-status, missing events"
+  (list (build-status
+         (building '("foo.drv"))
+         (downloading (list (download "baz" "http://example.org/baz"
+                                      #:size 500
+                                      #:transferred 42
+                                      #:start 'now)
+                            (download "bar" "http://example.org/bar"
+                                      #:size 999
+                                      #:transferred 0
+                                      #:start 'now))))
+        (build-status
+         (builds-completed '("foo.drv"))
+         (downloads-completed (list (download "baz" "http://example.org/baz"
+                                              #:size 500
+                                              #:transferred 500
+                                              #:start 'now
+                                              #:end 'now)
+                                    (download "bar" "http://example.org/bar"
+                                              #:size 999
+                                              #:transferred 999
+                                              #:start 'now
+                                              #:end 'now)))))
+  ;; Below we omit 'substituter-started' events and the like.
+  (let-values (((port get-status)
+                (build-event-output-port (lambda (event status)
+                                           (compute-status event status
+                                                           #:current-time
+                                                           (const 'now))))))
+    (display "@ build-started foo.drv\n" port)
+    (display "@ download-started bar http://example.org/bar 999\n" port)
+    (display "various\nthings\nget\nwritten\n" port)
+    (display "@ download-progress baz http://example.org/baz 500 42\n"
+             port)
+    (let ((first (get-status)))
+      (display "@ build-succeeded foo.drv\n" port)
+      (display "@ download-succeeded bar http://example.org/bar 999\n" port)
+      (display "Almost done!\n" port)
+      (display "@ substituter-succeeded baz\n" port)
+      (list first (get-status)))))
+
+(test-end "status")