summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--TODO12
-rw-r--r--doc/emacs.texi6
-rw-r--r--doc/guix.texi54
-rw-r--r--gnu/build/activation.scm15
-rw-r--r--gnu/build/install.scm6
-rw-r--r--gnu/local.mk15
-rw-r--r--gnu/packages/admin.scm2
-rw-r--r--gnu/packages/apl.scm4
-rw-r--r--gnu/packages/aspell.scm8
-rw-r--r--gnu/packages/astronomy.scm106
-rw-r--r--gnu/packages/bioinformatics.scm38
-rw-r--r--gnu/packages/bittorrent.scm4
-rw-r--r--gnu/packages/calendar.scm33
-rw-r--r--gnu/packages/crypto.scm40
-rw-r--r--gnu/packages/cups.scm4
-rw-r--r--gnu/packages/display-managers.scm (renamed from gnu/packages/slim.scm)2
-rw-r--r--gnu/packages/emacs.scm73
-rw-r--r--gnu/packages/entr.scm4
-rw-r--r--gnu/packages/freedesktop.scm60
-rw-r--r--gnu/packages/games.scm47
-rw-r--r--gnu/packages/gl.scm3
-rw-r--r--gnu/packages/gnunet.scm6
-rw-r--r--gnu/packages/grub.scm2
-rw-r--r--gnu/packages/image.scm18
-rw-r--r--gnu/packages/imagemagick.scm4
-rw-r--r--gnu/packages/java.scm24
-rw-r--r--gnu/packages/kde-frameworks.scm1304
-rw-r--r--gnu/packages/libidn.scm14
-rw-r--r--gnu/packages/linux.scm90
-rw-r--r--gnu/packages/lua.scm168
-rw-r--r--gnu/packages/messaging.scm78
-rw-r--r--gnu/packages/networking.scm2
-rw-r--r--gnu/packages/onc-rpc.scm50
-rw-r--r--gnu/packages/openstack.scm29
-rw-r--r--gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch59
-rw-r--r--gnu/packages/patches/fossil-test-fixes.patch189
-rw-r--r--gnu/packages/patches/icedtea-remove-overrides.patch291
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-3623.patch30
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-3945.patch94
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-3990.patch31
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-3991.patch123
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-5314.patch45
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-5321.patch25
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-5323.patch88
-rw-r--r--gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch15
-rw-r--r--gnu/packages/python.scm787
-rw-r--r--gnu/packages/qt.scm28
-rw-r--r--gnu/packages/ruby.scm15
-rw-r--r--gnu/packages/smalltalk.scm87
-rw-r--r--gnu/packages/terminals.scm16
-rw-r--r--gnu/packages/u-boot.scm139
-rw-r--r--gnu/packages/version-control.scm118
-rw-r--r--gnu/packages/video.scm8
-rw-r--r--gnu/packages/xdisorg.scm49
-rw-r--r--gnu/packages/xorg.scm19
-rw-r--r--gnu/services/desktop.scm10
-rw-r--r--gnu/services/herd.scm37
-rw-r--r--gnu/services/shepherd.scm94
-rw-r--r--gnu/services/xorg.scm2
-rw-r--r--gnu/system/file-systems.scm1
-rw-r--r--gnu/system/shadow.scm4
-rw-r--r--gnu/tests/base.scm48
-rw-r--r--guix/build/ant-build-system.scm2
-rw-r--r--guix/build/qt-utils.scm40
-rw-r--r--guix/build/ruby-build-system.scm57
-rw-r--r--guix/import/cpan.scm4
-rw-r--r--guix/import/hackage.scm7
-rw-r--r--guix/import/utils.scm26
-rw-r--r--guix/packages.scm30
-rw-r--r--guix/scripts/archive.scm2
-rw-r--r--guix/scripts/build.scm32
-rw-r--r--guix/scripts/environment.scm2
-rw-r--r--guix/scripts/lint.scm13
-rw-r--r--guix/scripts/package.scm3
-rw-r--r--guix/scripts/system.scm43
-rw-r--r--tests/cpan.scm4
-rw-r--r--tests/gem.scm2
-rw-r--r--tests/guix-environment-container.sh2
-rw-r--r--tests/hackage.scm2
-rw-r--r--tests/lint.scm16
-rw-r--r--tests/packages.scm25
-rw-r--r--tests/pypi.scm4
-rw-r--r--tests/services.scm79
-rw-r--r--tests/system.scm2
85 files changed, 4044 insertions, 1131 deletions
diff --git a/Makefile.am b/Makefile.am
index 8bae85e144..165dfe9727 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -107,6 +107,7 @@ MODULES =					\
   guix/build/emacs-utils.scm			\
   guix/build/graft.scm				\
   guix/build/bournish.scm			\
+  guix/build/qt-utils.scm			\
   guix/search-paths.scm				\
   guix/packages.scm				\
   guix/import/utils.scm				\
diff --git a/TODO b/TODO
index b7c8ca4313..3a8a77b145 100644
--- a/TODO
+++ b/TODO
@@ -9,13 +9,6 @@ Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
   are permitted in any medium without royalty provided the copyright
   notice and this notice are preserved.
 
-* Add `guix publish' to publish the store using Guile's web server
-
-Generate narinfos and nars on the fly, upon HTTP GET requests.
-Ideally, extend .nix-cache-info to include the server's public key, and also
-reply to requests for .narinfo.sig.
-Optionally, use Guile-Avahi to publish the service.
-
 * MAYBE Add a substituter that uses the GNUnet DHT or [[http://libswift.org][libswift]]
 
 Would be neat if binaries could be pushed to and pulled from the GNUnet DHT or
@@ -74,11 +67,6 @@ per-package priorities, etc.
 Tests that need to download stuff or otherwise take a long time would only be
 run when that is defined.
 
-* add "guix challenge"
-
-Would download a substitute, and compare its contents against a (hopefully
-locally-built) copy.
-
 * guix build utils
 ** MAYBE Change ‘ld-wrapper’ to add RPATH for libs passed by file name
 
diff --git a/doc/emacs.texi b/doc/emacs.texi
index d124eca3cb..c7a8881ef5 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -225,7 +225,7 @@ guix pull}) from Emacs using:
 With @kbd{C-u}, make it verbose.
 @end table
 
-Once @command{guix pull} has succeeded, the Guix REPL is restared.  This
+Once @command{guix pull} has succeeded, the Guix REPL is restarted.  This
 allows you to keep using the Emacs interface with the updated Guix.
 
 
@@ -266,7 +266,7 @@ Describe current mode to see all available bindings.
 @end table
 
 @emph{Hint:} If you need several ``list'' or ``info'' buffers, you can
-simlpy @kbd{M-x clone-buffer} them, and each buffer will have its own
+simply @kbd{M-x clone-buffer} them, and each buffer will have its own
 history.
 
 @emph{Warning:} Name/version pairs cannot be used to identify packages
@@ -310,7 +310,7 @@ Mark the current package for upgrading.
 @item ^
 Mark all obsolete packages for upgrading.
 @item e
-Edit the definition of the curent package (go to its location).  This is
+Edit the definition of the current package (go to its location).  This is
 similar to @command{guix edit} command (@pxref{Invoking guix edit}), but
 for opening a package recipe in the current Emacs instance.
 @item x
diff --git a/doc/guix.texi b/doc/guix.texi
index 533023854b..d6c041862d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1718,9 +1718,9 @@ version: 3.3.5
 You may also specify the full name of a package to only get details about a
 specific version of it:
 @example
-$ guix package --show=python-3.3.5 | recsel -p name,version
+$ guix package --show=python@@3.4 | recsel -p name,version
 name: python
-version: 3.3.5
+version: 3.4.3
 @end example
 
 
@@ -2574,6 +2574,45 @@ and operating system, such as @code{"mips64el-linux-gnu"}
 Configure and Build System}).
 @end deffn
 
+@cindex package transformations
+@cindex input rewriting
+@cindex dependency tree rewriting
+Packages can be manipulated in arbitrary ways.  An example of a useful
+transformation is @dfn{input rewriting}, whereby the dependency tree of
+a package is rewritten by replacing specific inputs by others:
+
+@deffn {Scheme Procedure} package-input-rewriting @var{replacements} @
+           [@var{rewrite-name}]
+Return a procedure that, when passed a package, replaces its direct and
+indirect dependencies (but not its implicit inputs) according to
+@var{replacements}.  @var{replacements} is a list of package pairs; the
+first element of each pair is the package to replace, and the second one
+is the replacement.
+
+Optionally, @var{rewrite-name} is a one-argument procedure that takes
+the name of a package and returns its new name after rewrite.
+@end deffn
+
+@noindent
+Consider this example:
+
+@example
+(define libressl-instead-of-openssl
+  ;; This is a procedure to replace OPENSSL by LIBRESSL,
+  ;; recursively.
+  (package-input-rewriting `((,openssl . ,libressl))))
+
+(define git-with-libressl
+  (libressl-instead-of-openssl git))
+@end example
+
+@noindent
+Here we first define a rewriting procedure that replaces @var{openssl}
+with @var{libressl}.  Then we use it to define a @dfn{variant} of the
+@var{git} package that uses @var{libressl} instead of @var{openssl}.
+This is exactly what the @option{--with-input} command-line option does
+(@pxref{Package Transformation Options, @option{--with-input}}).
+
 @menu
 * package Reference ::          The package data type.
 * origin Reference::            The origin data type.
@@ -4362,7 +4401,8 @@ This is a recursive, deep replacement.  So in this example, both
 @code{guix} and its dependency @code{guile-json} (which also depends on
 @code{guile}) get rebuilt against @code{guile-next}.
 
-However, implicit inputs are left unchanged.
+This is implemented using the @code{package-input-rewriting} Scheme
+procedure (@pxref{Defining Packages, @code{package-input-rewriting}}).
 @end table
 
 @node Additional Build Options
@@ -7223,6 +7263,10 @@ A comment about the account, such as the account owner's full name.
 @item @code{home-directory}
 This is the name of the home directory for the account.
 
+@item @code{create-home-directory?} (default: @code{#t})
+Indicates whether the home directory of this account should be created
+if it does not exist yet.
+
 @item @code{shell} (default: Bash)
 This is a G-expression denoting the file name of a program to be used as
 the shell (@pxref{G-Expressions}).
@@ -7948,7 +7992,7 @@ configure networking."
 @end deffn
 
 @deffn {Scheme Procedure} ntp-service [#:ntp @var{ntp}] @
-  [#:name-service @var{%ntp-servers}]
+  [#:servers @var{%ntp-servers}]
 Return a service that runs the daemon from @var{ntp}, the
 @uref{http://www.ntp.org, Network Time Protocol package}.  The daemon will
 keep the system clock synchronized with that of @var{servers}.
@@ -8280,7 +8324,7 @@ profile, and extends polkit with the actions from
 
 @deffn {Scheme Procedure} xfce-desktop-service
 Return a service that adds the @code{xfce} package to the system profile,
-and extends polkit with the abilit for @code{thunar} to manipulate the
+and extends polkit with the ability for @code{thunar} to manipulate the
 file system as root from within a user session, after the user has
 authenticated with the administrator's password.
 @end deffn
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 6666cb4856..10aa58d85c 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -110,7 +110,8 @@ owner-writable in HOME."
               files)))
 
 (define* (add-user name group
-                   #:key uid comment home shell password system?
+                   #:key uid comment home create-home?
+                   shell password system?
                    (supplementary-groups '())
                    (log-port (current-error-port)))
   "Create an account for user NAME part of GROUP, with the specified
@@ -139,7 +140,7 @@ properties.  Return #t on success."
                           `("-G" ,(string-join supplementary-groups ","))
                           '())
                     ,@(if comment `("-c" ,comment) '())
-                    ,@(if home
+                    ,@(if (and home create-home?)
                           (if (file-exists? home)
                               `("-d" ,home)     ; avoid warning from 'useradd'
                               `("-d" ,home "--create-home"))
@@ -158,7 +159,8 @@ properties.  Return #t on success."
                #t)))))
 
 (define* (modify-user name group
-                      #:key uid comment home shell password system?
+                      #:key uid comment home create-home?
+                      shell password system?
                       (supplementary-groups '())
                       (log-port (current-error-port)))
   "Modify user account NAME to have all the given settings."
@@ -186,7 +188,8 @@ logged in."
   (zero? (system* "groupdel" name)))
 
 (define* (ensure-user name group
-                      #:key uid comment home shell password system?
+                      #:key uid comment home create-home?
+                      shell password system?
                       (supplementary-groups '())
                       (log-port (current-error-port))
                       #:rest rest)
@@ -207,7 +210,8 @@ numeric gid or #f."
 
   (define activate-user
     (match-lambda
-     ((name uid group supplementary-groups comment home shell password system?)
+     ((name uid group supplementary-groups comment home create-home?
+       shell password system?)
       (let ((profile-dir (string-append "/var/guix/profiles/per-user/"
                                         name)))
         (ensure-user name group
@@ -216,6 +220,7 @@ numeric gid or #f."
                      #:supplementary-groups supplementary-groups
                      #:comment comment
                      #:home home
+                     #:create-home? create-home?
                      #:shell shell
                      #:password password)
 
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index aebf38c066..7431a09021 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,6 +118,10 @@ STORE."
     ("/var/guix/gcroots/booted-system" -> "/run/booted-system")
     ("/var/guix/gcroots/current-system" -> "/run/current-system")
 
+    ;; XXX: 'guix-register' creates this symlink with a wrong target, so
+    ;; create it upfront to be sure.
+    ("/var/guix/gcroots/profiles" -> "/var/guix/profiles")
+
     (directory "/bin")
     (directory "/tmp" 0 0 #o1777)                 ; sticky bit
     (directory "/var/tmp" 0 0 #o1777)
diff --git a/gnu/local.mk b/gnu/local.mk
index a41ade7c4f..2b5e5419ad 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -42,6 +42,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/apr.scm				\
   %D%/packages/aspell.scm			\
   %D%/packages/assembly.scm			\
+  %D%/packages/astronomy.scm			\
   %D%/packages/attr.scm				\
   %D%/packages/audacity.scm			\
   %D%/packages/audio.scm			\
@@ -95,6 +96,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/dictionaries.scm			\
   %D%/packages/dillo.scm			\
   %D%/packages/disk.scm				\
+  %D%/packages/display-managers.scm		\
   %D%/packages/djvu.scm				\
   %D%/packages/dns.scm				\
   %D%/packages/docbook.scm			\
@@ -319,7 +321,6 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/skarnet.scm			\
   %D%/packages/skribilo.scm			\
   %D%/packages/slang.scm			\
-  %D%/packages/slim.scm				\
   %D%/packages/smalltalk.scm			\
   %D%/packages/speech.scm			\
   %D%/packages/spice.scm			\
@@ -347,6 +348,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/unrtf.scm			\
   %D%/packages/upnp.scm				\
   %D%/packages/uucp.scm				\
+  %D%/packages/u-boot.scm			\
   %D%/packages/valgrind.scm			\
   %D%/packages/version-control.scm		\
   %D%/packages/video.scm			\
@@ -481,6 +483,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/doc++-include-directives.patch		\
   %D%/packages/patches/doc++-segfault-fix.patch			\
   %D%/packages/patches/doxygen-test.patch			\
+  %D%/packages/patches/dtc-add-missing-symbols-to-lds.patch     \
   %D%/packages/patches/duplicity-piped-password.patch		\
   %D%/packages/patches/duplicity-test_selection-tmp.patch	\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
@@ -510,7 +513,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/fltk-xfont-on-demand.patch		\
   %D%/packages/patches/fontconfig-CVE-2016-5384.patch		\
   %D%/packages/patches/fontforge-svg-modtime.patch		\
-  %D%/packages/patches/fossil-test-fixes.patch			\
   %D%/packages/patches/freeimage-CVE-2015-0852.patch		\
   %D%/packages/patches/gawk-fts-test.patch			\
   %D%/packages/patches/gawk-shell.patch				\
@@ -578,7 +580,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/icecat-CVE-2016-2824.patch		\
   %D%/packages/patches/icecat-CVE-2016-2828.patch		\
   %D%/packages/patches/icecat-CVE-2016-2831.patch		\
-  %D%/packages/patches/icedtea-remove-overrides.patch		\
   %D%/packages/patches/icu4c-CVE-2014-6585.patch		\
   %D%/packages/patches/icu4c-CVE-2015-1270.patch		\
   %D%/packages/patches/icu4c-CVE-2015-4760.patch		\
@@ -628,6 +629,13 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch		\
   %D%/packages/patches/libtiff-CVE-2015-8665+CVE-2015-8683.patch \
+  %D%/packages/patches/libtiff-CVE-2016-3623.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-3945.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-3990.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-3991.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-5314.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-5321.patch		\
+  %D%/packages/patches/libtiff-CVE-2016-5323.patch		\
   %D%/packages/patches/libtiff-oob-accesses-in-decode.patch	\
   %D%/packages/patches/libtiff-oob-write-in-nextdecode.patch	\
   %D%/packages/patches/libtool-skip-tests2.patch		\
@@ -859,7 +867,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/xf86-video-intel-glibc-2.20.patch	\
   %D%/packages/patches/xf86-video-mach64-glibc-2.20.patch	\
   %D%/packages/patches/xf86-video-nv-remove-mibstore.patch	\
-  %D%/packages/patches/xf86-video-openchrome-glibc-2.20.patch	\
   %D%/packages/patches/xf86-video-tga-remove-mibstore.patch	\
   %D%/packages/patches/xfce4-panel-plugins.patch		\
   %D%/packages/patches/xfce4-session-fix-xflock4.patch		\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 05c2895792..474c0d7556 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1415,7 +1415,7 @@ limits.")
                   (replace 'check
                     (lambda _
                       (zero?
-                       (system* "python" "tests/autojump_utils_test.py"))))
+                       (system* "python" "tests/unit/autojump_utils_test.py"))))
                   (replace 'install
                     ;; The install.py script doesn't allow system installation
                     ;; into an arbitrary prefix, so do our own install.
diff --git a/gnu/packages/apl.scm b/gnu/packages/apl.scm
index 7573870a4c..5b55c9cef3 100644
--- a/gnu/packages/apl.scm
+++ b/gnu/packages/apl.scm
@@ -30,14 +30,14 @@
 (define-public apl
   (package
     (name "apl")
-    (version "1.5")
+    (version "1.6")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "mirror://gnu/apl/apl-" version ".tar.gz"))
       (sha256
        (base32
-        "0h4diq3wfbdwxp5nm0z4b0p1zq13lwip0y7v28r9v0mbbk8xsfh1"))))
+        "057zwzvvgcrrwsl52a27w86hgy31jqq6avqq629xj7yq90qah3ay"))))
     (build-system gnu-build-system)
     (home-page "http://www.gnu.org/software/apl/")
     (inputs
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 117cd33081..b7024124bd 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright ©2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -97,6 +98,13 @@ dictionaries, including personal ones.")
     (home-page "http://aspell.net/")))
 
 
+(define-public aspell-dict-de
+  (aspell-dictionary "de" "German"
+                     #:version "20030222-1"
+                     #:sha256
+                     (base32
+                      "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
+
 (define-public aspell-dict-en
   (aspell-dictionary "en" "English"
                      #:version "2016.01.19-0"
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
new file mode 100644
index 0000000000..eaf1598096
--- /dev/null
+++ b/gnu/packages/astronomy.scm
@@ -0,0 +1,106 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 John Darrington <jmd@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 (gnu packages astronomy)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix download)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages maths)
+  #:use-module (guix build-system gnu))
+
+(define-public cfitsio
+  (package
+    (name "cfitsio")
+    (version "3390")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/" name version
+             ".tar.gz"))
+       (sha256
+        (base32 "02gllydm63irwbqqisa3mrskw1fphm5rlplglz3mq9whi3rxilv2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda _
+             (substitute* "Makefile.in" (("/bin/") "")))))))
+    (home-page "http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
+    (synopsis "Library for reading and writing FITS files")
+    (description "CFITSIO provides simple high-level routines for reading and
+writing FITS (Flexible Image Transport System) files that insulate the
+programmer from the internal complexities of the FITS format. CFITSIO also
+provides many advanced features for manipulating and filtering the information
+in FITS files.")
+    (license (license:non-copyleft "file://License.txt"
+                          "See License.txt in the distribution."))))
+
+(define-public wcslib
+  (package
+    (name "wcslib")
+    (version "5.15")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version ".tar.bz2"))
+       (sha256
+        (base32 "1s2nig327g4bimd9xshlk11ww09a7mrjmsbpdcd8smsmn2kl1glb"))))
+    (inputs
+     `(("cfitsio" ,cfitsio)))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'patch-/bin/sh
+                    (lambda _
+                      (substitute* "makedefs.in"
+                        (("/bin/sh") "sh")))))))
+    (home-page "http://www.atnf.csiro.au/people/mcalabre/WCS")
+    (synopsis "Library which implements the FITS WCS standard")
+    (description "The FITS \"World Coordinate System\" (WCS) standard defines
+keywords and usage that provide for the description of astronomical coordinate
+systems in a FITS image header.")
+    (license license:lgpl3+)))
+
+(define-public gnuastro
+  (package
+    (name "gnuastro")
+    (version "0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "105s007kw8l3jwwhvh8k9lgbpfbf7sqh2wpxmvpv3qdr6nh9lnjg"))))
+    (inputs
+     `(("cfitsio" ,cfitsio)
+       ("gsl" ,gsl)
+       ("libjpeg" ,libjpeg-8)
+       ("wcslib" ,wcslib)))
+    (build-system gnu-build-system)
+    (home-page "http://www.gnu.org/software/gnuastro")
+    (synopsis "Astronomical data manipulation programs")
+    (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
+programs for the manipulation and analysis of astronomical data.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 2bd71c858b..2d76a81339 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -93,7 +93,7 @@
 (define-public aragorn
   (package
     (name "aragorn")
-    (version "1.2.36")
+    (version "1.2.37")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -101,7 +101,7 @@
                     version ".tgz"))
               (sha256
                (base32
-                "1dg7jlz1qpqy88igjxd6ncs11ccsirb36qv1z01a0np4i4jh61mb"))))
+                "1c7zxk0h8wsjbix82fmmfyywcq6zn3q9h5y67kcl5y3qal2bv2xr"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; there are no tests
@@ -1903,7 +1903,7 @@ identify enrichments with functional annotations of the genome.")
 (define-public diamond
   (package
     (name "diamond")
-    (version "0.8.18")
+    (version "0.8.20")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1912,7 +1912,7 @@ identify enrichments with functional annotations of the genome.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1r8klhbzn5cfzg9g69dd0sk4c0bd8cg1g5id8blsqi273bymm4jl"))))
+                "16bhwpxqzq2nfkh9522rwcc1p97ygszjmhphz69x2jk501jf9wkg"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; no "check" target
@@ -4692,14 +4692,14 @@ sequences.")
 (define-public subread
   (package
     (name "subread")
-    (version "1.4.6-p2")
+    (version "1.5.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/subread/subread-"
                                   version "/subread-" version "-source.tar.gz"))
               (sha256
                (base32
-                "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3"))))
+                "0gn5zhbvllks0mmdg3qlmsbg91p2mpdc2wixwfqpi85yzfrh8hcy"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;no "check" target
@@ -4835,6 +4835,32 @@ data in the form of VCF files.")
     ;; at https://vcftools.github.io/license.html
     (license license:lgpl3)))
 
+(define-public infernal
+  (package
+    (name "infernal")
+    (version "1.1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://eddylab.org/software/infernal/"
+                                  "infernal-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0sr2hiz3qxfwqpz3whxr6n82p3x27336v3f34iqznp10hks2935c"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("perl" ,perl))) ; for tests
+    (home-page "http://eddylab.org/infernal/")
+    (synopsis "Inference of RNA alignments")
+    (description "Infernal (\"INFERence of RNA ALignment\") is a tool for
+searching DNA sequence databases for RNA structure and sequence similarities.
+It is an implementation of a special case of profile stochastic context-free
+grammars called @dfn{covariance models} (CMs).  A CM is like a sequence
+profile, but it scores a combination of sequence consensus and RNA secondary
+structure consensus, so in many cases, it is more capable of identifying RNA
+homologs that conserve their secondary structure more than their primary
+sequence.")
+    (license license:bsd-3)))
+
 (define-public r-vegan
   (package
     (name "r-vegan")
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 51248508ff..bed9a014b2 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -207,7 +207,7 @@ interface, for the Transmission BitTorrent daemon.")
 (define-public aria2
   (package
     (name "aria2")
-    (version "1.26.0")
+    (version "1.26.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
@@ -215,7 +215,7 @@ interface, for the Transmission BitTorrent daemon.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1388qswa0in7kb1dx7qb10wp60p58zvvpys7jwim3clsbqvz6a68"))))
+                "00d8r631w4g05jf202arhn0c3jsszb2m0apfw471qpmgajblxrpl"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--enable-libaria2"
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 3b5aba72c8..7f3d05d08e 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -80,42 +81,16 @@ data units.")
 (define-public khal
   (package
     (name "khal")
-    (version "0.7.0")
+    (version "0.8.3")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "khal" version))
              (sha256
               (base32
-               "00llxj7cv31mjsx0j6zxmyi9s1q20yvfkn025xcy8cv1ylfwic66"))
-             (modules '((guix build utils)))
-             ;; Patch broken path in 'doc' Makefile.
-             ;; Patch sent upstream: https://github.com/geier/khal/pull/307
-             (snippet
-               '(substitute* "doc/source/Makefile"
-                 (("../../../khal/khal/settings/khal.spec")
-                  "../../khal/settings/khal.spec" )))))
+               "1qryqs5d8jsl7j22pjjfkfdi4m8m3nn3n44b890pq85xkw599ihy"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
-        (add-after 'unpack 'disable-tests
-          (lambda _
-            ;; Bug reported for test_only_update_old_event:
-            ;; https://github.com/geier/khal/issues/309
-            (substitute* "tests/khalendar_test.py"
-                         (("test_only_update_old_event")
-                           "disabled_only_update_old_event"))
-
-            ;; Bug reported for test_dt_two_tz:
-            ;; https://github.com/pimutils/khal/issues/382
-            (substitute* "tests/event_test.py"
-                         (("test_dt_two_tz")
-                           "disabled_dt_two_tz"))
-            ;; Another timezone / DST issue:
-            ;; https://github.com/pimutils/khal/issues/146
-            (substitute* "tests/event_test.py"
-                         (("test_raw_dt")
-                           "disabled_raw_dt"))))
-
         ;; Building the manpage requires khal to be installed.
         (add-after 'install 'manpage
           (lambda* (#:key outputs #:allow-other-keys)
@@ -136,9 +111,11 @@ data units.")
             (zero? (system* "py.test" "tests")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
        ("python-setuptools-scm" ,python-setuptools-scm)
        ;; Required for tests
        ("tzdata" ,tzdata)
+       ("python-freezegun" ,python-freezegun)
        ;; Required to build manpage
        ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed)
        ("python-sphinx" ,python-sphinx)))
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index b982b61dc2..5dad97c72f 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -223,3 +223,43 @@ to provide security against off-line attacks, such as a drive falling into
 the wrong hands.")
     (license (list license:lgpl3+                 ;encfs library
                    license:gpl3+))))              ;command-line tools
+
+(define-public keyutils
+  (package
+    (name "keyutils")
+    (version "1.5.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://people.redhat.com/dhowells/keyutils/keyutils-"
+                       version ".tar.bz2"))
+       (sha256
+        (base32
+         "1bl3w03ygxhc0hz69klfdlwqn33jvzxl1zfl2jmnb2v85iawb8jd"))
+       (modules '((guix build utils)))
+       ;; Create relative symbolic links instead of absolute ones to /lib/*
+       (snippet '(substitute* "Makefile" (("\\$\\(LNS\\) \\$\\(LIBDIR\\)/")
+                                          "$(LNS) ")))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure))          ; no configure script
+       #:make-flags (list "CC=gcc"
+                          "RPATH=-Wl,-rpath,$(DESTDIR)$(LIBDIR)"
+                          (string-append "DESTDIR="
+                                         (assoc-ref %outputs "out"))
+                          "INCLUDEDIR=/include"
+                          "LIBDIR=/lib"
+                          "MANDIR=/share/man"
+                          "SHAREDIR=/share/keyutils")
+       #:test-target "test"))
+    (home-page "https://people.redhat.com/dhowells/keyutils/")
+    (synopsis "Linux key management utilities")
+    (description
+     "Keyutils is a set of utilities for managing the key retention facility in
+the Linux kernel, which can be used by file systems, block devices, and more to
+gain and retain the authorization and encryption keys required to perform
+secure operations. ")
+    (license (list license:lgpl2.1+             ; the files keyutils.*
+                   license:gpl2+))))            ; the rest
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 09b804f39a..e51dcb5e8c 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -303,14 +303,14 @@ device-specific programs to convert and print many types of files.")
 (define-public hplip
   (package
     (name "hplip")
-    (version "3.16.7")
+    (version "3.16.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/hplip/hplip/" version
                                   "/hplip-" version ".tar.gz"))
               (sha256
                (base32
-                "1hpzyf9ifs0vilsbwxcgpv8g9557p1x8w5qwgz5l0avgcd10dzlx"))))
+                "1svcalf2nc7mvxndp9zz3xp43w66z45rrsr5syl8fx61a6p6gnm9"))))
     (build-system gnu-build-system)
     (home-page "http://hplipopensource.com/")
     (synopsis "HP Printer Drivers")
diff --git a/gnu/packages/slim.scm b/gnu/packages/display-managers.scm
index 2328a1aacf..579b149a0c 100644
--- a/gnu/packages/slim.scm
+++ b/gnu/packages/display-managers.scm
@@ -18,7 +18,7 @@
 ;;; 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 (gnu packages slim)
+(define-module (gnu packages display-managers)
   #:use-module ((guix licenses) #:prefix l:)
   #:use-module (guix packages)
   #:use-module (guix download)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4fe9a8aae6..ad51634f0c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2977,7 +2977,7 @@ passive voice.")
               (sha256
                (base32
                 "0cr37pdkwjgfijfws5bjskfh1rq9rfngxblcj6v5383vpmn83q7s"))
-              (file-name (string-append name "-" version))))
+              (file-name (string-append name "-" version ".tar.gz"))))
     (build-system emacs-build-system)
     (synopsis "Folder tree view for Emacs")
     (description "This Emacs package provides a folder tree view.")
@@ -3002,3 +3002,74 @@ lists, and project planning with a fast and effective plain-text system.  It
 also is an authoring system with unique support for literate programming and
 reproducible research.")
     (license license:gpl3+)))
+
+(define-public emacs-flx
+  (package
+    (name "emacs-flx")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/lewang/"
+                           "flx/archive/v" version ".tar.gz"))
+       (sha256
+        (base32
+         "0bkcpnf1j4i2fcc2rllwbz62l00sw2mcia6rm5amgwvlkqavmkv6"))
+       (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/lewang/flx")
+    (synopsis "Fuzzy matching for Emacs")
+    (description
+     "Flx provides fuzzy matching for emacs a la sublime text.
+The sorting algorithm is a balance between word beginnings (abbreviation)
+and contiguous matches (substring).  The longer the substring match,
+the higher it scores. This maps well to how we think about matching.
+Flx has support for ido (interactively do things) through flx-ido.")
+    (license license:gpl3+)))
+
+(define-public emacs-cyberpunk-theme
+  (package
+    (name "emacs-cyberpunk-theme")
+    (version "1.17")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/n3mo/cyberpunk-theme.el/"
+                           "archive/" version ".tar.gz"))
+       (sha256
+        (base32
+         "068jcn4g1bvwgpcvyfqygzw6ahill51c1sqzyyvj2paxckbd7h51"))
+       (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/n3mo/cyberpunk-theme.el")
+    (synopsis "Cyberpunk theme for emacs built-in color theme support")
+    (description
+     "Cyberpunk color theme for the emacs 24+ built-in color theme support
+known loosely as deftheme.  Many mode-specific customizations are included.")
+    (license license:gpl3+)))
+
+(define-public emacs-auto-complete
+  (package
+    (name "emacs-auto-complete")
+    (version "1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/auto-complete/"
+                           "auto-complete/archive/v" version ".tar.gz"))
+       (sha256
+        (base32
+         "1jvq4lj00hwml75lpmlciazy8f3bbg13gffsfnl835p4qd8l7yqv"))
+       (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-popup" ,emacs-popup)))
+    (home-page "https://github.com/auto-complete/auto-complete")
+    (synopsis "Intelligent auto-completion extension for Emacs")
+    (description
+     "Auto-Complete is an intelligent auto-completion extension for Emacs.
+It extends the standard Emacs completion interface and provides an environment
+that allows users to concentrate more on their own work.  Its features are:
+a visual interface, reduce overhead of completion by using statistic method,
+extensibility.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/entr.scm b/gnu/packages/entr.scm
index 0e0f875267..dfa9274bea 100644
--- a/gnu/packages/entr.scm
+++ b/gnu/packages/entr.scm
@@ -26,14 +26,14 @@
 (define-public entr
   (package
     (name "entr")
-    (version "3.5")
+    (version "3.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://entrproject.org/code/entr-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "05k4jyjna0pr2dalwc1l1dhrcyk6pw7hbss7jl4ykwfadcs5br73"))))
+                "1sy81np6kgmq04kfn2ckf4fp7jcf5d1963shgmapx3al3kc4c9x4"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 67f1e1a2c0..2032dce66a 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -618,6 +619,65 @@ received by the Telepathy framework.  It features pluggable backends to log
 different sorts of messages in different formats.")
     (license license:lgpl2.1+)))
 
+(define-public telepathy-idle
+  (package
+    (name "telepathy-idle")
+    (version "0.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://telepathy.freedesktop.org/releases/"
+                                  name "/" name "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("xsltproc" ,libxslt)
+       ("python" ,python-2)
+       ("python-dbus" ,python2-dbus)))
+    (propagated-inputs
+     `(("telepathy-glib" ,telepathy-glib)))
+    (home-page "http://telepathy.freedesktop.org/")
+    (synopsis "Telepathy IRC connection manager")
+    (description
+     "Idle is an IRC connection manager for the Telepathy framework.  This
+package enables usage of IRC channels and private messages in Telepathy instant
+messaging clients such as Empathy, GNOME Shell or KDE Telepathy.")
+    (license (list license:lgpl2.1 license:lgpl2.1+))))
+
+(define-public telepathy-mission-control
+  (package
+    (name "telepathy-mission-control")
+    (version "5.16.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://telepathy.freedesktop.org/releases/"
+                                  name "/" name "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0zcbx69k0d3p2pjh3g7sa3q2zkd5xchxkqsmlfn3fwxaz0pmsmvi"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("dconf" ,dconf)
+       ("gtk-doc" ,gtk-doc)
+       ("libgnome-keyring" ,libgnome-keyring)
+       ("python" ,python-2)
+       ("xsltproc" ,libxslt)))
+    (propagated-inputs
+     `(("telepathy-glib" ,telepathy-glib)))
+    (home-page "https://telepathy.freedesktop.org/wiki/Components/Mission_Control/")
+    (synopsis "Telepathy real-time communication framework management daemon")
+    (description
+     "Telepathy Mission Control 5 is an account manager and channel dispatcher
+for the Telepathy framework, allowing user interfaces and other clients to
+share connections to real-time communication services without conflicting.")
+    (license license:lgpl2.1)))
+
 (define-public colord-gtk
   (package
     (name "colord-gtk")
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ed5d7fd52e..88330c7293 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -21,7 +21,7 @@
 ;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org>
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il"
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -103,6 +103,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial))
 
@@ -2773,3 +2774,47 @@ Your robot ant can be programmed in many languages: OCaml, Python, C, C++,
 Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog.  Experienced
 programmers may also add their own favorite language.")
     (license license:gpl3+)))
+
+(define-public bambam
+  (package
+    (name "bambam")
+    (version "0.5")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/porridge/bambam/archive/"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "10w110mjdwbvddzihh9rganvvjr5jfiz8cs9n7w12zndwwcc3ria"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)
+         (add-before 'install 'patch-data-dir-location
+           (lambda _
+             (substitute* "bambam.py"
+               (("'data'") "'../share/bambam/data'"))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin"))
+                    (share (string-append out "/share")))
+               (mkdir-p bin)
+               (copy-file "bambam.py" (string-append bin "/bambam"))
+               (install-file "bambam.6" (string-append share "/man/man6"))
+               (copy-recursively "data" (string-append share "/bambam/data")))
+             #t)))))
+    (inputs
+     `(("python-pygame" ,python-pygame)))
+    (home-page "https://github.com/porridge/bambam")
+    (synopsis "Keyboard mashing and doodling game for babies")
+    (description "Bambam is a simple baby keyboard (and gamepad) masher
+application that locks the keyboard and mouse and instead displays bright
+colors, pictures, and sounds.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 4b5646eeec..1473b44605 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
 ;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -434,7 +435,7 @@ extension functionality is exposed in a single header file.")
                      (dynamic-link-substitute "glu/runtime.scm" "GLU" "glu")
                      (dynamic-link-substitute "glut/runtime.scm" "glut"
                                               "freeglut"))))))
-    (home-page "http://gnu.org/s/guile-opengl")
+    (home-page "https://gnu.org/s/guile-opengl")
     (synopsis "Guile binding for the OpenGL graphics API")
     (description
      "Guile-OpenGL is a library for Guile that provides bindings to the
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index b08ba742e6..cdc9872fef 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -126,14 +126,14 @@ tool to extract metadata from a file and print the results.")
 (define-public libmicrohttpd
   (package
    (name "libmicrohttpd")
-   (version "0.9.50")
+   (version "0.9.51")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/libmicrohttpd/libmicrohttpd-"
                                 version ".tar.gz"))
             (sha256
              (base32
-              "1mzbqr6sqisppz88mh73bbh5sw57g8l87qvhcjdx5pmbd183idni"))))
+              "1ir3ga328zkyynznnw71dj64wsaz7pmbhl82lqp1y1hrl85vn01h"))))
    (build-system gnu-build-system)
    (inputs
     `(("curl" ,curl)
@@ -306,7 +306,7 @@ kinds of basic applications for the foundation of a GNU internet.")
        "This package provides Guile bindings to the client libraries of various
 GNUnet services, including the @dfn{identity} and @dfn{file sharing}
 services.")
-      (home-page "http://gnu.org/software/guix")
+      (home-page "https://gnu.org/software/guix")
       (license license:gpl3+))))
 
 ;; FIXME: "gnunet-setup" segfaults under certain conditions and "gnunet-gtk"
diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index 01f2a8454d..3229b868c5 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -129,7 +129,7 @@
        ("parted" ,parted)
        ("qemu" ,qemu-for-tests)
        ("xorriso" ,xorriso)))
-    (home-page "http://www.gnu.org/software/grub/")
+    (home-page "https://www.gnu.org/software/grub/")
     (synopsis "GRand Unified Boot loader")
     (description
      "GRUB is a multiboot bootloader.  It is used for initially loading the
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 7d72492b1a..4fdc4ae252 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -150,6 +150,7 @@ maximum quality factor.")
 (define-public libtiff
   (package
    (name "libtiff")
+   (replacement libtiff/fixed)
    (version "4.0.6")
    (source (origin
             (method url-fetch)
@@ -182,6 +183,23 @@ collection of tools for doing simple manipulations of TIFF images.")
                                   "See COPYRIGHT in the distribution."))
    (home-page "http://www.remotesensing.org/libtiff/")))
 
+(define libtiff/fixed
+  (package
+    (inherit libtiff)
+    (source (origin
+              (inherit (package-source libtiff))
+              (patches (search-patches
+                         "libtiff-oob-accesses-in-decode.patch"
+                         "libtiff-oob-write-in-nextdecode.patch"
+                         "libtiff-CVE-2015-8665+CVE-2015-8683.patch"
+                         "libtiff-CVE-2016-3623.patch"
+                         "libtiff-CVE-2016-3945.patch"
+                         "libtiff-CVE-2016-3990.patch"
+                         "libtiff-CVE-2016-3991.patch"
+                         "libtiff-CVE-2016-5314.patch"
+                         "libtiff-CVE-2016-5321.patch"
+                         "libtiff-CVE-2016-5323.patch"))))))
+
 (define-public libwmf
   (package
     (name "libwmf")
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index a554b73a4e..f824abf3f4 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -41,14 +41,14 @@
 (define-public imagemagick
   (package
     (name "imagemagick")
-    (version "6.9.5-7")
+    (version "6.9.5-8")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://imagemagick/ImageMagick-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "00arcvyhsy9i5gp3b0lhfvs04qwhxpmq0bfsv4ipllinb6mjgxf5"))))
+               "0ds21sk1pczf2cwi62rqp6b8x2m24sb6xn82ivzh13m42phzigav"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 3e0b034950..7387235c5b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -337,16 +337,15 @@ build process and its dependencies, whereas Make uses Makefile format.")
 (define-public icedtea-6
   (package
     (name "icedtea")
-    (version "1.13.11")
+    (version "1.13.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "http://icedtea.wildebeest.org/download/source/icedtea6-"
                     version ".tar.xz"))
-              (patches (search-patches "icedtea-remove-overrides.patch"))
               (sha256
                (base32
-                "1grki39a4rf8n74zc0iglcggxxbpniyfh1gk1lb10p63zvvcsvjj"))
+                "1q5iqm3dzqj8w3dwj6qqhczkkrslrfhmn3110klfwq9kyi2nimj8"))
               (modules '((guix build utils)))
               (snippet
                '(substitute* "Makefile.in"
@@ -441,13 +440,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
              (substitute* '("patches/jtreg-jrunscript.patch"
                             "patches/hotspot/hs23/drop_unlicensed_test.patch")
                (("#!/bin/sh") (string-append "#!" (which "sh"))))
-
-             ;; fix path to alsa header in patch
-             (substitute* "patches/openjdk/6799141-split_out_versions.patch"
-               (("ALSA_INCLUDE=/usr/include/alsa/version.h")
-                (string-append "ALSA_INCLUDE="
-                               (assoc-ref %build-inputs "alsa-lib")
-                               "/include/alsa/version.h")))))
+             #t))
          (add-after 'unpack 'patch-paths
            (lambda _
              ;; buildtree.make generates shell scripts, so we need to replace
@@ -475,6 +468,13 @@ build process and its dependencies, whereas Make uses Makefile format.")
                  (("DEF_OBJCOPY *=.*objcopy")
                   (string-append "DEF_OBJCOPY = " (which "objcopy"))))
 
+               ;; fix path to alsa header
+               (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
+                 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
+                  (string-append "ALSA_INCLUDE="
+                                 (assoc-ref %build-inputs "alsa-lib")
+                                 "/include/alsa/version.h")))
+
                ;; fix hard-coded utility paths
                (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
                               "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
@@ -764,10 +764,10 @@ build process and its dependencies, whereas Make uses Makefile format.")
        ("openjdk6-src"
         ,(origin
            (method url-fetch)
-           (uri "https://java.net/downloads/openjdk6/openjdk-6-src-b39-03_may_2016.tar.gz")
+           (uri "https://java.net/downloads/openjdk6/openjdk-6-src-b40-22_aug_2016.tar.gz")
            (sha256
             (base32
-             "1brxbsgwcj4js26y5lk6capc3pvghgjidvv9cavw6z8n7c7aw8af"))))
+             "01v4q7g9pa6w7m6yxply5yrin08jgv12fck665xnmp09bpxy8sa5"))))
        ("lcms" ,lcms)
        ("zlib" ,zlib)
        ("gtk" ,gtk+-2)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 6ba454d0ed..011f9e0deb 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -25,11 +25,15 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages acl)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -42,6 +46,7 @@
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
@@ -138,6 +143,38 @@ common build settings used in software produced by the KDE community.")
     (description "C++ bindings/wrapper for gpgme.")
     (license license:lgpl2.1+)))
 
+(define-public kpmcore
+  (package
+    (name "kpmcore")
+    (version "2.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://kde/stable/kpmcore"
+                            "/" version "/src/"
+                            name "-" version ".tar.xz"))
+        (sha256
+         (base32
+          "1blila6ncqbmzhycx3szrbkxc000pzh62956mw5ihxvhrqpncg2p"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("kconfigwidgets" ,kconfigwidgets)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("ki18n" ,ki18n)
+       ("kservice" ,kservice)
+       ("libatasmart" ,libatasmart)
+       ("parted" ,parted)
+       ("qtbase" ,qtbase)
+       ("util-linux" ,util-linux)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Library for managing partitions")
+    (description "Library for managing partitions.")
+    (license license:gpl3+)))
+
 
 ;; Tier 1
 ;;
@@ -1461,3 +1498,1270 @@ different physical units.  It supports converting different prefixes (e.g. kilo,
 mega, giga) as well as converting between different unit systems (e.g. liters,
 gallons).")
     (license license:lgpl2.1+)))
+
+
+;; Tier 3
+;;
+;; Tier 3 frameworks are generally more powerful, comprehensive packages, and
+;; consequently have more complex dependencies.
+
+(define-public baloo
+  (package
+    (name "baloo")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1ayfdg6j9lvas17ryjdv4a0kaj6vw3bxfy2x9nadl0gkc9pak4nh"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kcoreaddons" ,kcoreaddons)
+       ("kfilemetadata" ,kfilemetadata)))
+    (native-inputs
+     `(("dbus" ,dbus)
+       ("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kbookmarks" ,kbookmarks)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kcrash" ,kcrash)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kidletime" ,kidletime)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("lmdb" ,lmdb)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("solid" ,solid)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t))
+         (replace 'check
+           (lambda _
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             (zero? (system* "dbus-launch" "ctest" ".")))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "File searching and indexing")
+    (description "Baloo provides file searching and indexing.  It does so by
+maintaining an index of the contents of your files.")
+    ;; dual licensed
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public kactivities
+  (package
+    (name "kactivities")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0s8g43zk6h35bq1am1nnhj0qvmhd6kz42gs8l7ybga0367jghzhf"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("boost" ,boost)
+       ("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("solid" ,solid)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Core components for the KDE Activity concept")
+    (description "KActivities provides the infrastructure needed to manage a
+user's activites, allowing them to switch between tasks, and for applications
+to update their state to match the user's current activity.  This includes a
+daemon, a library for interacting with that daemon, and plugins for integration
+with other frameworks.")
+    ;; triple licensed
+    (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
+
+;; NOTE: This package is listed as a tier 2 package even though it requires
+;;       kactivities - a tier 3 package.
+(define-public kactivities-stats
+  (package
+    (name "kactivities-stats")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1z3xvpifxbd05b2xaxxyiypcpid7jgjb1qpwiyjj1gnfp4rjmzpc"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("boost" ,boost)
+       ("kactivities" ,kactivities)
+       ("kconfig" ,kconfig)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Access usage statistics collected by the activity manager")
+    (description "The KActivitiesStats library provides a querying mechanism for
+the data that the activitiy manager collects - which documents have been opened
+by which applications, and what documents have been linked to which activity.")
+    ;; triple licensed
+    (license (list license:lgpl2.0+ license:lgpl2.1+ license:lgpl3+))))
+
+(define-public kbookmarks
+  (package
+    (name "kbookmarks")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "10d8dnhvbrwp0dbmz93cqfdff6ir8iy3yiwaf9ihj6ma124qlyjn"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kwidgetsaddons" ,kwidgetsaddons)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Bookmarks management library")
+    (description "KBookmarks lets you access and manipulate bookmarks stored
+using the XBEL format.")
+    (license license:lgpl2.1+)))
+
+(define-public kcmutils
+  (package
+    (name "kcmutils")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0aws1c76s6wbp0xpr6qv6cfwq8dw82v00pkf9gy84sbxknwjnizk"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kconfigwidgets" ,kconfigwidgets)
+       ("kservice" ,kservice)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kdeclarative" ,kdeclarative)
+       ("kiconthemes" ,kiconthemes)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kpackage" ,kpackage)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Utilities for KDE System Settings modules")
+    (description "KCMUtils provides various classes to work with KCModules.
+KCModules can be created with the KConfigWidgets framework.")
+    (license license:lgpl2.1+)))
+
+(define-public kconfigwidgets
+  (package
+    (name "kconfigwidgets")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0v25r50gh5i984lzlv0rradghglcfqf0gsfmnkn23h87b86fm9l2"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kconfig" ,kconfig)
+       ("kwidgetsaddons" ,kwidgetsaddons)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kcoreaddons" ,kcoreaddons)
+       ("kguiaddons" ,kguiaddons)
+       ("ki18n" ,ki18n)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Widgets for configuration dialogs")
+    (description "KConfigWidgets provides easy-to-use classes to create
+configuration dialogs, as well as a set of widgets which uses KConfig to store
+their settings.")
+    ;; dual licensed
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public kdeclarative
+  (package
+    (name "kdeclarative")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "00ik9q1r6y6g5rkdq96yczgrxmcg85x00lipyljvc3x6xw6bixbz"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kconfig" ,kconfig)
+       ("kpackage" ,kpackage)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("xorg-server" ,xorg-server)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kglobalaccel" ,kglobalaccel)
+       ("kguiaddons" ,kguiaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("solid" ,solid)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'start-xorg-server
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; The test suite requires a running X server.
+             (system (string-append (assoc-ref inputs "xorg-server")
+                                    "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+             (setenv "DISPLAY" ":1")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Integration of QML and KDE work spaces")
+    (description "KDeclarative provides integration of QML and KDE work spaces.
+It's comprises two parts: a library used by the C++ part of your application to
+intergrate QML with KDE Frameworks specific features, and a series of QML imports
+that offer bindings to some of the Frameworks.")
+    ;; dual licensed
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public kded
+  (package
+    (name "kded")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0ngpxdxb596myn5r4kjxahx195bwklq33yvgjvcbxi2clg2wccaj"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kcrash" ,kcrash)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdoctools" ,kdoctools)
+       ("kinit" ,kinit)
+       ("kservice" ,kservice)
+       ("qtbase" ,qtbase)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Central daemon of KDE work spaces")
+    (description "KDED stands for KDE Daemon.  KDED runs in the background and
+performs a number of small tasks.  Some of these tasks are built in, others are
+started on demand.")
+    ;; dual licensed
+    (license (list license:lgpl2.0+ license:lgpl2.1+))))
+
+(define-public kdesignerplugin
+  (package
+    (name "kdesignerplugin")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0i0s8pwwhwh5hyyvkv0cnj0yyv0g5bnm5xw18knv2yagiy4bvb2j"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kdoctools" ,kdoctools)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Integrating KDE frameworks widgets with Qt Designer")
+    (description "This framework provides plugins for Qt Designer that allow it
+to display the widgets provided by various KDE frameworks, as well as a utility
+(kgendesignerplugin) that can be used to generate other such plugins from
+ini-style description files.")
+    (license license:lgpl2.1+)))
+
+(define-public kdesu
+  (package
+    (name "kdesu")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1ivcnhgvq75xvl0w9g7m45qzallz42ijaq0n1ap09lpdfmjbnrxk"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kpty" ,kpty)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("ki18n" ,ki18n)
+       ("kservice" ,kservice)
+       ("qtbase" ,qtbase)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "User interface for running shell commands with root privileges")
+    (description "KDESU provides functionality for building GUI front ends for
+(password asking) console mode programs.  kdesu and kdessh use it to interface
+with su and ssh respectively.")
+    (license license:lgpl2.1+)))
+
+(define-public kemoticons
+  (package
+    (name "kemoticons")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0gmc52k5jb553jvzxwsq79v5y87kgav8i5qqv4bqc9yl7p866zhn"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kservice" ,kservice)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("karchive" ,karchive)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:tests? #f ; FIXME: 2/2 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Convert text emoticons to graphical emoticons")
+    (description "KEmoticons converts emoticons from text to a graphical
+representation with images in HTML.  It supports setting different themes for
+emoticons coming from different providers.")
+    ;; dual licensed, image files are licensed under cc-by-sa4.0
+    (license (list license:gpl2+ license:lgpl2.1+ license:cc-by-sa4.0))))
+
+(define-public kglobalaccel
+  (package
+    (name "kglobalaccel")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "123v0ld1q88hbm3d0mqgq6lcivfkqh7pbz4hb4n76ab5v43qc15c"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("kconfig" ,kconfig)
+       ("kcrash" ,kcrash)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("libxcb" ,libxcb)
+       ("qtbase" ,qtbase)
+       ("qtx11extras" ,qtx11extras)
+       ("xcb-util-keysyms" ,xcb-util-keysyms)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Global desktop keyboard shortcuts")
+    (description "KGlobalAccel allows you to have global accelerators that are
+independent of the focused window.  Unlike regular shortcuts, the application's
+window does not need focus for them to be activated.")
+    (license license:lgpl2.1+)))
+
+(define-public kiconthemes
+  (package
+    (name "kiconthemes")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1k5zig2n6wzfyv6pc8dpas2862mxjyxxza00m31myrfw5i1a1h6m"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("shared-mime-info" ,shared-mime-info)))
+    (inputs
+     `(("karchive" ,karchive)
+       ("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("ki18n" ,ki18n)
+       ("kitemviews" ,kitemviews)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)))
+    (arguments
+     `(#:tests? #f ; FIXME: Test failure
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "XDG_DATA_DIRS"
+                     (string-append (assoc-ref inputs "shared-mime-info")
+                                    "/share"))
+             (setenv "HOME" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Icon GUI utilities")
+    (description "This library contains classes to improve the handling of icons
+in applications using the KDE Frameworks.")
+    (license license:lgpl2.1+)))
+
+(define-public kinit
+  (package
+    (name "kinit")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1i7l6gid5hrrfglw1c461gpjg51dwz7cl4lx7ll8vz2ha8mz4d3n"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kcrash" ,kcrash)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("solid" ,solid)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Library to speed up start of applications on KDE workspaces")
+    (description "Kdeinit is a process launcher similar to init used for booting
+UNIX.  It launches processes by forking and then loading a dynamic library which
+contains a 'kdemain(...)' function.  Using kdeinit to launch KDE applications
+makes starting KDE applications faster and reduces memory consumption.")
+    ;; dual licensed
+    (license (list license:lgpl2.0+ license:lgpl2.1+))))
+
+(define-public kio
+  (package
+    (name "kio")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0zncj9yf8zaylazlwvirylpk9vki3j889b1x2s0aav54vvj7vdi5"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kbookmarks" ,kbookmarks)
+       ("kconfig" ,kconfig)
+       ("kcompletion" ,kcompletion)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kitemviews" ,kitemviews)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kxmlgui" ,kxmlgui)
+       ("solid" ,solid)))
+    (native-inputs
+     `(("dbus" ,dbus)
+       ("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("acl" ,acl)
+       ("karchive" ,karchive)
+       ("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdoctools" ,kdoctools)
+       ("kiconthemes" ,kiconthemes)
+       ("ki18n" ,ki18n)
+       ("knotifications" ,knotifications)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwallet" ,kwallet)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("qtbase" ,qtbase)
+       ("qtx11extras" ,qtx11extras)
+       ("sonnet" ,sonnet)))
+    (arguments
+     `(#:tests? #f ; FIXME: 41/50 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "XDG_RUNTIME_DIR" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    ;;(replace 'check
+    ;;  (lambda _
+    ;;    (setenv "DBUS_FATAL_WARNINGS" "0")
+    ;;    (zero? (system* "dbus-launch" "ctest" ".")))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Network transparent access to files and data")
+    (description "This framework implements a lot of file management functions.
+It supports accessing files locally as well as via HTTP and FTP out of the box
+and can be extended by plugins to support other protocols as well.  There is a
+variety of plugins available, e.g. to support access via SSH.  The framework can
+also be used to bridge a native protocol to a file-based interface.  This makes
+the data accessible in all applications using the KDE file dialog or any other
+KIO enabled infrastructure.")
+    (license license:lgpl2.1+)))
+
+(define-public knewstuff
+  (package
+    (name "knewstuff")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0xdv3wh3100vzsx8p2zihy1dvh0wzfmrjkjq71v8igwz5d291zsj"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("attica" ,attica)
+       ("kservice" ,kservice)
+       ("kxmlgui" ,kxmlgui)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("karchive" ,karchive)
+       ("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kiconthemes" ,kiconthemes)
+       ("kjobwidgets" ,kjobwidgets)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("qtbase" ,qtbase)
+       ("solid" ,solid)
+       ("sonnet" ,sonnet)))
+    (arguments
+     `(#:tests? #f ; FIXME: 1/3 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _ ; XDG_DATA_DIRS isn't set
+             (setenv "HOME" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Framework for downloading and sharing additional application data")
+    (description "The KNewStuff library implements collaborative data sharing
+for applications.  It uses libattica to support the Open Collaboration Services
+specification.")
+    (license license:lgpl2.1+)))
+
+(define-public knotifyconfig
+  (package
+    (name "knotifyconfig")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1dij841fnqia4p44x2wnpdvl8cn3nkj833y0fah50fmipjc8r70b"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("knotifications" ,knotifications)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("phonon" ,phonon)
+       ("qtbase" ,qtbase)
+       ("solid" ,solid)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Configuration dialog for desktop notifications")
+    (description "KNotifyConfig provides a configuration dialog for desktop
+notifications which can be embedded in your application.")
+    ;; dual licensed
+    (license (list license:lgpl2.0+ license:lgpl2.1+))))
+
+(define-public kparts
+  (package
+    (name "kparts")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0z7qr93aq02i7g7cxgypx2rzlnsvbsx9cjblb0ijmad1nb8w3mix"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kio" ,kio)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kxmlgui" ,kxmlgui)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("qtbase" ,qtbase)
+       ("solid" ,solid)
+       ("sonnet" ,sonnet)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Plugin framework for user interface components")
+    (description "This library implements the framework for KDE parts, which are
+widgets with a user-interface defined in terms of actions.")
+    (license license:lgpl2.1+)))
+
+(define-public kpeople
+  (package
+    (name "kpeople")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0iknzkj23y927xh24kw5sjxyirhy6pkmfcmmgwzd78rba8a54qp2"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)))
+    (arguments
+     `(#:tests? #f ; FIXME: 1/3 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Provides access to all contacts and aggregates them by person")
+    (description "KPeople offers unified access to our contacts from different
+sources, grouping them by person while still exposing all the data.  KPeople
+also provides facilities to integrate the data provided in user interfaces by
+providing QML and Qt Widgets components.  The sources are plugin-based, allowing
+to easily extend the contacts collection.")
+    (license license:lgpl2.1+)))
+
+(define-public krunner
+  (package
+    (name "krunner")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0ff87ijjd47jxf6zw2ggqgngnbyx1rj59wdfgy5wbi3acws6bafl"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("plasma-framework" ,plasma-framework)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kpackage" ,kpackage)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("solid" ,solid)
+       ("threadweaver" ,threadweaver)))
+    (arguments
+     `(#:tests? #f ; FIXME: 1/1 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+             (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Framework for Plasma runners")
+    (description "The Plasma workspace provides an application called KRunner
+which, among other things, allows one to type into a text area which causes
+various actions and information that match the text appear as the text is being
+typed.")
+    (license license:lgpl2.1+)))
+
+(define-public kservice
+  (package
+    (name "kservice")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0w0nsg64d6xhgijr2vh0j5p544qi0q55jpqa9v9mv956zrrdssdk"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kcrash" ,kcrash)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdoctools" ,kdoctools)
+       ("ki18n" ,ki18n)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:tests? #f ; FIXME: 8/10 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Plugin framework for desktop services")
+    (description "KService provides a plugin framework for handling desktop
+services.  Services can be applications or libraries.  They can be bound to MIME
+types or handled by application specific code.")
+    ;; triple licensed
+    (license (list license:gpl2+ license:gpl3+ license:lgpl2.1+))))
+
+(define-public ktexteditor
+  (package
+    (name "ktexteditor")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1ykj1kvm7k1vxb1w235d5hp2swwdqjyp2y4c3pxbvkn999h9x5q5"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kparts" ,kparts)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("karchive" ,karchive)
+       ("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kguiaddons" ,kguiaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kio" ,kio)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("libgit2" ,libgit2)
+       ("perl" ,perl)
+       ("qtbase" ,qtbase)
+       ("qtscript" ,qtscript)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("solid" ,solid)
+       ("sonnet" ,sonnet)))
+    (arguments
+     `(#:tests? #f ; FIXME: 2/54 tests fail: Cannot find fontdirectory qtbase/lib/font
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'setup
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "XDG_DATA_DIRS" ; FIXME build phase doesn't find parts.desktop
+                     (string-append (assoc-ref inputs "kparts") "/share"))
+             #t))
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Full text editor component")
+    (description "KTextEditor provides a powerful text editor component that you
+can embed in your application, either as a KPart or using the KF5::TextEditor
+library.")
+    ;; triple licensed
+    (license (list license:gpl2+ license:lgpl2.0+ license:lgpl2.1+))))
+
+(define-public ktextwidgets
+  (package
+    (name "ktextwidgets")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1q10xav2gkii6s3m31c9xvxf1988l7k2lpib6pyhgsidflmwjm02"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("ki18n" ,ki18n)
+       ("sonnet" ,sonnet)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Text editing widgets")
+    (description "KTextWidgets provides widgets for displaying and editing text.
+It supports rich text as well as plain text.")
+    ;; dual licensed
+    (license (list license:lgpl2.0+ license:lgpl2.1+))))
+
+(define-public kwallet
+  (package
+    (name "kwallet")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0zad5h4vsvcl2xv3vxsjwh42b71xbp6x6rj8cvmw8szr2rzz9gsx"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("gpgmepp" ,gpgmepp)
+       ("kauth" ,kauth)
+       ("kcodecs" ,kcodecs)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdoctools" ,kdoctools)
+       ("kiconthemes" ,kiconthemes)
+       ("ki18n" ,ki18n)
+       ("knotifications" ,knotifications)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("libgcrypt" ,libgcrypt)
+       ("phonon" ,phonon)
+       ("qtbase" ,qtbase)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Safe desktop-wide storage for passwords")
+    (description "This framework contains an interface to KWallet, a safe
+desktop-wide storage for passwords and the kwalletd daemon used to safely store
+the passwords on KDE work spaces.")
+    (license license:lgpl2.1+)))
+
+(define-public kxmlgui
+  (package
+    (name "kxmlgui")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1qhixldhhcbklmrpjh67440h1rrzqy70h57hw6ialjdsr3pl6ihp"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("attica" ,attica)
+       ("kauth", kauth)
+       ("kcodecs" ,kcodecs)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kglobalaccel" ,kglobalaccel)
+       ("kiconthemes" ,kiconthemes)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("ktextwidgets" ,ktextwidgets)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("qtbase" ,qtbase)
+       ("sonnet" ,sonnet)))
+    (arguments
+     `(#:tests? #f ; FIXME: 1/5 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Framework for managing menu and toolbar actions")
+    (description "KXMLGUI provides a framework for managing menu and toolbar
+actions in an abstract way.  The actions are configured through a XML description
+and hooks in the application code.  The framework supports merging of multiple
+descriptions for integrating actions from plugins.")
+    ;; dual licensed
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public kxmlrpcclient
+  (package
+    (name "kxmlrpcclient")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "06ap6ipzqimz1rfrcr7z8zc7idy7sg4a97dws7h52i34ms7jqnc8"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kio" ,kio)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kitemviews" ,kitemviews)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("kservice" ,kservice)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kxmlgui" ,kxmlgui)
+       ("qtbase" ,qtbase)
+       ("solid" ,solid)))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "XML-RPC client")
+    (description "This library contains simple XML-RPC Client support.  It is a
+complete client and is easy to use.  Only one interface is exposed,
+kxmlrpcclient/client.h and from that interface, you only need to use 3 methods:
+setUrl, setUserAgent and call.")
+    ;; dual licensed
+    (license (list license:bsd-2 license:lgpl2.1+))))
+
+(define-public plasma-framework
+  (package
+    (name "plasma-framework")
+    (version "5.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde/stable/frameworks/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0981vm00541dzihlr1fsax05biwp2ddpwjrmvnfysx5jagdc65cb"))))
+    (build-system cmake-build-system)
+    (propagated-inputs
+     `(("kpackage" ,kpackage)
+       ("kservice" ,kservice)))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (inputs
+     `(("kactivities" ,kactivities)
+       ("karchive" ,karchive)
+       ("kauth" ,kauth)
+       ("kbookmarks" ,kbookmarks)
+       ("kcodecs" ,kcodecs)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kdbusaddons" ,kdbusaddons)
+       ("kdeclarative" ,kdeclarative)
+       ("kdoctools" ,kdoctools)
+       ("kglobalaccel" ,kglobalaccel)
+       ("kguiaddons" ,kguiaddons)
+       ("kiconthemes" ,kiconthemes)
+       ("kitemviews" ,kitemviews)
+       ("kio" ,kio)
+       ("ki18n" ,ki18n)
+       ("kjobwidgets" ,kjobwidgets)
+       ("knotificantions" ,knotifications)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kxmlgui" ,kxmlgui)
+       ("phonon" ,phonon)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("solid" ,solid)))
+    (arguments
+     `(#:tests? #f ; FIXME: 13/14 tests fail.
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Libraries, components and tools of Plasma workspaces")
+    (description "The plasma framework provides QML components, libplasma and
+script engines.")
+    ;; dual licensed
+    (license (list license:gpl2+ license:lgpl2.1+))))
diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm
index 053565c909..432c1fe675 100644
--- a/gnu/packages/libidn.scm
+++ b/gnu/packages/libidn.scm
@@ -27,6 +27,7 @@
 (define-public libidn
   (package
    (name "libidn")
+   (replacement libidn-1.33)
    (version "1.32")
    (source (origin
             (method url-fetch)
@@ -45,3 +46,16 @@ names.  It includes native C, C# and Java libraries.")
    ;; the command line tool is gpl3+.
    (license (list gpl2+ gpl3+ lgpl3+ fdl1.3+))
    (home-page "http://www.gnu.org/software/libidn/")))
+
+(define libidn-1.33
+  (package
+    (inherit libidn)
+    (source
+      (let ((version "1.33"))
+        (origin
+          (method url-fetch)
+          (uri (string-append "mirror://gnu/libidn/libidn-" version
+                              ".tar.gz"))
+          (sha256
+           (base32
+            "068fjg2arlppjqqpzd714n1lf6gxkpac9v5yyvp1qwmv6nvam9s4")))))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1fd792d7f6..0034314601 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages calendar)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
@@ -50,6 +52,7 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libusb)
@@ -196,6 +199,35 @@
 `insmod', `lsmod', and more.")
     (license license:gpl2+)))
 
+(define-public libnfsidmap
+  (package
+    (name "libnfsidmap")
+    (version "0.25")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "http://www.citi.umich.edu/projects/nfsv4/linux/"
+                   name "/" name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1kzgwxzh83qi97rblcm9qj80cdvnv8kml2plz0q103j0hifj8vb5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list
+                          (string-append "--with-pluginpath="
+                                         (assoc-ref %outputs "out")
+                                         "/lib/libnfsidmap"))))
+    (home-page
+     "http://www.citi.umich.edu/projects/nfsv4/crossrealm/libnfsidmap_config.html")
+    (synopsis
+     "NFSv4 support library for name/ID mapping")
+    (description "Libnfsidmap is a library holding mulitiple methods of
+mapping names to ids and visa versa, mainly for NFSv4.  It provides an
+extensible array of mapping functions, currently consisting of two choices:
+the default @code{nsswitch} and the experimental @code{umich_ldap}.")
+    (license (license:non-copyleft "file://COPYING"
+                                   "See COPYING in the distribution."))))
+
 (define %boot-logo-patch
   ;; Linux-Libre boot logo featuring Freedo and a gnu.
   (origin
@@ -840,14 +872,14 @@ MIDI functionality to the Linux-based operating system.")
 (define-public alsa-utils
   (package
     (name "alsa-utils")
-    (version "1.1.0")
+    (version "1.1.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
                                  name "-" version ".tar.bz2"))
              (sha256
               (base32
-               "1wa88wvqcfhak9x3y65wzzwxmmyxb5bv2gyj7lnm653fnwsk271v"))))
+               "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: Disable man page creation until we have DocBook.
@@ -858,14 +890,15 @@ MIDI functionality to the Linux-based operating system.")
                                (string-append "--with-udev-rules-dir="
                                               (assoc-ref %outputs "out")
                                               "/lib/udev/rules.d"))
-       #:phases (alist-cons-before
-                 'install 'pre-install
-                 (lambda _
-                   ;; Don't try to mkdir /var/lib/alsa.
-                   (substitute* "Makefile"
-                     (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
-                      "true\n")))
-                 %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+           'install 'pre-install
+           (lambda _
+             ;; Don't try to mkdir /var/lib/alsa.
+             (substitute* "Makefile"
+               (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
+                "true\n")))))))
     (inputs
      `(("libsamplerate" ,libsamplerate)
        ("ncurses" ,ncurses)
@@ -2859,3 +2892,40 @@ as used on certified hardware security devices.")
                    (license:non-copyleft "file://nist/packtest.c")
                    license:public-domain        ; nist/dfft.c
                    license:gpl3+))))            ; everything else
+
+(define-public ecryptfs-utils
+  (package
+    (name "ecryptfs-utils")
+    (version "111")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/ecryptfs/trunk/"
+                           version "/+download/ecryptfs-utils_"
+                           version ".orig.tar.gz"))
+       (sha256
+        (base32
+         "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--disable-pywrap")))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("perl" ,perl)                   ; for pod2man
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("keyutils" ,keyutils)
+       ("linux-pam" ,linux-pam)
+       ("nss" ,nss)))
+    (home-page "http://ecryptfs.org/")
+    (synopsis "eCryptfs cryptographic file system utilities")
+    (description
+     "eCryptfs is a POSIX-compliant stacked cryptographic file system for Linux.
+Each file's cryptographic meta-data is stored inside the file itself, along
+with the encrypted contents.  This allows individual encrypted files to be
+copied between hosts and still be decrypted with the proper key.  eCryptfs is a
+native Linux file system, and has been part of the Linux kernel since version
+2.6.19.  This package contains the userland utilities to manage it.")
+    ;; The files src/key_mod/ecryptfs_key_mod_{openssl,pkcs11_helper,tspi}.c
+    ;; grant additional permission to link with OpenSSL.
+    (license license:gpl2+)))
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index b4b5dee8be..8bd67c594d 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,12 +22,14 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages lua)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages readline))
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages xml))
 
 (define-public lua
   (package
@@ -44,14 +47,15 @@
     (inputs `(("readline" ,readline)))
     (arguments
      '(#:modules ((guix build gnu-build-system)
-                    (guix build utils)
-                    (srfi srfi-1))
+                  (guix build utils)
+                  (srfi srfi-1))
        #:test-target "test"
+       #:make-flags
+       '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
+         "linux")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
-         (replace 'build
-           (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux"))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -68,7 +72,7 @@ based on associative arrays and extensible semantics.  Lua is dynamically typed,
 runs by interpreting bytecode for a register-based virtual machine, and has
 automatic memory management with incremental garbage collection, making it ideal
 for configuration, scripting, and rapid prototyping.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public lua-5.1
   (package (inherit lua)
@@ -106,4 +110,152 @@ for configuration, scripting, and rapid prototyping.")
 programming language.  Lua is a powerful, dynamic and light-weight programming
 language.  It may be embedded or used as a general-purpose, stand-alone
 language.")
-    (license x11)))
+    (license license:x11)))
+
+(define-public lua5.1-expat
+  (package
+    (name "lua5.1-expat")
+    (version "1.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://matthewwild.co.uk/projects/"
+                                  "luaexpat/luaexpat-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list "CC=gcc"
+               (string-append "LUA_LDIR=" out "/share/lua/$(LUA_V)")
+               (string-append "LUA_CDIR=" out "/lib/lua/$(LUA_V)")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'check
+           (lambda _
+             (setenv "LUA_CPATH" "src/?.so;;")
+             (setenv "LUA_PATH"  "src/?.lua;;")
+             (and (zero? (system* "lua" "tests/test.lua"))
+                  (zero? (system* "lua" "tests/test-lom.lua"))))))))
+    (inputs
+     `(("lua" ,lua-5.1)
+       ("expat" ,expat)))
+    (home-page "http://matthewwild.co.uk/projects/luaexpat/")
+    (synopsis "SAX XML parser based on the Expat library")
+    (description "LuaExpat is a SAX XML parser based on the Expat library.")
+    (license (package-license lua-5.1))))
+
+(define-public lua5.1-socket
+  (package
+    (name "lua5.1-socket")
+    (version "2.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://files.luaforge.net/releases/"
+                                  "luasocket/luasocket/luasocket-"
+                                  version "/luasocket-" version ".tar.gz"))
+              (sha256
+               (base32
+                "19ichkbc4rxv00ggz8gyf29jibvc2wq9pqjik0ll326rrxswgnag"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list (string-append "INSTALL_TOP_SHARE=" out "/share/lua/5.1")
+               (string-append "INSTALL_TOP_LIB=" out "/lib/lua/5.1")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'check
+           (lambda _
+             (setenv "LUA_CPATH" (string-append "src/?.so." ,version ";;"))
+             (setenv "LUA_PATH"  "src/?.lua;;")
+             (when (zero? (primitive-fork))
+               (system* "lua" "test/testsrvr.lua"))
+             (zero? (system* "lua" "test/testclnt.lua")))))))
+    (inputs
+     `(("lua" ,lua-5.1)))
+    (home-page "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/")
+    (synopsis "Socket library for Lua")
+    (description "LuaSocket is a Lua extension library that is composed by two
+parts: a C core that provides support for the TCP and UDP transport layers,
+and a set of Lua modules that add support for functionality commonly needed by
+applications that deal with the Internet.
+
+Among the supported modules, the most commonly used implement the
+SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading
+files) client protocols.  These provide a very natural and generic interface
+to the functionality defined by each protocol.  In addition, you will find
+that the MIME (common encodings), URL (anything you could possible want to do
+with one) and LTN12 (filters, sinks, sources and pumps) modules can be very
+handy.")
+    (license (package-license lua-5.1))))
+
+(define-public lua5.1-filesystem
+  (package
+    (name "lua5.1-filesystem")
+    (version "1.6.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/keplerproject/"
+                                  "luafilesystem/archive/v_"
+                                  "1_6_3" ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0s10ckxin0bysd6gaywqhxkpw3ybjhprr8m655b8cx3pxjwd49am"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (inputs
+     `(("lua" ,lua-5.1)))
+    (home-page "https://keplerproject.github.io/luafilesystem/index.html")
+    (synopsis "File system library for Lua")
+    (description "LuaFileSystem is a Lua library developed to complement the
+set of functions related to file systems offered by the standard Lua
+distribution.  LuaFileSystem offers a portable way to access the underlying
+directory structure and file attributes.")
+    (license (package-license lua-5.1))))
+
+(define-public lua5.1-sec
+  (package
+    (name "lua5.1-sec")
+    (version "0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/brunoos/luasec/archive/"
+                                  "luasec-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0pgd1anzznl4s0h16wg8dlw9mgdb9h52drlcki6sbf5y31fa7wyf"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list "linux"
+               "CC=gcc"
+               "LD=gcc"
+               (string-append "LUAPATH=" out "/share/lua/5.1")
+               (string-append "LUACPATH=" out "/lib/lua/5.1")))
+       #:tests? #f ; no tests included
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (inputs
+     `(("lua" ,lua-5.1)
+       ("openssl" ,openssl)))
+    (propagated-inputs
+     `(("lua-socket" ,lua5.1-socket)))
+    (home-page "https://github.com/brunoos/luasec/wiki")
+    (synopsis "OpenSSL bindings for Lua")
+    (description "LuaSec is a binding for OpenSSL library to provide TLS/SSL
+communication.  It takes an already established TCP connection and creates a
+secure session between the peers.")
+    (license (package-license lua-5.1))))
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index de9ac179bb..fa4515c768 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -24,7 +24,7 @@
 (define-module (gnu packages messaging)
   #:use-module ((guix licenses)
                 #:select (gpl3+ gpl2+ gpl2 lgpl2.1 lgpl2.0+ bsd-2 non-copyleft
-                          asl2.0))
+                          asl2.0 x11))
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -45,6 +45,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libidn)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages ncurses)
@@ -492,4 +493,77 @@ transformation; audio and video conferences; file transfer; TLS, GPG and
 end-to-end encryption support; XML console.")
     (license gpl3+)))
 
+(define-public prosody
+  (package
+    (name "prosody")
+    (version "0.9.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://prosody.im/downloads/source/"
+                                  "prosody-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0bv6s5c0iizz015hh1lxlwlw1iwvisywajm2rcrbdfyrskzfwdj8"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no "check" target
+       #:modules ((ice-9 match)
+                  (srfi srfi-1)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-configure-script
+           (lambda _
+             ;; The configure script aborts when it encounters unexpected
+             ;; arguments.  Make it more tolerant.
+             (substitute* "configure"
+               (("exit 1") ""))
+             #t))
+         (add-after 'install 'wrap-programs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Make sure all executables in "bin" find the required Lua
+             ;; modules at runtime.
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin/"))
+                    (deps  (delete #f (map (match-lambda
+                                             ((label . directory)
+                                              (if (string-prefix? "lua" label)
+                                                  directory #f)))
+                                           inputs)))
+                    (path  (string-join
+                            (map (lambda (path)
+                                   (string-append path "/share/lua/5.1/?.lua;"
+                                                  path "/share/lua/5.1/?/?.lua"))
+                                 (cons out deps))
+                            ";"))
+                    (cpath (string-join
+                            (map (lambda (path)
+                                   (string-append path "/lib/lua/5.1/?.so;"
+                                                  path "/lib/lua/5.1/?/?.so"))
+                                 (cons out deps))
+                            ";")))
+               (for-each (lambda (file)
+                           (wrap-program file
+                             `("LUA_PATH"  ";" = (,path))
+                             `("LUA_CPATH" ";" = (,cpath))))
+                         (find-files bin ".*"))
+               #t))))))
+    (inputs
+     `(("libidn" ,libidn)
+       ("openssl" ,openssl)
+       ("lua" ,lua-5.1)
+       ("lua5.1-expat" ,lua5.1-expat)
+       ("lua5.1-socket" ,lua5.1-socket)
+       ("lua5.1-filesystem" ,lua5.1-filesystem)
+       ("lua5.1-sec" ,lua5.1-sec)))
+    (home-page "https://prosody.im/")
+    (synopsis "Jabber (XMPP) server")
+    (description "Prosody is a modern XMPP communication server.  It aims to
+be easy to set up and configure, and efficient with system resources.
+Additionally, for developers it aims to be easy to extend and give a flexible
+system on which to rapidly develop added functionality, or prototype new
+protocols.")
+    (license x11)))
+
 ;;; messaging.scm ends here
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index bdccccec6f..07f0b9d957 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
-;;; Coypright © 2016 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index d9b2f9dda0..0bcc885c39 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +21,8 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (gnu packages mit-krb5)
+  #:use-module (gnu packages pkg-config)
   #:use-module (guix build-system gnu))
 
 (define-public libtirpc
@@ -36,16 +39,14 @@
                 "18a337wa4amf0k21wnimp3yzs5l3cxqndz4x3x8bm993zhfy5hs5"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Doesn't work with GNU GSS.
-       #:configure-flags '("--disable-gssapi")
-
-       #:phases (alist-cons-after
-                 'unpack 'remote-dangling-symlink
-                 (lambda _
-                   ;; Remote the dangling symlinks since it breaks the
-                   ;; 'patch-source-shebangs' file tree traversal.
-                   (delete-file "INSTALL"))
-                 %standard-phases)))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remote-dangling-symlink
+           (lambda _
+             ;; Remove the dangling symlinks since it breaks the
+             ;; 'patch-source-shebangs' file tree traversal.
+             (delete-file "INSTALL"))))))
+    (inputs `(("mit-krb5" ,mit-krb5)))
     (home-page "http://sourceforge.net/projects/libtirpc/")
     (synopsis "Transport-independent Sun/ONC RPC implementation")
     (description
@@ -53,3 +54,32 @@
 procedure calls) protocol in a transport-independent manner.  It supports both
 IPv4 and IPv6.  ONC RPC is notably used by the network file system (NFS).")
     (license bsd-3)))
+
+(define-public rpcbind
+  (package
+    (name "rpcbind")
+    (version "0.2.3")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://sourceforge/" name "/" name "/"
+                          version "/"
+                          name "-" version ".tar.bz2"))
+      (sha256
+       (base32
+        "0yyjzv4161rqxrgjcijkrawnk55rb96ha0pav48s03l2klx855wq"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `("--with-systemdsystemunitdir=no" "--enable-warmstarts")))
+    (inputs
+     `(("libtirpc" ,libtirpc)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://rpcbind.sourceforge.net/")
+    (synopsis "Server to convert RPC program numbers into universal addresses")
+    (description
+     "@command{Rpcbind} is a server that converts RPC program numbers into
+universal addresses.")
+    (license bsd-3)))
+
diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm
index 6ae1275c96..8474904265 100644
--- a/gnu/packages/openstack.scm
+++ b/gnu/packages/openstack.scm
@@ -237,31 +237,42 @@ tested on Python version 3.2, 2.7 and 2.6.")
 (define-public python-requests-mock
   (package
     (name "python-requests-mock")
-    (version "0.7.0")
+    (version "1.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "requests-mock" version))
        (sha256
         (base32
-         "0s6mrpiv2w0km39qvl1pq2d56xblnm57p369qdp5j1a55ncica7f"))))
+         "0gcjjwsckhqixyffflc54i59x41jnbb37bli077vabii1bjmkin6"))))
     (build-system python-build-system)
     (propagated-inputs
-      `(("python-requests" ,python-requests)
-        ("python-six" ,python-six)))
+     `(("python-requests" ,python-requests)
+       ("python-six" ,python-six)))
     (inputs
-      `(("python-mock" ,python-mock)
-        ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)))
+     `(("python-pbr" ,python-pbr)))
+    (native-inputs
+     `(("python-discover" ,python-discover)
+       ("python-fixtures" ,python-fixtures)
+       ("python-mock" ,python-mock)
+       ("python-sphinx" ,python-sphinx)
+       ("python-testrepository" ,python-testrepository)
+       ("python-testtools" ,python-testtools)))
     (home-page "https://requests-mock.readthedocs.org/")
     (synopsis "Mock out responses from the requests package")
     (description
       "This module provides a building block to stub out the HTTP requests
 portions of your testing code.")
-    (license asl2.0)))
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-requests-mock))))))
 
 (define-public python2-requests-mock
-  (package-with-python2 python-requests-mock))
+  (let ((base (package-with-python2
+                (strip-python2-variant python-requests-mock))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
 
 (define-public python-stevedore
   (package
diff --git a/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch b/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch
new file mode 100644
index 0000000000..ccece0f466
--- /dev/null
+++ b/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch
@@ -0,0 +1,59 @@
+From a4b093f7366fdb429ca1781144d3985fa50d0fbb Mon Sep 17 00:00:00 2001
+From: Julien Grall <julien.grall@linaro.org>
+Date: Tue, 17 Mar 2015 16:00:34 +0000
+Subject: [PATCH] libfdt: Add missing functions to shared library
+
+The commit 4e76ec7 "libfdt: Add fdt_next_subnode() to permit easy
+subnode iteration" adds new functions (fdt_{first,next}_subnode) but
+forgot to mark them as 'global' in the shared library.
+
+Signed-off-by: Julien Grall <julien.grall@linaro.org>
+---
+ libfdt/version.lds | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libfdt/version.lds b/libfdt/version.lds
+index 80b322b..941208e 100644
+--- a/libfdt/version.lds
++++ b/libfdt/version.lds
+@@ -54,6 +54,8 @@ LIBFDT_1.2 {
+ 		fdt_get_property_by_offset;
+ 		fdt_getprop_by_offset;
+ 		fdt_next_property_offset;
++		fdt_first_subnode;
++		fdt_next_subnode;
+ 
+ 	local:
+ 		*;
+From f58799be130e27cc729cb2d45566daa0bb3b8605 Mon Sep 17 00:00:00 2001
+From: David Gibson <david@gibson.dropbear.id.au>
+Date: Tue, 1 Dec 2015 12:55:21 +1100
+Subject: [PATCH] libfdt: Add some missing symbols to version.lds
+
+Several functions in the header file were missing from the version.lds
+script, meaning that they couldn't be used from a libfdt shared library.
+
+Reported by Ken Aaker, via github issue tracker.
+
+Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
+---
+ libfdt/version.lds | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libfdt/version.lds b/libfdt/version.lds
+index f19f157..1f4e1ea 100644
+--- a/libfdt/version.lds
++++ b/libfdt/version.lds
+@@ -57,6 +57,10 @@ LIBFDT_1.2 {
+ 		fdt_next_property_offset;
+ 		fdt_first_subnode;
+ 		fdt_next_subnode;
++		fdt_address_cells;
++		fdt_size_cells;
++		fdt_stringlist_contains;
++		fdt_resize;
+ 
+ 	local:
+ 		*;
+-- 
+2.8.1
diff --git a/gnu/packages/patches/fossil-test-fixes.patch b/gnu/packages/patches/fossil-test-fixes.patch
deleted file mode 100644
index e6c9f3dd74..0000000000
--- a/gnu/packages/patches/fossil-test-fixes.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From upstream commit https://www.fossil-scm.org/fossil/info/19c216391a0ad79e
-
---- fossil-src-1.34/test/file1.test
-+++ fossil-src-1.34/test/file1.test
-@@ -15,10 +15,12 @@
- #
- ############################################################################
- #
- # File utilities
- #
-+
-+repo_init
- 
- proc simplify-name {testname args} {
-   set i 1
-   foreach {path result} $args {
-     fossil test-simplify-name $path
-@@ -65,10 +67,13 @@
- 
- if {$::tcl_platform(os)=="Windows NT"} {
-   simplify-name 108 //?/a:/a/b a:/a/b //?/UNC/a/b //a/b //?/ {}
-   simplify-name 109 \\\\?\\a:\\a\\b a:/a/b \\\\?\\UNC\\a\\b //a/b \\\\?\\ {}
- }
-+
-+# This is needed because we are now running outside of the Fossil checkout.
-+file mkdir file1; cd file1
- 
- # Those directories are only needed for the testcase being able to "--chdir" to it.
- file mkdir test1
- file mkdir test1/test2
-
-From upstream commit https://www.fossil-scm.org/fossil/info/ad6de6383391bd4d
- 
---- fossil-src-1.34/test/utf.test
-+++ fossil-src-1.34/test/utf.test
-@@ -39,26 +39,29 @@
-     test utf-check-$testname.$i {$::RESULT eq $result}
-     incr i
-   }
- }
- 
-+unset -nocomplain enc
- array set enc [list     \
-       0 binary          \
-       1 binary          \
-       2 unicode         \
-       3 unicode-reverse \
- ]
- 
-+unset -nocomplain bom
- array set bom [list                                         \
-       0 ""                                                  \
-       1 \xEF\xBB\xBF                                        \
-       2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
-             "\xFF\xFE" : "\xFE\xFF"}]                       \
-       3 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
-             "\xFE\xFF" : "\xFF\xFE"}]                       \
- ]
- 
-+unset -nocomplain data
- array set data [list                          \
-       0 ""                                    \
-       1 \r                                    \
-       2 \n                                    \
-       3 \r\n                                  \
-@@ -239,10 +242,11 @@
-     178 \xF4\x90\x80\x80\r                    \
-     179 \xF4\x90\x80\x80\n                    \
-     180 \xF4\x90\x80\x80\r\n                  \
- ]
- 
-+unset -nocomplain extraData
- array set extraData [list                     \
-       0 ""                                    \
-       1 Z                                     \
- ]
-
-Backport from upstream https://www.fossil-scm.org/fossil/info/60285f5876512817
-with additional non-zero exit in case of failures.
-
---- fossil-src-1.34/test/merge6.test
-+++ fossil-src-1.34/test/merge6.test
-@@ -62,6 +62,6 @@
- fossil ls
- 
- test merge_multi-4 {[normalize_result] eq {f1
- f2
- f3
--f4}}
-+f4}} knownBug
-
---- fossil-src-1.34/test/merge_renames.test
-+++ fossil-src-1.34/test/merge_renames.test
-@@ -156,13 +156,13 @@
- }
- 
- if {$deletes!=0} {
-     # failed
-     protOut "Error, the merge should not delete any file"
--    test merge_renames-2 0
-+    test merge_renames-3 0
- } else {
--    test merge_renames-2 1
-+    test merge_renames-3 1
- }
- 
- ######################################
- #  Test 4                            #
- #  Reported: Ticket [67176c3aa4]     #
-@@ -198,14 +198,14 @@
- 
- fossil ls
- 
- test merge_renames-5 {[normalize_result] eq {f1
- f2
--f3}}
-+f3}} knownBug
- 
- ######################################
- #
- # Tests for troubles not specifically linked with renames but that I'd like to
- # write:
- #  [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
- #  [953031915f] - Lack of warning when overwriting extra files
- #  [4df5f38f1e] - Troubles merging a file delete with a file change
-
---- fossil-src-1.34/test/tester.tcl
-+++ fossil-src-1.34/test/tester.tcl
-@@ -58,10 +58,18 @@
-   set VERBOSE 1
-   set argv [lreplace $argv $i $i]
- } else {
-   set VERBOSE 0
- }
-+
-+set i [lsearch $argv -strict]
-+if {$i>=0} {
-+  set STRICT 1
-+  set argv [lreplace $argv $i $i]
-+} else {
-+  set STRICT 0
-+}
- 
- if {[llength $argv]==0} {
-   foreach f [lsort [glob $testdir/*.test]] {
-     set base [file root [file tail $f]]
-     lappend argv $base
-@@ -327,20 +335,30 @@
- }
- 
- # Perform a test
- #
- set test_count 0
--proc test {name expr} {
-+proc test {name expr {constraints ""}} {
-   global bad_test test_count
-   incr test_count
-+  set knownBug [expr {"knownBug" in $constraints}]
-   set r [uplevel 1 [list expr $expr]]
-   if {$r} {
--    protOut "test $name OK"
-+    if {$knownBug && !$::STRICT} {
-+      protOut "test $name OK (knownBug)?"
-+    } else {
-+      protOut "test $name OK"
-+    }
-   } else {
--    protOut "test $name FAILED!"
--    lappend bad_test $name
--    if {$::HALT} exit
-+    if {$knownBug && !$::STRICT} {
-+      protOut "test $name FAILED (knownBug)!"
-+    } else {
-+      protOut "test $name FAILED!"
-+      if {$::VERBOSE} {protOut "RESULT: $RESULT"}
-+      lappend bad_test $name
-+      if {$::HALT} exit
-+    }
-   }
- }
- set bad_test {}
- 
- # Return a random string N characters long.
-@@ -445,4 +455,5 @@
- protOut "***** Final result: $nErr errors out of $test_count tests"
- if {$nErr>0} {
-   protOut "***** Failures: $bad_test"
-+  exit 1
- }
diff --git a/gnu/packages/patches/icedtea-remove-overrides.patch b/gnu/packages/patches/icedtea-remove-overrides.patch
deleted file mode 100644
index e4d68a9e58..0000000000
--- a/gnu/packages/patches/icedtea-remove-overrides.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-Upstream patch:
-http://icedtea.classpath.org/hg/icedtea6/rev/60be25a84f2d
-
-Fixes build failure:
-http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2954
-
-Changes to the files 'NEWS' and 'ChangeLog' are omitted here.
-
-# HG changeset patch
-# User Andrew John Hughes <gnu.andrew@redhat.com>
-# Date 1463144538 -3600
-# Node ID 60be25a84f2dd2bce8ff277cc3854cca1b3f7931
-# Parent  c23ceebb80a19a33316f1e743eb93bdf79aac220
-PR2954: ecj/override.patch is missing new @Overrides in RMIJRMPServerImpl.java
-
-2016-05-13  Andrew John Hughes  <gnu.andrew@redhat.com>
-
-	PR2954: ecj/override.patch is missing new
-	@Overrides in RMIJRMPServerImpl.java
-	* patches/ecj/override.patch:
-	Add cases in RMIJRMPServerImpl and others
-	which show up when source/target 5 is
-	used in the rt-class-files pre-build.
-	* patches/openjdk/8014205-blank_swing_dialogs_windows.patch:
-	Remove addition of @Override.
-
-diff -r c23ceebb80a1 -r 60be25a84f2d patches/ecj/override.patch
---- a/patches/ecj/override.patch	Sun May 08 21:28:21 2016 +0100
-+++ b/patches/ecj/override.patch	Fri May 13 14:02:18 2016 +0100
-@@ -362,3 +362,240 @@
-              public Class<?> run() {
-                  try {
-                      ReflectUtil.checkPackageAccess(className);
-+diff -r 545db1dd8c2a src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java
-+--- openjdk-ecj/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Thu May 12 01:30:54 2016 +0100
-+@@ -1870,7 +1870,6 @@
-+ 
-+     private ModifiableClassLoaderRepository getInstantiatorCLR() {
-+         return AccessController.doPrivileged(new PrivilegedAction<ModifiableClassLoaderRepository>() {
-+-            @Override
-+             public ModifiableClassLoaderRepository run() {
-+                 return instantiator != null ? instantiator.getClassLoaderRepository() : null;
-+             }
-+diff -r 545db1dd8c2a src/share/classes/com/sun/media/sound/Platform.java
-+--- openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/Platform.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/Platform.java	Thu May 12 01:30:54 2016 +0100
-+@@ -160,7 +160,6 @@
-+         try {
-+             // load the main library
-+             AccessController.doPrivileged(new PrivilegedAction<Void>() {
-+-                @Override
-+                 public Void run() {
-+                     System.loadLibrary(libNameMain);
-+                     return null;
-+@@ -182,7 +181,6 @@
-+             final String lib = st.nextToken();
-+             try {
-+                 AccessController.doPrivileged(new PrivilegedAction<Void>() {
-+-                    @Override
-+                     public Void run() {
-+                         System.loadLibrary(lib);
-+                         return null;
-+diff -r 545db1dd8c2a src/share/classes/java/awt/EventQueue.java
-+--- openjdk-ecj/jdk/src/share/classes/java/awt/EventQueue.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/java/awt/EventQueue.java	Thu May 12 01:30:54 2016 +0100
-+@@ -190,7 +190,6 @@
-+                     EventQueue.invokeAndWait(source, r);
-+                 }
-+ 
-+-                @Override
-+                 public long getMostRecentEventTime(EventQueue eventQueue) {
-+                     return eventQueue.getMostRecentEventTimeImpl();
-+                 }
-+diff -r 545db1dd8c2a src/share/classes/java/io/ObjectInputStream.java
-+--- openjdk-ecj/jdk/src/share/classes/java/io/ObjectInputStream.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/java/io/ObjectInputStream.java	Thu May 12 01:30:54 2016 +0100
-+@@ -3571,7 +3571,6 @@
-+     }
-+     static {
-+         SharedSecrets.setJavaObjectInputStreamAccess(new JavaObjectInputStreamAccess() {
-+-            @Override
-+             public void setValidator(ObjectInputStream ois, ObjectStreamClassValidator validator) {
-+                 ObjectInputStream.setValidator(ois, validator);
-+             }
-+diff -r 545db1dd8c2a src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java
-+--- openjdk-ecj/jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java	Thu May 12 01:30:54 2016 +0100
-+@@ -64,7 +64,6 @@
-+         final String propName = "sun.rmi.server.invocationhandler.allowFinalizeInvocation";
-+         String allowProp = java.security.AccessController.doPrivileged(
-+             new PrivilegedAction<String>() {
-+-                @Override
-+                 public String run() {
-+                     return System.getProperty(propName);
-+                 }
-+diff -r 545db1dd8c2a src/share/classes/sun/awt/image/SunVolatileImage.java
-+--- openjdk-ecj/jdk/src/share/classes/sun/awt/image/SunVolatileImage.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/sun/awt/image/SunVolatileImage.java	Thu May 12 01:30:54 2016 +0100
-+@@ -262,7 +262,6 @@
-+      *
-+      * @see sun.java2d.DestSurfaceProvider#getDestSurface
-+      */
-+-    @Override
-+     public Surface getDestSurface() {
-+         return volSurfaceManager.getPrimarySurfaceData();
-+     }
-+diff -r 545db1dd8c2a src/share/classes/sun/java2d/SunGraphics2D.java
-+--- openjdk-ecj/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/sun/java2d/SunGraphics2D.java	Thu May 12 01:30:54 2016 +0100
-+@@ -3294,7 +3294,6 @@
-+      *
-+      * @see sun.java2d.DestSurfaceProvider#getDestSurface
-+      */
-+-    @Override
-+     public Surface getDestSurface() {
-+         return surfaceData;
-+     }
-+diff -r 545db1dd8c2a src/share/classes/sun/rmi/server/UnicastServerRef.java
-+--- openjdk-ecj/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java	Thu May 12 01:30:54 2016 +0100
-+@@ -630,12 +630,10 @@
-+             this.callID = callID;
-+         }
-+ 
-+-        @Override
-+         public void validateDescriptor(ObjectStreamClass descriptor) {
-+             descriptorCheck.check(method, descriptor, parameterIndex, callID);
-+         }
-+ 
-+-        @Override
-+         public void checkProxyInterfaceNames(String[] ifaces) {
-+             descriptorCheck.checkProxyClass(method, ifaces, parameterIndex, callID);
-+         }
-+diff -r 545db1dd8c2a src/share/classes/sun/rmi/transport/Transport.java
-+--- openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/Transport.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/Transport.java	Thu May 12 01:30:54 2016 +0100
-+@@ -133,7 +133,6 @@
-+      */
-+     private static void setContextClassLoader(final ClassLoader ccl) {
-+         AccessController.doPrivileged(new PrivilegedAction<Void> () {
-+-                @Override
-+                 public Void run() {
-+                     Thread.currentThread().setContextClassLoader(ccl);
-+                     return null;
-+diff -r 545db1dd8c2a src/share/classes/sun/rmi/transport/tcp/TCPTransport.java
-+--- openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java	Thu May 12 01:30:54 2016 +0100
-+@@ -676,7 +676,6 @@
-+                           connectionCount.incrementAndGet() +
-+                           ")-" + remoteHost);
-+                 AccessController.doPrivileged(new PrivilegedAction<Void>() {
-+-                    @Override
-+                     public Void run() {
-+                         run0();
-+                         return null;
-+diff -r 545db1dd8c2a src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java
-+--- openjdk-ecj/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java	Thu May 12 01:30:54 2016 +0100
-+@@ -92,7 +92,6 @@
-+         return this;
-+     }
-+ 
-+-    @Override
-+     public SurfaceData createManagedSurface(int w, int h, int transparency) {
-+         return GLXSurfaceData.createData(this, w, h,
-+                                          getColorModel(transparency),
-+@@ -165,12 +164,10 @@
-+      * Returns true if the provided capability bit is present for this config.
-+      * See OGLContext.java for a list of supported capabilities.
-+      */
-+-    @Override
-+     public final boolean isCapPresent(int cap) {
-+         return ((oglCaps.getCaps() & cap) != 0);
-+     }
-+ 
-+-    @Override
-+     public final long getNativeConfigInfo() {
-+         return pConfigInfo;
-+     }
-+@@ -180,7 +177,6 @@
-+      *
-+      * @see sun.java2d.pipe.hw.BufferedContextProvider#getContext
-+      */
-+-    @Override
-+     public final OGLContext getContext() {
-+         return context;
-+     }
-+@@ -394,7 +390,6 @@
-+      *
-+      * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
-+      */
-+-    @Override
-+     public VolatileImage
-+         createCompatibleVolatileImage(int width, int height,
-+                                       int transparency, int type)
-+@@ -434,17 +429,14 @@
-+      *
-+      * @see sun.java2d.pipe.hw.AccelGraphicsConfig#getContextCapabilities
-+      */
-+-    @Override
-+     public ContextCapabilities getContextCapabilities() {
-+         return oglCaps;
-+     }
-+ 
-+-    @Override
-+     public void addDeviceEventListener(AccelDeviceEventListener l) {
-+         AccelDeviceEventNotifier.addListener(l, screen.getScreen());
-+     }
-+ 
-+-    @Override
-+     public void removeDeviceEventListener(AccelDeviceEventListener l) {
-+         AccelDeviceEventNotifier.removeListener(l);
-+     }
-+diff -r 545db1dd8c2a src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java
-+--- openjdk-ecj/jdk/src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java	Wed May 04 23:23:55 2016 +0100
-++++ openjdk-ecj/jdk/src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java	Thu May 12 01:51:42 2016 +0100
-+@@ -236,7 +236,6 @@
-+         final MBeanInstantiator fInstantiator = instantiator;
-+         this.secureClr = new
-+             SecureClassLoaderRepository(AccessController.doPrivileged(new PrivilegedAction<ClassLoaderRepository>() {
-+-                @Override
-+                 public ClassLoaderRepository run() {
-+                     return fInstantiator.getClassLoaderRepository();
-+                 }
-+@@ -1257,7 +1256,6 @@
-+         ClassLoader myLoader = outerShell.getClass().getClassLoader();
-+         final ModifiableClassLoaderRepository loaders = AccessController.doPrivileged(new PrivilegedAction<ModifiableClassLoaderRepository>() {
-+ 
-+-            @Override
-+             public ModifiableClassLoaderRepository run() {
-+                 return instantiator.getClassLoaderRepository();
-+             }
-+diff -r b72e7b89dda9 src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java
-+--- openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java	Thu Sep 08 11:00:33 2011 -0700
-++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java	Thu May 12 16:39:37 2016 +0100
-+@@ -227,17 +227,14 @@
-+             allowedTypes = credentialsTypes;
-+         }
-+ 
-+-        @Override
-+         public String getVersion() throws RemoteException {
-+             return impl.getVersion();
-+         }
-+ 
-+-        @Override
-+         public RMIConnection newClient(Object credentials) throws IOException {
-+             return impl.newClient(credentials);
-+         }
-+ 
-+-        @Override
-+         public void check(Method method, ObjectStreamClass descriptor,
-+                 int paramIndex, int callID) {
-+ 
-+@@ -247,7 +244,6 @@
-+             }
-+         }
-+ 
-+-        @Override
-+         public void checkProxyClass(Method method, String[] ifaces,
-+                 int paramIndex, int callID) {
-+             if (ifaces != null && ifaces.length > 0) {
-+@@ -259,7 +255,6 @@
-+             }
-+         }
-+ 
-+-        @Override
-+         public void end(int callID) {
-+             /* Do nothing */
-+         }
-diff -r c23ceebb80a1 -r 60be25a84f2d patches/openjdk/8014205-blank_swing_dialogs_windows.patch
---- a/patches/openjdk/8014205-blank_swing_dialogs_windows.patch	Sun May 08 21:28:21 2016 +0100
-+++ b/patches/openjdk/8014205-blank_swing_dialogs_windows.patch	Fri May 13 14:02:18 2016 +0100
-@@ -116,7 +116,7 @@
-              {
-                  if (numBands == 3 && !ccm.hasAlpha()) {
-                      imageType = TYPE_3BYTE_BGR;
--@@ -804,6 +801,27 @@
-+@@ -804,6 +801,26 @@
-          }   // else if ((raster instanceof ByteComponentRaster) &&
-      }
-  
-@@ -129,7 +129,6 @@
- +                new PrivilegedAction<Boolean>()
- +        {
- +
--+            @Override
- +            public Boolean run() {
- +                final ClassLoader std = System.class.getClassLoader();
- +
-
diff --git a/gnu/packages/patches/libtiff-CVE-2016-3623.patch b/gnu/packages/patches/libtiff-CVE-2016-3623.patch
new file mode 100644
index 0000000000..08705861e3
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-3623.patch
@@ -0,0 +1,30 @@
+Fix CVE-2016-3623.
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3623
+http://bugzilla.maptools.org/show_bug.cgi?id=2569
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.16 -r1.17 tools/rgb2ycbcr.c
+
+Index: tools/rgb2ycbcr.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/rgb2ycbcr.c,v
+retrieving revision 1.16
+retrieving revision 1.17
+diff -u -r1.16 -r1.17
+--- libtiff/tools/rgb2ycbcr.c	21 Jun 2015 01:09:10 -0000	1.16
++++ libtiff/tools/rgb2ycbcr.c	15 Aug 2016 21:26:56 -0000	1.17
+@@ -95,9 +95,13 @@
+ 			break;
+ 		case 'h':
+ 			horizSubSampling = atoi(optarg);
++            if( horizSubSampling != 1 && horizSubSampling != 2 && horizSubSampling != 4 )
++                usage(-1);
+ 			break;
+ 		case 'v':
+ 			vertSubSampling = atoi(optarg);
++            if( vertSubSampling != 1 && vertSubSampling != 2 && vertSubSampling != 4 )
++                usage(-1);
+ 			break;
+ 		case 'r':
+ 			rowsperstrip = atoi(optarg);
diff --git a/gnu/packages/patches/libtiff-CVE-2016-3945.patch b/gnu/packages/patches/libtiff-CVE-2016-3945.patch
new file mode 100644
index 0000000000..8ec62bab99
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-3945.patch
@@ -0,0 +1,94 @@
+Fix CVE-2016-3945 (integer overflow in size of allocated
+buffer, when -b mode is enabled, that could result in out-of-bounds
+write).
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3945
+http://bugzilla.maptools.org/show_bug.cgi?id=2545
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.21 -r1.22 tools/tiff2rgba.c
+
+Index: tools/tiff2rgba.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiff2rgba.c,v
+retrieving revision 1.21
+retrieving revision 1.22
+diff -u -r1.21 -r1.22
+--- libtiff/tools/tiff2rgba.c	21 Jun 2015 01:09:10 -0000	1.21
++++ libtiff/tools/tiff2rgba.c	15 Aug 2016 20:06:41 -0000	1.22
+@@ -147,6 +147,7 @@
+     uint32  row, col;
+     uint32  *wrk_line;
+     int	    ok = 1;
++    uint32  rastersize, wrk_linesize;
+ 
+     TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
+     TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
+@@ -163,7 +164,13 @@
+     /*
+      * Allocate tile buffer
+      */
+-    raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32));
++    rastersize = tile_width * tile_height * sizeof (uint32);
++    if (tile_width != (rastersize / tile_height) / sizeof( uint32))
++    {
++	TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer");
++	exit(-1);
++    }
++    raster = (uint32*)_TIFFmalloc(rastersize);
+     if (raster == 0) {
+         TIFFError(TIFFFileName(in), "No space for raster buffer");
+         return (0);
+@@ -173,7 +180,13 @@
+      * Allocate a scanline buffer for swapping during the vertical
+      * mirroring pass.
+      */
+-    wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32));
++    wrk_linesize = tile_width * sizeof (uint32);
++    if (tile_width != wrk_linesize / sizeof (uint32))
++    {
++        TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer");
++	exit(-1);
++    }
++    wrk_line = (uint32*)_TIFFmalloc(wrk_linesize);
+     if (!wrk_line) {
+         TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
+         ok = 0;
+@@ -249,6 +262,7 @@
+     uint32  row;
+     uint32  *wrk_line;
+     int	    ok = 1;
++    uint32  rastersize, wrk_linesize;
+ 
+     TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
+     TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
+@@ -263,7 +277,13 @@
+     /*
+      * Allocate strip buffer
+      */
+-    raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32));
++    rastersize = width * rowsperstrip * sizeof (uint32);
++    if (width != (rastersize / rowsperstrip) / sizeof( uint32))
++    {
++	TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer");
++	exit(-1);
++    }
++    raster = (uint32*)_TIFFmalloc(rastersize);
+     if (raster == 0) {
+         TIFFError(TIFFFileName(in), "No space for raster buffer");
+         return (0);
+@@ -273,7 +293,13 @@
+      * Allocate a scanline buffer for swapping during the vertical
+      * mirroring pass.
+      */
+-    wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32));
++    wrk_linesize = width * sizeof (uint32);
++    if (width != wrk_linesize / sizeof (uint32))
++    {
++        TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer");
++	exit(-1);
++    }
++    wrk_line = (uint32*)_TIFFmalloc(wrk_linesize);
+     if (!wrk_line) {
+         TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
+         ok = 0;
diff --git a/gnu/packages/patches/libtiff-CVE-2016-3990.patch b/gnu/packages/patches/libtiff-CVE-2016-3990.patch
new file mode 100644
index 0000000000..7641c3073b
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-3990.patch
@@ -0,0 +1,31 @@
+Fix CVE-2016-3990 (write buffer overflow in PixarLogEncode if more input
+samples are provided than expected by PixarLogSetupEncode).
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3990
+http://bugzilla.maptools.org/show_bug.cgi?id=2544
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.45 -r1.46 libtiff/tif_pixarlog.c
+
+Index: libtiff/tif_pixarlog.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_pixarlog.c,v
+retrieving revision 1.45
+retrieving revision 1.46
+diff -u -r1.45 -r1.46
+--- libtiff/libtiff/tif_pixarlog.c	28 Jun 2016 15:37:33 -0000	1.45
++++ libtiff/libtiff/tif_pixarlog.c	15 Aug 2016 20:49:48 -0000	1.46
+@@ -1141,6 +1141,13 @@
+ 	}
+ 
+ 	llen = sp->stride * td->td_imagewidth;
++    /* Check against the number of elements (of size uint16) of sp->tbuf */
++    if( n > td->td_rowsperstrip * llen )
++    {
++        TIFFErrorExt(tif->tif_clientdata, module,
++                     "Too many input bytes provided");
++        return 0;
++    }
+ 
+ 	for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
+ 		switch (sp->user_datafmt)  {
diff --git a/gnu/packages/patches/libtiff-CVE-2016-3991.patch b/gnu/packages/patches/libtiff-CVE-2016-3991.patch
new file mode 100644
index 0000000000..cb05f0007f
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-3991.patch
@@ -0,0 +1,123 @@
+Fix CVE-2016-3991 (out-of-bounds write in loadImage()).
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3991
+http://bugzilla.maptools.org/show_bug.cgi?id=2543
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.37 -r1.38 tools/tiffcrop.c
+
+Index: tools/tiffcrop.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiffcrop.c,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -r1.37 -r1.38
+--- libtiff/tools/tiffcrop.c	11 Jul 2016 21:38:31 -0000	1.37
++++ libtiff/tools/tiffcrop.c	15 Aug 2016 21:05:40 -0000	1.38
+@@ -798,6 +798,11 @@
+     }
+ 
+   tile_buffsize = tilesize;
++  if (tilesize == 0 || tile_rowsize == 0)
++  {
++     TIFFError("readContigTilesIntoBuffer", "Tile size or tile rowsize is zero");
++     exit(-1);
++  }
+ 
+   if (tilesize < (tsize_t)(tl * tile_rowsize))
+     {
+@@ -807,7 +812,12 @@
+               tilesize, tl * tile_rowsize);
+ #endif
+     tile_buffsize = tl * tile_rowsize;
+-    } 
++    if (tl != (tile_buffsize / tile_rowsize))
++    {
++    	TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
++        exit(-1);
++    }
++    }
+ 
+   tilebuf = _TIFFmalloc(tile_buffsize);
+   if (tilebuf == 0)
+@@ -1210,6 +1220,12 @@
+       !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps) )
+       return 1;
+ 
++  if (tilesize == 0 || tile_rowsize == 0 || tl == 0 || tw == 0)
++  {
++    TIFFError("writeBufferToContigTiles", "Tile size, tile row size, tile width, or tile length is zero");
++    exit(-1);
++  }
++  
+   tile_buffsize = tilesize;
+   if (tilesize < (tsize_t)(tl * tile_rowsize))
+     {
+@@ -1219,6 +1235,11 @@
+               tilesize, tl * tile_rowsize);
+ #endif
+     tile_buffsize = tl * tile_rowsize;
++    if (tl != tile_buffsize / tile_rowsize)
++    {
++	TIFFError("writeBufferToContigTiles", "Integer overflow when calculating buffer size");
++	exit(-1);
++    }
+     }
+ 
+   tilebuf = _TIFFmalloc(tile_buffsize);
+@@ -5945,12 +5966,27 @@
+     TIFFGetField(in, TIFFTAG_TILELENGTH, &tl);
+ 
+     tile_rowsize  = TIFFTileRowSize(in);      
++    if (ntiles == 0 || tlsize == 0 || tile_rowsize == 0)
++    {
++	TIFFError("loadImage", "File appears to be tiled, but the number of tiles, tile size, or tile rowsize is zero.");
++	exit(-1);
++    }
+     buffsize = tlsize * ntiles;
++    if (tlsize != (buffsize / ntiles))
++    {
++	TIFFError("loadImage", "Integer overflow when calculating buffer size");
++	exit(-1);
++    }
+ 
+-        
+     if (buffsize < (uint32)(ntiles * tl * tile_rowsize))
+       {
+       buffsize = ntiles * tl * tile_rowsize;
++      if (ntiles != (buffsize / tl / tile_rowsize))
++      {
++	TIFFError("loadImage", "Integer overflow when calculating buffer size");
++	exit(-1);
++      }
++      
+ #ifdef DEBUG2
+       TIFFError("loadImage",
+ 	        "Tilesize %u is too small, using ntiles * tilelength * tilerowsize %lu",
+@@ -5969,8 +6005,25 @@
+     TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
+     stsize = TIFFStripSize(in);
+     nstrips = TIFFNumberOfStrips(in);
++    if (nstrips == 0 || stsize == 0)
++    {
++	TIFFError("loadImage", "File appears to be striped, but the number of stipes or stripe size is zero.");
++	exit(-1);
++    }
++
+     buffsize = stsize * nstrips;
+-    
++    if (stsize != (buffsize / nstrips))
++    {
++	TIFFError("loadImage", "Integer overflow when calculating buffer size");
++	exit(-1);
++    }
++    uint32 buffsize_check;
++    buffsize_check = ((length * width * spp * bps) + 7);
++    if (length != ((buffsize_check - 7) / width / spp / bps))
++    {
++	TIFFError("loadImage", "Integer overflow detected.");
++	exit(-1);
++    }
+     if (buffsize < (uint32) (((length * width * spp * bps) + 7) / 8))
+       {
+       buffsize =  ((length * width * spp * bps) + 7) / 8;
diff --git a/gnu/packages/patches/libtiff-CVE-2016-5314.patch b/gnu/packages/patches/libtiff-CVE-2016-5314.patch
new file mode 100644
index 0000000000..e5380f8639
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-5314.patch
@@ -0,0 +1,45 @@
+Fix CVE-2016-5314.
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5314
+bugzilla.maptools.org/show_bug.cgi?id=2554
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.43 -r1.44 libtiff/tif_pixarlog.c
+
+Index: libtiff/tif_pixarlog.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_pixarlog.c,v
+retrieving revision 1.43
+retrieving revision 1.44
+diff -u -r1.43 -r1.44
+--- libtiff/libtiff/tif_pixarlog.c	27 Dec 2015 20:14:11 -0000	1.43
++++ libtiff/libtiff/tif_pixarlog.c	28 Jun 2016 15:12:19 -0000	1.44
+@@ -459,6 +459,7 @@
+ typedef	struct {
+ 	TIFFPredictorState	predict;
+ 	z_stream		stream;
++	tmsize_t		tbuf_size; /* only set/used on reading for now */
+ 	uint16			*tbuf; 
+ 	uint16			stride;
+ 	int			state;
+@@ -694,6 +695,7 @@
+ 	sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
+ 	if (sp->tbuf == NULL)
+ 		return (0);
++	sp->tbuf_size = tbuf_size;
+ 	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
+ 		sp->user_datafmt = PixarLogGuessDataFmt(td);
+ 	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
+@@ -783,6 +785,12 @@
+ 		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
+ 		return (0);
+ 	}
++	/* Check that we will not fill more than what was allocated */
++	if (sp->stream.avail_out > sp->tbuf_size)
++	{
++		TIFFErrorExt(tif->tif_clientdata, module, "sp->stream.avail_out > sp->tbuf_size");
++		return (0);
++	}
+ 	do {
+ 		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
+ 		if (state == Z_STREAM_END) {
diff --git a/gnu/packages/patches/libtiff-CVE-2016-5321.patch b/gnu/packages/patches/libtiff-CVE-2016-5321.patch
new file mode 100644
index 0000000000..2afca18e1d
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-5321.patch
@@ -0,0 +1,25 @@
+Fix CVE-2016-5321. 
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5321
+http://bugzilla.maptools.org/show_bug.cgi?id=2558
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.35 -r1.36 tools/tiffcrop.c
+
+Index: tools/tiffcrop.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiffcrop.c,v
+retrieving revision 1.35
+retrieving revision 1.36
+diff -u -r1.35 -r1.36
+--- libtiff/tools/tiffcrop.c	19 Aug 2015 02:31:04 -0000	1.35
++++ libtiff/tools/tiffcrop.c	11 Jul 2016 21:26:03 -0000	1.36
+@@ -989,7 +989,7 @@
+     nrow = (row + tl > imagelength) ? imagelength - row : tl;
+     for (col = 0; col < imagewidth; col += tw)
+       {
+-      for (s = 0; s < spp; s++)
++      for (s = 0; s < spp && s < MAX_SAMPLES; s++)
+         {  /* Read each plane of a tile set into srcbuffs[s] */
+ 	tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
+         if (tbytes < 0  && !ignore)
diff --git a/gnu/packages/patches/libtiff-CVE-2016-5323.patch b/gnu/packages/patches/libtiff-CVE-2016-5323.patch
new file mode 100644
index 0000000000..8b2a043d29
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-5323.patch
@@ -0,0 +1,88 @@
+Fix CVE-2016-5323.
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5323
+http://bugzilla.maptools.org/show_bug.cgi?id=2559
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.36  -r1.37 tools/tiffcrop.c
+
+Index: tools/tiffcrop.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiffcrop.c,v
+retrieving revision 1.36
+retrieving revision 1.37
+diff -u -r1.36 -r1.37
+--- libtiff/tools/tiffcrop.c	11 Jul 2016 21:26:03 -0000	1.36
++++ libtiff/tools/tiffcrop.c	11 Jul 2016 21:38:31 -0000	1.37
+@@ -3738,7 +3738,7 @@
+ 
+       matchbits = maskbits << (8 - src_bit - bps); 
+       /* load up next sample from each plane */
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         buff1 = ((*src) & matchbits) << (src_bit);
+@@ -3837,7 +3837,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (16 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         if (little_endian)
+@@ -3947,7 +3947,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (32 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         if (little_endian)
+@@ -4073,7 +4073,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (64 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ 	{
+ 	src = in[s] + src_offset + src_byte;
+ 	if (little_endian)
+@@ -4263,7 +4263,7 @@
+ 
+       matchbits = maskbits << (8 - src_bit - bps); 
+       /* load up next sample from each plane */
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         buff1 = ((*src) & matchbits) << (src_bit);
+@@ -4362,7 +4362,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (16 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         if (little_endian)
+@@ -4471,7 +4471,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (32 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+         {
+ 	src = in[s] + src_offset + src_byte;
+         if (little_endian)
+@@ -4597,7 +4597,7 @@
+       src_bit  = bit_offset % 8;
+ 
+       matchbits = maskbits << (64 - src_bit - bps); 
+-      for (s = 0; s < spp; s++)
++      for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ 	{
+ 	src = in[s] + src_offset + src_byte;
+ 	if (little_endian)
diff --git a/gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch b/gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch
deleted file mode 100644
index 4ed7ab00bf..0000000000
--- a/gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Allow builds with glibc 2.20.
-Based on a patch by Peter Hutterer <peter.hutterer@who-t.net>.
-See <https://raw.githubusercontent.com/openembedded/oe-core/master/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/always_include_xorg_server.h.patch>.
-
---- xf86-video-openchrome-0.3.3/src/via_3d.h.~1~	2013-05-23 11:11:28.000000000 -0400
-+++ xf86-video-openchrome-0.3.3/src/via_3d.h	2014-12-19 01:17:04.000953259 -0500
-@@ -24,6 +24,8 @@
- #ifndef VIA_3D_H
- #define VIA_3D_H
- 
-+#include <xorg-server.h>
-+
- #include "xf86.h"
- #include "via_dmabuffer.h"
- 
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 09452f3142..8b52548065 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
+;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,12 +43,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages python)
-  #:use-module ((guix licenses)
-                #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
-                          gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
-                          isc mpl2.0 psfl public-domain repoze unlicense x11-style
-                          zpl2.1 lgpl3))
-  #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages adns)
@@ -298,7 +294,7 @@ introspection capabilities; intuitive object orientation; natural
 expression of procedural code; full modularity, supporting hierarchical
 packages; exception-based error handling; and very high level dynamic
 data types.")
-    (license psfl)))
+    (license license:psfl)))
 
 ;; Current 2.x version.
 (define-public python-2 python-2.7)
@@ -418,7 +414,7 @@ limiting process resources and management of running processes.  It implements
 many functionalities offered by command line tools such as: ps, top, lsof,
 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
 pidof, tty, taskset, pmap.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-psutil
   (package-with-python2 python-psutil))
@@ -456,7 +452,7 @@ cross-platform implementations of over 30 password hashing algorithms, as well
 as a framework for managing existing password hashes.  It's designed to be
 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
 to providing full-strength password hashing for multi-user application.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-passlib
   (package-with-python2 python-passlib))
@@ -493,7 +489,7 @@ John the Ripper).")
     ;; "sha2.c" is under BSD-3;
     ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
     ;; the rest is under ISC.
-    (license (list isc bsd-3 bsd-4))))
+    (license (list license:isc license:bsd-3 license:bsd-4))))
 
 (define-public python2-py-bcrypt
   (package-with-python2 python-py-bcrypt))
@@ -523,7 +519,7 @@ John the Ripper).")
 providing both client and server functionality.  While it leverages a Python C
 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
 Python interface around SSH networking concepts.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-paramiko
   (package-with-python2 python-paramiko))
@@ -608,7 +604,7 @@ making them easy to handle and incorporate into other protocols.")
     (synopsis "Cassandra Cluster Manager")
     (description "A script/library to create, launch and remove an Apache
 Cassandra cluster on localhost.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-ccm
   (package-with-python2 python-ccm))
@@ -662,7 +658,7 @@ using Python 2.4 or higher and provides access to the Olson timezone database.")
 - a Python interface to the CLDR (Common Locale Data Repository), providing
 access to various locale display names, localized number and date formatting,
 etc. ")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-babel
   (package-with-python2 python-babel))
@@ -694,7 +690,7 @@ etc. ")
 earlier versions of Python.  The function checks the hostname in the
 certificate returned by the server to which a connection has been established,
 and verifies that it matches the intended target hostname.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python-h5py
   (package
@@ -740,7 +736,7 @@ HDF5 library from Python.  The low-level interface is intended to be a
 complete wrapping of the HDF5 API, while the high-level component supports
 access to HDF5 files, datasets and groups using established Python and NumPy
 concepts.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-h5py))))))
 
 (define-public python2-h5py
@@ -832,7 +828,7 @@ test hooks,
 project installation,
 platform-specific details,
 Python 3 support.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-setuptools
   (package-with-python2 python-setuptools))
@@ -870,7 +866,7 @@ Python 3 support.")
      "Pycrypto is a collection of both secure hash functions (such as SHA256
 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
 etc.).  The package is structured to make adding new modules easy.")
-    (license public-domain)))
+    (license license:public-domain)))
 
 (define-public python2-pycrypto
   (let ((pycrypto (package-with-python2 python-pycrypto)))
@@ -906,7 +902,7 @@ etc.).  The package is structured to make adding new modules easy.")
 service from python.  It can be used in any application that needs safe
 password storage.")
     ;; "MIT" and PSF dual license
-    (license x11)
+    (license license:x11)
     (properties `((python2-variant . ,(delay python2-keyring))))))
 
 (define-public python2-keyring
@@ -938,7 +934,7 @@ functions for smoothing over the differences between the Python versions with
 the goal of writing Python code that is compatible on both Python versions.
 Six supports every Python version since 2.5.  It is contained in only one
 Python file, so it can be easily copied into your project.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python2-six
   (package-with-python2 python-six))
@@ -962,7 +958,7 @@ Python file, so it can be easily copied into your project.")
     (description
      "The dateutil module provides powerful extensions to the standard
 datetime module, available in Python 2.3+.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-dateutil-2))))))
 
 (define-public python2-dateutil-2
@@ -992,7 +988,7 @@ datetime module, available in Python 2.3+.")
     (description
      "The dateutil module provides powerful extensions to the standard
 datetime module, available in Python 2.3+.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-dateutil
   (package-with-python2 python-dateutil))
@@ -1017,7 +1013,7 @@ datetime module, available in Python 2.3+.")
      "Parse human-readable date/time text")
     (description
      "Parse human-readable date/time text.")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-parsedatetime))))))
 
 (define-public python2-parsedatetime
@@ -1056,7 +1052,7 @@ structures designed to make working with structured (tabular,
 multidimensional, potentially heterogeneous) and time series data both easy
 and intuitive.  It aims to be the fundamental high-level building block for
 doing practical, real world data analysis in Python.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-pandas))))))
 
 (define-public python2-pandas
@@ -1087,7 +1083,7 @@ doing practical, real world data analysis in Python.")
 This module attempts to fix a glaring hole in pytz, that there is no way to
 get the local timezone information, unless you know the zoneinfo name, and
 under several distributions that's hard or impossible to figure out.")
-    (license cc0)))
+    (license license:cc0)))
 
 (define-public python2-pysqlite
   (package
@@ -1145,8 +1141,9 @@ Database API 2.0T.")
     (description
      "Mechanize implements stateful programmatic web browsing in Python,
 after Andy Lester’s Perl module WWW::Mechanize.")
-    (license (non-copyleft "file://COPYING"
-                           "See COPYING in the distribution."))))
+    (license (license:non-copyleft
+              "file://COPYING"
+              "See COPYING in the distribution."))))
 
 
 (define-public python-simplejson
@@ -1175,7 +1172,7 @@ library contained in Python 2.6, but maintains compatibility with Python 2.5
 and (currently) has significant performance advantages, even without using
 the optional C extension for speedups.  Simplejson is also supported on
 Python 3.3+.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python2-simplejson
   (package-with-python2 python-simplejson))
@@ -1200,7 +1197,7 @@ Python 3.3+.")
     (synopsis "Python extension wrapping the ICU C++ API")
     (description
      "PyICU is a python extension wrapping the ICU C++ API.")
-    (license x11)
+    (license license:x11)
     (properties `((python2-variant . ,(delay python2-pyicu))))))
 
 (define-public python2-pyicu
@@ -1233,7 +1230,7 @@ Python 3.3+.")
 It uses Accessibility (a11y) technologies to communicate with desktop
 applications. dogtail scripts are written in Python and executed like any
 other Python program.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public python2-empy
   (package
@@ -1268,7 +1265,7 @@ effect as a markup language.  Also supported are callbacks via hooks,
 recording and playback via diversions, and dynamic, chainable filters.  The
 system is highly configurable via command line options and embedded
 commands.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-element-tree
   (package
@@ -1290,9 +1287,9 @@ commands.")
     (description
      "ElementTree is a Python library supporting lightweight XML processing.")
     (home-page "http://effbot.org/zone/element-index.htm")
-    (license (x11-style "http://docs.python.org/2/license.html"
-                        "Like \"CWI LICENSE AGREEMENT FOR PYTHON \
-0.9.0 THROUGH 1.2\"."))))
+    (license (license:x11-style
+              "http://docs.python.org/2/license.html"
+              "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
 
 (define-public python2-pybugz
   (package
@@ -1319,7 +1316,7 @@ commands.")
 bug tracking system.  It is meant as an aid to speed up interaction with the
 bug tracker.")
     (home-page "http://www.liquidx.net/pybugz/")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public python-enum34
   (package
@@ -1344,7 +1341,7 @@ bug tracker.")
     (description
      "Enum34 is the new Python stdlib enum module available in Python 3.4
 backported for previous versions of Python from 2.4 to 3.3.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-enum34
   (package-with-python2 python-enum34))
@@ -1371,7 +1368,7 @@ backported for previous versions of Python from 2.4 to 3.3.")
     (synopsis "Extended parse module")
     (description
      "Parse_type extends the python parse module.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python-parse
   (package
@@ -1396,7 +1393,7 @@ backported for previous versions of Python from 2.4 to 3.3.")
     (description
      "Parse strings using a specification based on the Python format()
 syntax.")
-    (license x11)))
+    (license license:x11)))
 
 
 (define-public scons
@@ -1423,7 +1420,7 @@ cross-platform substitute for the classic Make utility with integrated
 functionality similar to autoconf/automake and compiler caches such as ccache.
 In short, SCons is an easier, more reliable and faster way to build
 software.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python-extras
   (package
@@ -1502,7 +1499,7 @@ matching them against a list of media-ranges.")
     (synopsis "Python testing library")
     (description
      "Nose extends the unittest library to make testing easier.")
-    (license lgpl2.0+)))
+    (license license:lgpl2.0+)))
 
 (define-public python2-nose
   (package-with-python2 python-nose))
@@ -1528,7 +1525,7 @@ matching them against a list of media-ranges.")
     (description
      "Unittest2 is a replacement for the unittest module in the Python
 standard library.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-unittest2
   (package (inherit python-unittest2)
@@ -1780,7 +1777,7 @@ subprocess and see the output as well as any file modifications.")
      "Testtools extends the Python standard library unit testing framework to
 provide matchers, more debugging information, and cross-Python
 compatibility.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-testtools
   (package-with-python2 python-testtools))
@@ -1808,7 +1805,7 @@ compatibility.")
     (description
      "Testscenarios provides clean dependency injection for Python unittest
 style tests.")
-    (license (list bsd-3 asl2.0)))) ; at the user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
 
 (define-public python2-testscenarios
   (package-with-python2 python-testscenarios))
@@ -1835,7 +1832,7 @@ style tests.")
     (description
      "Testresources is an extension to Python's unittest to allow declarative
 use of resources by test cases.")
-    (license (list bsd-3 asl2.0)))) ; at the user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
 
 (define-public python2-testresources
   (package-with-python2 python-testresources))
@@ -1864,7 +1861,7 @@ use of resources by test cases.")
     (description
      "Python-subunit is a Python implementation of the subunit test streaming
 protocol.")
-    (license (list bsd-3 asl2.0)))) ; at the user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
 
 (define-public python2-subunit
   (package-with-python2 python-subunit))
@@ -1899,7 +1896,7 @@ protocol.")
     (description
      "Fixtures provides a way to create reusable state, useful when writing
 Python tests.")
-    (license (list bsd-3 asl2.0)))) ; at user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at user's option
 
 (define-public python2-fixtures-0.3.16
   (package-with-python2 python-fixtures-0.3.16))
@@ -1929,7 +1926,7 @@ Python tests.")
     (description
       "Python Build Reasonableness (PBR) is a library that injects some useful
 and sensible default behaviors into your setuptools run.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-pbr-0.11
   (package-with-python2 python-pbr-0.11))
@@ -1971,7 +1968,7 @@ and sensible default behaviors into your setuptools run.")
     (description
       "Python Build Reasonableness (PBR) is a library that injects some useful
 and sensible default behaviors into your setuptools run.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-pbr
   (package-with-python2 python-pbr))
@@ -2003,7 +2000,7 @@ and sensible default behaviors into your setuptools run.")
     (description
      "Fixtures provides a way to create reusable state, useful when writing
 Python tests.")
-    (license (list bsd-3 asl2.0)))) ; at user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at user's option
 
 (define-public python2-fixtures
   (package-with-python2 python-fixtures))
@@ -2034,7 +2031,7 @@ Python tests.")
     (description "Testrepository provides a database of test results which can
 be used as part of a developer's workflow to check things such as what tests
 have failed since the last commit or what tests are currently failing.")
-    (license (list bsd-3 asl2.0)))) ; at user's option
+    (license (list license:bsd-3 license:asl2.0)))) ; at user's option
 
 (define-public python2-testrepository
   (package-with-python2 python-testrepository))
@@ -2060,7 +2057,7 @@ have failed since the last commit or what tests are currently failing.")
 uses the code analysis tools and tracing hooks provided in the Python standard
 library to determine which lines are executable, and which have been
 executed.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-coverage
   (package-with-python2 python-coverage))
@@ -2087,7 +2084,7 @@ executed.")
     (description
      "Discover provides test discovery for unittest, a feature that has been
 backported from Python 2.7 for Python 2.4+.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-discover
   (package-with-python2 python-discover))
@@ -2118,7 +2115,7 @@ Behavior-driven development (or BDD) is an agile software development
 technique that encourages collaboration between developers, QA and
 non-technical or business participants in a software project.  Behave uses
 tests written in a natural language style, backed up by Python code.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python-exif-read
   (package
@@ -2139,7 +2136,7 @@ tests written in a natural language style, backed up by Python code.")
     (description
      "ExifRead is a Python library to extract EXIF data from tiff and jpeg
 files.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-exif-read
   (package-with-python2 python-exif-read))
@@ -2162,7 +2159,7 @@ files.")
     (synopsis "Python implementation of the JSON-LD specification")
     (description
      "PyLD is an implementation of the JSON-LD specification.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-pyld
   (package-with-python2 python-pyld))
@@ -2186,7 +2183,7 @@ files.")
     (description
      "Certifi is a Python library that contains a CA certificate bundle, which
 is used by the Requests library to verify HTTPS requests.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-certifi
   (package-with-python2 python-certifi))
@@ -2215,7 +2212,7 @@ is used by the Requests library to verify HTTPS requests.")
 composable way with as little code as necessary.  Its name stands for
 \"Command Line Interface Creation Kit\".  It's highly configurable but comes
 with sensible defaults out of the box.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-click
   (package-with-python2 python-click))
@@ -2279,7 +2276,7 @@ installed with a newer @code{pip} or with wheel's own command line utility.")
     (description
      "Requests is a Python HTTP client library.  It aims to be easier to use
 than Python’s urllib2 library.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 ;; Some software requires an older version of Requests, notably Docker
 ;; Compose.
@@ -2315,7 +2312,7 @@ than Python’s urllib2 library.")
 information in a variety of version control systems in order to discover
 version numbers.")
     (home-page "https://github.com/habnabit/vcversioner")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python2-vcversioner
   (package-with-python2 python-vcversioner))
@@ -2373,7 +2370,7 @@ useful when integrating with legacy code that doesn't support Unicode, or for
 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
 machine identifiers from human-readable Unicode strings that should still be
 somewhat intelligeble.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public python2-unidecode
   (package-with-python2 python-unidecode))
@@ -2428,7 +2425,7 @@ somewhat intelligeble.")
     (description
      "Oauthlib is a generic, spec-compliant, thorough implementation of the
 OAuth request-signing logic.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-oauthlib))))))
 
 (define-public python2-oauthlib
@@ -2458,7 +2455,7 @@ OAuth request-signing logic.")
     (description
      "Itsdangerous provides various helpers to pass trusted data to untrusted
 environments and back.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-itsdangerous))))))
 
 (define-public python2-itsdangerous
@@ -2551,7 +2548,7 @@ object.")
     (description
      "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
 for Python.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-markupsafe
   (package-with-python2 python-markupsafe))
@@ -2576,7 +2573,7 @@ for Python.")
     (description
      "Jinja2 is a small but fast and easy to use stand-alone template engine
 written in pure Python.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-jinja2
   (package-with-python2 python-jinja2))
@@ -2626,7 +2623,7 @@ logic-free templating system Mustache.")
 In particular, joblib offers: transparent disk-caching of the output values
 and lazy re-evaluation (memoize pattern), easy simple parallel computing
 logging and tracing of the execution.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-joblib
   (package-with-python2 python-joblib))
@@ -2657,7 +2654,7 @@ formats, such as HTML, XML, and LaTeX.  For input Docutils supports
 reStructuredText.")
     ;; Most of the source code is public domain, but some source files are
     ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
-    (license (list public-domain psfl bsd-2 gpl3+))))
+    (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
 
 (define-public python2-docutils
   (package-with-python2 python-docutils))
@@ -2680,7 +2677,7 @@ reStructuredText.")
     (synopsis "Syntax highlighting")
     (description
      "Pygments is a syntax highlighting package written in Python.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-pygments
   (package-with-python2 python-pygments))
@@ -2709,7 +2706,7 @@ reStructuredText.")
     (description "Sphinx is a tool that makes it easy to create documentation
 for Python projects or other documents consisting of multiple reStructuredText
 sources.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-sphinx
   (package-with-python2 python-sphinx))
@@ -2769,7 +2766,7 @@ sources.")
     (description
      "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-feedgenerator
   (package-with-python2 python-feedgenerator))
@@ -2844,7 +2841,7 @@ interested parties to subscribe to events, or \"signals\".")
      "Pelican is a tool to generate a static blog from reStructuredText,
 Markdown input files, and more.  Pelican uses Jinja2 for templating
 and is very extensible.")
-    (license agpl3+)))
+    (license license:agpl3+)))
 
 (define-public python-scikit-learn
   (package
@@ -2856,6 +2853,7 @@ and is very extensible.")
        (uri (string-append
              "https://github.com/scikit-learn/scikit-learn/archive/"
              version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
          "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
@@ -2888,18 +2886,11 @@ and is very extensible.")
     (description
      "Scikit-learn provides simple and efficient tools for data
 mining and data analysis.")
-    (license bsd-3)))
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-scikit-learn))))))
 
 (define-public python2-scikit-learn
-  (let ((scikit (package-with-python2 python-scikit-learn)))
-    (package (inherit scikit)
-      (propagated-inputs
-       `(("python2-numpy" ,python2-numpy)
-         ("python2-scipy" ,python2-scipy)
-         ,@(alist-delete
-            "python-numpy"
-            (alist-delete
-             "python-scipy" (package-propagated-inputs scikit))))))))
+  (package-with-python2 (strip-python2-variant python-scikit-learn)))
 
 (define-public python-scikit-image
   (package
@@ -2928,21 +2919,19 @@ mining and data analysis.")
     (synopsis "Image processing in Python")
     (description
      "Scikit-image is a collection of algorithms for image processing.")
-    (license bsd-3)))
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-scikit-image))))))
 
 (define-public python2-scikit-image
-  (let ((scikit-image (package-with-python2 python-scikit-image)))
+  (let ((scikit-image (package-with-python2
+                        (strip-python2-variant python-scikit-image))))
     (package (inherit scikit-image)
       (native-inputs
        `(("python2-mock" ,python2-mock)
          ,@(package-native-inputs scikit-image)))
       (propagated-inputs
        `(("python2-pytz" ,python2-pytz)
-         ("python2-matplotlib" ,python2-matplotlib)
-         ("python2-numpy" ,python2-numpy)
-         ("python2-scipy" ,python2-scipy)
-         ,@(fold alist-delete (package-propagated-inputs scikit-image)
-                 '("python-matplotlib" "python-numpy" "python-scipy")))))))
+         ,@(package-propagated-inputs scikit-image))))))
 
 (define-public python-redis
   (package
@@ -2995,7 +2984,7 @@ mining and data analysis.")
      "RQ (Redis Queue) is a simple Python library for queueing jobs and
 processing them in the background with workers.  It is backed by Redis and it
 is designed to have a low barrier to entry.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-rq
   (package-with-python2 python-rq))
@@ -3029,7 +3018,7 @@ is designed to have a low barrier to entry.")
     (description "Cython is an optimising static compiler for both the Python
 programming language and the extended Cython programming language.  It makes
 writing C extensions for Python as easy as Python itself.")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-cython))))))
 
 (define-public python2-cython
@@ -3105,7 +3094,7 @@ with Python.  It contains among other things: a powerful N-dimensional array
 object, sophisticated (broadcasting) functions, tools for integrating C/C++
 and Fortran code, useful linear algebra, Fourier transform, and random number
 capabilities.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define python2-numpy-bootstrap
   (package-with-python2 python-numpy-bootstrap))
@@ -3142,7 +3131,7 @@ capabilities.")
      "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
 Models, is a program for performing both single-SNP and SNP-set genome-wide
 association studies (GWAS) on extremely large data sets.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python-numpy
   (package (inherit python-numpy-bootstrap)
@@ -3285,7 +3274,7 @@ that client code uses to construct the grammar directly in Python code.")
      "Numpy's Sphinx extensions")
     (description
      "Sphinx extension to support docstrings in Numpy format.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-numpydoc
   (package-with-python2 python-numpydoc))
@@ -3314,17 +3303,11 @@ doing the same calculation in Python.  In addition, its multi-threaded
 capabilities can make use of all your cores, which may accelerate
 computations, most specially if they are not memory-bounded (e.g. those using
 transcendental functions).")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-numexpr))))))
 
 (define-public python2-numexpr
-  (let ((numexpr (package-with-python2 python-numexpr)))
-    (package (inherit numexpr)
-      ;; Make sure to use special packages for Python 2 instead
-      ;; of those automatically rewritten by package-with-python2.
-      (propagated-inputs
-       `(("python2-numpy" ,python2-numpy)
-         ,@(alist-delete "python-numpy"
-                         (package-propagated-inputs numexpr)))))))
+  (package-with-python2 (strip-python2-variant python-numexpr)))
 
 (define-public python-matplotlib
   (package
@@ -3450,7 +3433,7 @@ quality figures in a variety of hardcopy formats and interactive environments
 across platforms.  Matplotlib can be used in Python scripts, the python and
 ipython shell, web application servers, and six graphical user interface
 toolkits.")
-    (license psfl)
+    (license license:psfl)
     (properties `((python2-variant . ,(delay python2-matplotlib))))))
 
 (define-public python2-matplotlib
@@ -3499,7 +3482,7 @@ toolkits.")
 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
 those files.  It can also efficiently manipulate ranges of integers using set
 operators such as union, intersection, and difference.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python-rpy2
   (package
@@ -3528,7 +3511,7 @@ operators such as union, intersection, and difference.")
 low-level interface to R from Python, a proposed high-level interface,
 including wrappers to graphical libraries, as well as R-like structures and
 functions.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public python2-rpy2
   (let ((rpy2 (package-with-python2 python-rpy2)))
@@ -3631,7 +3614,7 @@ atlas_libs = openblas
     (description "The SciPy library is one of the core packages that make up
 the SciPy stack.  It provides many user-friendly and efficient numerical
 routines such as routines for numerical integration and optimization.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-scipy
   (package-with-python2 python-scipy))
@@ -3666,7 +3649,7 @@ gives application developers the full power and flexibility of SQL.  It
 provides a full suite of well known enterprise-level persistence patterns,
 designed for efficient and high-performing database access, adapted into a
 simple and Pythonic domain language.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python2-sqlalchemy
   (package-with-python2 python-sqlalchemy))
@@ -3729,7 +3712,7 @@ SQLAlchemy Database Toolkit for Python.")
      "The python-distutils-extra module enables you to easily integrate
 gettext support, themed icons, and scrollkeeper-based documentation into
 Python's distutils.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public python2-distutils-extra
   (package-with-python2 python-distutils-extra))
@@ -3766,7 +3749,7 @@ Python's distutils.")
     (description
      "The elib.intl module provides enhanced internationalization (I18N)
 services for your Python modules and applications.")
-    (license lgpl3+)))
+    (license license:lgpl3+)))
 
 (define-public python-pillow
   (package
@@ -3825,7 +3808,7 @@ efficient internal representation, and fairly powerful image processing
 capabilities.  The core image library is designed for fast access to data
 stored in a few basic pixel formats.  It should provide a solid foundation for
 a general image processing tool.")
-    (license (x11-style
+    (license (license:x11-style
               "http://www.pythonware.com/products/pil/license.htm"
               "The PIL Software License"))))
 
@@ -3874,7 +3857,7 @@ a general image processing tool.")
      "Pycparser is a complete parser of the C language, written in pure Python
 using the PLY parsing library.  It parses C code into an AST and can serve as
 a front-end for C compilers or analysis tools.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-pycparser
   (package-with-python2 python-pycparser))
@@ -4017,7 +4000,7 @@ support for Python 3 and PyPy.  It is based on cffi.")
 Python bindings and object-oriented API for cairo.  Cairo is a 2D vector
 graphics library with support for multiple backends including image buffers,
 PNG, PostScript, PDF, and SVG file output.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-cairocffi
   (package-with-python2 python-cairocffi))
@@ -4074,7 +4057,7 @@ etc.  The core of this module is a decorator factory.")
       "A Python package for Distributed Resource Management (DRM) job
 submission and control.  This package is an implementation of the DRMAA 1.0
 Python language binding specification.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-drmaa
   (package-with-python2 python-drmaa))
@@ -4105,7 +4088,7 @@ Python language binding specification.")
       "Gridmap is a Python package to allow you to easily create jobs on the
 cluster directly from Python.  You can directly map Python functions onto the
 cluster without needing to write any wrapper code yourself.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public python2-gridmap
   (package-with-python2 python-gridmap))
@@ -4135,7 +4118,7 @@ cluster without needing to write any wrapper code yourself.")
 controlling them; and responding to expected patterns in their output.
 Pexpect works like Don Libes’ Expect.  Pexpect allows your script to spawn a
 child application and control it as if a human were typing commands.")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python2-pexpect
   (package-with-python2 python-pexpect))
@@ -4247,7 +4230,7 @@ functions, akin to Python’s built-in generic functions like @code{len()},
 these generic functions use simple lookup tables, akin to those used by
 e.g. @code{pickle.dump()} and other generic functions found in the Python
 standard library.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-simplegeneric
   (package-with-python2 python-simplegeneric))
@@ -4270,7 +4253,7 @@ standard library.")
     (synopsis "Vestigial utilities from IPython")
     (description
      "This package provides retired utilities from IPython.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-ipython-genutils
   (package-with-python2 python-ipython-genutils))
@@ -4306,7 +4289,7 @@ callbacks.  The package also includes a mechanism to use traitlets for
 configuration, loading values from files or from command line arguments.  This
 is a distinct layer on top of traitlets, so you can use traitlets in your code
 without using the configuration machinery.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-traitlets
   (package-with-python2 python-traitlets))
@@ -4404,29 +4387,20 @@ without using the configuration machinery.")
 Powerful interactive shells, a browser-based notebook, support for interactive
 data visualization, embeddable interpreters and tools for parallel
 computing.")
-    (license bsd-3)))
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-ipython))))))
 
 (define-public python2-ipython
-  (let ((ipython (package-with-python2 python-ipython)))
+  (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
     (package
       (inherit ipython)
       ;; FIXME: some tests are failing
       (arguments
        `(#:tests? #f ,@(package-arguments ipython)))
-      ;; Make sure we use custom python2-NAME packages.
       ;; FIXME: add pyreadline once available.
-      (propagated-inputs
-       `(("python2-terminado" ,python2-terminado)
-         ,@(alist-delete "python-terminado"
-                         (package-propagated-inputs ipython))))
       (inputs
-       `(("python2-jsonschema" ,python2-jsonschema)
-         ("python2-mock" ,python2-mock)
-         ("python2-matplotlib" ,python2-matplotlib)
-         ("python2-numpy" ,python2-numpy)
-         ("python2-requests" ,python2-requests)
-         ,@(fold alist-delete (package-inputs ipython)
-                 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
+       `(("python2-mock" ,python2-mock)
+         ,@(package-inputs ipython))))))
 
 (define-public python-isodate
   (package
@@ -4449,7 +4423,7 @@ computing.")
     (description
       "Python-isodate is a python module for parsing and formatting
 ISO 8601 dates, time and duration.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-isodate
   (package-with-python2 python-isodate))
@@ -4513,7 +4487,7 @@ and written in Python.")
     (description
      "Urwid is a curses-based UI/widget library for Python.  It includes many
 features useful for text console applications.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-urwid
   (package-with-python2 python-urwid))
@@ -4541,7 +4515,7 @@ features useful for text console applications.")
     (synopsis "Tree widgets for urwid")
     (description "Urwidtrees is a Widget Container API for the @code{urwid}
 toolkit.  Use it to build trees of widgets.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public python2-urwidtrees
   (package-with-python2 python-urwidtrees))
@@ -4649,7 +4623,7 @@ translate the complete SQLite API into Python.")
     (description
       "The lxml XML toolkit is a Pythonic binding for the C libraries
 libxml2 and libxslt.")
-    (license bsd-3))) ; and a few more, see LICENSES.txt
+    (license license:bsd-3))) ; and a few more, see LICENSES.txt
 
 (define-public python2-lxml
   (package-with-python2 python-lxml))
@@ -4715,7 +4689,7 @@ converts incoming documents to Unicode and outgoing documents to UTF-8.")
       "Cssutils is a Python package for parsing and building CSS
 Cascading Style Sheets.  Currently it provides a DOM only and no rendering
 options.")
-    (license lgpl3+)))
+    (license license:lgpl3+)))
 
 (define-public python-cssselect
   (package
@@ -4743,7 +4717,7 @@ options.")
       "Cssselect ia a Python module that parses CSS3 Selectors and translates
 them to XPath 1.0 expressions.  Such expressions can be used in lxml or
 another XPath engine to find the matching elements in an XML or HTML document.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-cssselect
   (package-with-python2 python-cssselect))
@@ -4799,7 +4773,7 @@ interfaces in an easy and portable manner.")
     (description
       "NetworkX is a Python package for the creation, manipulation, and study
 of the structure, dynamics, and functions of complex networks.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-networkx
   (package-with-python2 python-networkx))
@@ -4848,7 +4822,7 @@ Python style, together with a fast and comfortable execution environment.")
 graphics in Python.  It is built on top of matplotlib and tightly integrated
 with the PyData stack, including support for numpy and pandas data structures
 and statistical routines from scipy and statsmodels.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-seaborn))))))
 
 (define-public python2-seaborn
@@ -4881,7 +4855,7 @@ and statistical routines from scipy and statsmodels.")
      "SymPy is a Python library for symbolic mathematics.  It aims to become a
 full-featured computer algebra system (CAS) while keeping the code as simple
 as possible in order to be comprehensible and easily extensible.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-sympy
   (package-with-python2 python-sympy))
@@ -4946,7 +4920,7 @@ as possible in order to be comprehensible and easily extensible.")
      "The Python X Library is intended to be a fully functional X client
 library for Python programs.  It is useful to implement low-level X clients.
 It is written entirely in Python.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public python-singledispatch
   (package
@@ -4998,7 +4972,7 @@ originally developed at FriendFeed.  By using non-blocking network I/O,
 Tornado can scale to tens of thousands of open connections, making it ideal
 for long polling, WebSockets, and other applications that require a long-lived
 connection to each user.")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-tornado))))))
 
 (define-public python2-tornado
@@ -5033,7 +5007,7 @@ connection to each user.")
     (description
      "Python-backports-abc provides a backport of additions to the
 'collections.abc' module in Python-3.5.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-backports-abc
   (package-with-python2 python-backports-abc))
@@ -5069,7 +5043,7 @@ connection to each user.")
     (description
      "Waf is a Python-based framework for configuring, compiling and installing
 applications.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-waf
   (package-with-python2 python-waf))
@@ -5101,7 +5075,7 @@ applications.")
     (synopsis "Python bindings for 0MQ")
     (description
      "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
-    (license bsd-4)))
+    (license license:bsd-4)))
 
 (define-public python2-pyzmq
   (package-with-python2 python-pyzmq))
@@ -5308,7 +5282,7 @@ complexity of Python source code.")
     (synopsis "Markdown parser in pure Python")
     (description "This package provides a fast markdown parser in pure
 Python.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-mistune
   (package-with-python2 python-mistune))
@@ -5341,7 +5315,7 @@ Python.")
 Markdown.  The library features international input, various Markdown
 extensions, and several HTML output formats.  A command line wrapper
 markdown_py is also provided to convert Markdown files to HTML.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-markdown
   (package-with-python2 python-markdown))
@@ -5374,7 +5348,7 @@ markdown_py is also provided to convert Markdown files to HTML.")
     (description
      "This package provides a Python library used to launch a subprocess in a
 pseudo terminal (pty), and interact with both the process and its pty.")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python2-ptyprocess
   (package-with-python2 python-ptyprocess))
@@ -5406,7 +5380,7 @@ pseudo terminal (pty), and interact with both the process and its pty.")
     (synopsis "Terminals served to term.js using Tornado websockets")
     (description "This package provides a Tornado websocket backend for the
 term.js Javascript terminal emulator library.")
-    (license bsd-2)
+    (license license:bsd-2)
     (properties `((python2-variant . ,(delay python2-terminado))))))
 
 (define-public python2-terminado
@@ -5445,8 +5419,9 @@ supports reading and writinfg of TrueType/OpenType fonts, reading and writing
 of AFM files, reading (and partially writing) of PS Type 1 fonts.  The package
 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
 from an XML-based format.")
-    (license (non-copyleft "file://LICENSE.txt"
-                           "See LICENSE.txt in the distribution."))))
+    (license (license:non-copyleft
+              "file://LICENSE.txt"
+              "See LICENSE.txt in the distribution."))))
 
 (define-public python2-fonttools
   (package-with-python2 python-fonttools))
@@ -5472,7 +5447,7 @@ from an XML-based format.")
 or create documents in LilyPond format.  A command line program ly is also
 provided that can be used to do various manipulations with LilyPond files.")
     (home-page "https://pypi.python.org/pypi/python-ly")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public python-appdirs
   (package
@@ -5525,7 +5500,7 @@ should be stored on various operating systems.")
     (description
      "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
     (home-page "https://bitbucket.org/nikratio/python-llfuse/")
-    (license lgpl2.0+)
+    (license license:lgpl2.0+)
     (properties `((python2-variant . ,(delay python2-llfuse))))))
 
 (define-public python2-llfuse
@@ -5547,7 +5522,7 @@ should be stored on various operating systems.")
                 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
     ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
     ;; licensed.  The rest of the package is licensed under LGPL2.0 or later.
-    (license (list license:expat lgpl2.0+))))
+    (license (list license:expat license:lgpl2.0+))))
 
 (define-public python-msgpack
   (package
@@ -5565,7 +5540,7 @@ should be stored on various operating systems.")
 suitable for similar data to JSON.  This package provides CPython bindings for
 reading and writing MessagePack data.")
     (home-page "https://pypi.python.org/pypi/msgpack-python/")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-msgpack))))))
 
 (define-public python2-msgpack
@@ -5600,7 +5575,7 @@ reading and writing MessagePack data.")
     (description
       "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
 and MAC network addresses.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-netaddr
   (package-with-python2 python-netaddr))
@@ -5632,7 +5607,7 @@ and MAC network addresses.")
       "The aim of the wrapt module is to provide a transparent object proxy for
   Python, which can be used as the basis for the construction of function
   wrappers and decorator functions.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-wrapt
   (package-with-python2 python-wrapt))
@@ -5683,7 +5658,7 @@ and MAC network addresses.")
     (description
       "This module provides a monotonic() function which returns the value (in
 fractional seconds) of a clock which never goes backwards.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-monotonic
   (package-with-python2 python-monotonic))
@@ -5739,7 +5714,7 @@ object to help create WSGI responses.")
 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
 @samp{.xlsx} (versions 2.0 onwards).  It has support for Excel dates and is
 Unicode-aware.  It is not intended as an end-user tool.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-xlrd
   (package-with-python2 python-xlrd))
@@ -5767,7 +5742,7 @@ Unicode-aware.  It is not intended as an end-user tool.")
 tables.  PrettyTable allows for selection of which columns are to be printed,
 independent alignment of columns (left or right justified or centred) and
 printing of sub-tables by specifying a row range.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-prettytable
   (package-with-python2 python-prettytable))
@@ -5824,7 +5799,7 @@ printing of sub-tables by specifying a row range.")
     (synopsis "Hierarchical datasets for Python")
     (description "PyTables is a package for managing hierarchical datasets and
 designed to efficently cope with extremely large amounts of data.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-tables
   (package-with-python2 python-tables))
@@ -5847,7 +5822,7 @@ designed to efficently cope with extremely large amounts of data.")
     (description
      "This is an implementation of ASN.1 types and codecs in Python.  It is
 suitable for a wide range of protocols based on the ASN.1 specification.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-pyasn1
   (package-with-python2 python-pyasn1))
@@ -5873,35 +5848,38 @@ suitable for a wide range of protocols based on the ASN.1 specification.")
     (description
      "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
 implementations of ASN.1-based codecs and protocols.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-pyasn1-modules
   (package-with-python2 python-pyasn1-modules))
 
-(define-public python2-ipaddress
+(define-public python-ipaddress
   (package
-    (name "python2-ipaddress")
-    (version "1.0.14")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/i/"
-                           "ipaddress/ipaddress-" version ".tar.gz"))
-       (sha256
-        (base32
-         "0givid4963n57nsjibms2fc347zmcs188q1hw9al1dkc9kj4nvr2"))))
+    (name "python-ipaddress")
+    (version "1.0.16")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "ipaddress" version))
+              (sha256
+               (base32
+                "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
     (build-system python-build-system)
-    (arguments
-     `(#:tests? #f  ; no tests
-       #:python ,python-2))
     (home-page "https://github.com/phihag/ipaddress")
     (synopsis "IP address manipulation library")
     (description
-     "This package provides a fast, lightweight IPv4/IPv6 manipulation library
-in Python.  This library is used to create, poke at, and manipulate IPv4 and
-IPv6 addresses and networks.  This is a port of the Python 3.3 ipaddress
-module to older versions of Python.")
-    (license psfl)))
+      "This package provides a fast, lightweight IPv4/IPv6 manipulation library
+ in Python.  This library is used to create, poke at, and manipulate IPv4 and
+ IPv6 addresses and networks.  This is a port of the Python 3.3 ipaddress
+ module to older versions of Python.")
+    (license license:psfl)
+    (properties `((python2-variant . ,(delay python2-ipaddress))))))
+
+(define-public python2-ipaddress
+  (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
 
 (define-public python2-ipaddr
   (package
@@ -5930,7 +5908,7 @@ IPv6 addresses and networks.
 For new implementations you may prefer to use the standard module
 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
 versions of Python.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python-idna
   (package
@@ -5957,7 +5935,7 @@ from the earlier standard from 2003.  The library is also intended to act as a
 suitable drop-in replacement for the “encodings.idna” module that comes with
 the Python standard library but currently only supports the older 2003
 specification.")
-    (license bsd-4)))
+    (license license:bsd-4)))
 
 (define-public python2-idna
   (package-with-python2 python-idna))
@@ -5984,7 +5962,7 @@ specification.")
 technique for writing tests.  You may hear the term mixed up with mocks,
 fakes, or doubles.  Basically, a stub is an object that returns pre-canned
 responses, rather than doing any computation.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-pretend
   (package-with-python2 python-pretend))
@@ -6008,7 +5986,7 @@ responses, rather than doing any computation.")
     (description
       "This package contains test vectors for the cryptography package.")
     ;; Distributed under either BSD-3 or ASL2.0
-    (license (list bsd-3 asl2.0))))
+    (license (list license:bsd-3 license:asl2.0))))
 
 (define-public python2-cryptography-vectors
   (package-with-python2 python-cryptography-vectors))
@@ -6050,7 +6028,7 @@ library” for Python.  The package includes both high level recipes, and low
 level interfaces to common cryptographic algorithms such as symmetric ciphers,
 message digests and key derivation functions.")
     ;; Distributed under either BSD-3 or ASL2.0
-    (license (list bsd-3 asl2.0))
+    (license (list license:bsd-3 license:asl2.0))
     (properties `((python2-variant . ,(delay python2-cryptography))))))
 
 (define-public python2-cryptography
@@ -6089,7 +6067,7 @@ message digests and key derivation functions.")
     (description
       "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
 library.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-pyopenssl
   (package-with-python2 python-pyopenssl))
@@ -6161,7 +6139,7 @@ similar hash values, which allows for the detection of similar objects by
 comparing their hash values.  The byte stream should have a sufficient amount
 of complexity; for example, a byte stream of identical bytes will not generate
 a hash value.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-tlsh
   (package
@@ -6208,7 +6186,7 @@ a hash value.")
      "This package provides Python bindings to libarchive, a C library to
 access possibly compressed archives in many different formats.  It uses
 Python's @code{ctypes} foreign function interface (FFI).")
-    (license lgpl2.0+)))
+    (license license:lgpl2.0+)))
 
 (define-public python2-libarchive-c
   (package-with-python2 python-libarchive-c))
@@ -6279,7 +6257,7 @@ Debian-related files, such as:
 @end enumerate\n")
 
     ;; Modules are either GPLv2+ or GPLv3+.
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public python2-debian
   (package-with-python2 python-debian))
@@ -6306,7 +6284,7 @@ Debian-related files, such as:
     (description
      "This package provides @code{chardet}, a Python module that can
 automatically detect a wide range of file encodings.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-chardet
   (package-with-python2 python-chardet))
@@ -6367,7 +6345,7 @@ programatically with command-line parsers like @code{getopt} and
 use by applications which are unaware of any subscribers to their events.  It
 is a simple event-dispatching system on which more sophisticated event
 dispatching systems can be built.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-event
   (package-with-python2 python-zope-event))
@@ -6393,7 +6371,7 @@ methodology")
     (description "Zope.interface provides an implementation of \"object
 interfaces\" for Python.  Interfaces are a mechanism for labeling objects as
 conforming to a given API or contract.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-interface
   (package-with-python2 python-zope-interface))
@@ -6420,7 +6398,7 @@ conforming to a given API or contract.")
     (synopsis "Zope exceptions")
     (description "Zope.exceptions provides general-purpose exception types
 that have uses outside of the Zope framework.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-exceptions
   (package-with-python2 python-zope-exceptions))
@@ -6446,7 +6424,7 @@ that have uses outside of the Zope framework.")
     (synopsis "Zope testing helpers")
     (description "Zope.testing provides a number of testing utilities for HTML
 forms, HTTP servers, regular expressions, and more.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-testing
   (package-with-python2 python-zope-testing))
@@ -6476,7 +6454,7 @@ forms, HTTP servers, regular expressions, and more.")
     (synopsis "Zope testrunner script")
     (description "Zope.testrunner provides a script for running Python
 tests.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-testrunner
   (let ((base (package-with-python2 python-zope-testrunner)))
@@ -6508,7 +6486,7 @@ tests.")
     (synopsis "Message identifiers for internationalization")
     (description "Zope.i18nmessageid provides facilities for declaring
 internationalized messages within program source text.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-i18nmessageid
   (package-with-python2 python-zope-i18nmessageid))
@@ -6535,7 +6513,7 @@ internationalized messages within program source text.")
     (synopsis "Zope data schemas")
     (description "Zope.scheme provides extensions to zope.interface for
 defining data schemas.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-schema
   (package-with-python2 python-zope-schema))
@@ -6560,7 +6538,7 @@ defining data schemas.")
     (synopsis "Zope Configuration Markup Language")
     (description "Zope.configuration implements ZCML, the Zope Configuration
 Markup Language.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-configuration
   (package-with-python2 python-zope-configuration))
@@ -6587,7 +6565,7 @@ Proxies are special objects which serve as mostly-transparent wrappers around
 another object, intervening in the apparent behavior of the wrapped object
 only when necessary to apply the policy (e.g., access checking, location
 brokering, etc.) for which the proxy is responsible.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-proxy
   (package-with-python2 python-zope-proxy))
@@ -6612,7 +6590,7 @@ brokering, etc.) for which the proxy is responsible.")
     (synopsis "Zope location library")
     (description "Zope.location implements the concept of \"locations\" in
 Zope3, which are are special objects that have a structural location.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-location
   (package-with-python2 python-zope-location))
@@ -6642,7 +6620,7 @@ Zope3, which are are special objects that have a structural location.")
     (synopsis "Zope security framework")
     (description "Zope.security provides a generic mechanism to implement
 security policies on Python objects.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-security
   (let ((zope-security (package-with-python2 python-zope-security)))
@@ -6681,7 +6659,7 @@ security policies on Python objects.")
     (description "Zope.component represents the core of the Zope Component
 Architecture.  Together with the zope.interface package, it provides
 facilities for defining, registering and looking up components.")
-    (license zpl2.1)))
+    (license license:zpl2.1)))
 
 (define-public python2-zope-component
   (package-with-python2 python-zope-component))
@@ -6718,7 +6696,7 @@ facilities for defining, registering and looking up components.")
     (description "A Python wrapper for the dialog utility.  Its purpose is to
 provide an easy to use, pythonic and comprehensive Python interface to dialog.
 This allows one to make simple text-mode user interfaces on Unix-like systems")
-    (license lgpl2.1)
+    (license license:lgpl2.1)
     (properties `((python2-variant . ,(delay python2-pythondialog))))))
 
 (define-public python2-pythondialog
@@ -6780,7 +6758,7 @@ powerful debugger, full-featured request and response objects, HTTP utilities to
 handle entity tags, cache control headers, HTTP dates, cookie handling, file
 uploads, a powerful URL routing system and a bunch of community-contributed
 addon modules.")
-    (license x11)))
+    (license license:x11)))
 
 (define-public python2-werkzeug
   (package-with-python2 python-werkzeug))
@@ -6810,7 +6788,7 @@ writer: an ini file round tripper.  Its main feature is that it is very easy to
 use, with a straightforward programmer’s interface and a simple syntax for
 config files.")
     (home-page "https://github.com/DiffSK/configobj")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-configobj
   (package-with-python2 python-configobj))
@@ -6862,7 +6840,7 @@ based on PyOpenSSL.  PyOpenSSL provides a more fully featured SSL implementation
 over the default provided with Python and importantly enables full verification
 of the SSL peer.")
     (home-page "https://github.com/cedadev/ndg_httpsclient/")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 ;; python2-openssl requires special care, so package-with-python2 is
 ;; insufficient.
@@ -6899,7 +6877,7 @@ of the SSL peer.")
 provides utilities for common tasks involving decorators and context
 managers.  It also contains additional features that are not part of
 the standard library.")
-    (license psfl)))
+    (license license:psfl)))
 
 (define-public python2-contextlib2
   (package-with-python2 python-contextlib2))
@@ -6921,7 +6899,7 @@ the standard library.")
     (synopsis "Python module for creating simple ASCII tables")
     (description "Texttable is a Python module for creating simple ASCII
 tables.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-texttable
   (package-with-python2 python-texttable))
@@ -6946,7 +6924,7 @@ tables.")
     (synopsis "WebSocket client for Python")
     (description "The Websocket-client module provides the low level APIs for
 WebSocket usage in Python programs.")
-    (license lgpl2.1+)))
+    (license license:lgpl2.1+)))
 
 (define-public python2-websocket-client
   (package-with-python2 python-websocket-client))
@@ -6995,7 +6973,7 @@ for atomic filesystem operations.")
     (description "This is a toolbelt of useful classes and functions to be used
 with python-requests.")
     (home-page "https://github.com/sigmavirus24/requests-toolbelt")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python-click-threading
   (package
@@ -7221,13 +7199,13 @@ processes across test runs.")
 (define-public python-icalendar
   (package
     (name "python-icalendar")
-    (version "3.9.1")
+    (version "3.10")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "icalendar" version))
              (sha256
               (base32
-               "0fhrczdj3jxy5bvswphp3vys7vwv5c9bpwg7asykqwa3z6253q6q"))))
+               "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-dateutil-2" ,python-dateutil-2)
@@ -7236,7 +7214,7 @@ processes across test runs.")
     (description "The icalendar package is a parser/generator of iCalendar
 files for use with Python.")
     (home-page "https://github.com/collective/icalendar")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python-sphinxcontrib-newsfeed
   (package
@@ -7256,7 +7234,7 @@ files for use with Python.")
     (description "Sphinxcontrib-newsfeed is an extension for adding a simple
 Blog, News or Announcements section to a Sphinx website.")
     (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python-args
   (package
@@ -7275,7 +7253,7 @@ Blog, News or Announcements section to a Sphinx website.")
     (synopsis "Command-line argument parser")
     (description
      "This library provides a Python module to parse command-line arguments.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-args
   (package-with-python2 python-args))
@@ -7300,7 +7278,7 @@ Blog, News or Announcements section to a Sphinx website.")
      "Clint is a Python module filled with a set of tools for developing
 command-line applications, including tools for colored and indented
 output, progress bar display, and pipes.")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python2-clint
   (package-with-python2 python-clint))
@@ -7323,7 +7301,7 @@ output, progress bar display, and pipes.")
     (description
      "Astor is designed to allow easy manipulation of Python source via the
 Abstract Syntax Tree.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-astor
   (package-with-python2 python-astor))
@@ -7348,7 +7326,7 @@ Abstract Syntax Tree.")
      "This package provides a pure Python based parser generator, that also
 works with RPython.  It is a more-or-less direct port of David Bazzley's PLY,
 with a new public API, and RPython support.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-rply
   (package-with-python2 python-rply))
@@ -7460,7 +7438,7 @@ authenticated session objects providing things like keep-alive.")
      "The concurrent.futures module provides a high-level interface for
 asynchronously executing callables.  This package backports the
 concurrent.futures package from Python 3.2")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python-urllib3
   (package
@@ -7516,7 +7494,7 @@ supports url redirection and retries, and also gzip and deflate decoding.")
    (description "Colorama is a Python library for rendering colored terminal
 text.")
    (home-page "https://pypi.python.org/pypi/colorama")
-   (license bsd-3)))
+   (license license:bsd-3)))
 
 (define-public python2-colorama
   (package-with-python2 python-colorama))
@@ -7542,7 +7520,7 @@ encryption and decryption, signing and verifying signatures, and key
 generation according to PKCS#1 version 1.5.  It can be used as a Python
 library as well as on the command line.")
    (home-page "http://stuvel.eu/rsa")
-   (license asl2.0)))
+   (license license:asl2.0)))
 
 (define-public python2-rsa
   (package-with-python2 python-rsa))
@@ -7653,7 +7631,7 @@ document.")
    (synopsis "Low-level interface to AWS")
    (description "Botocore is a Python library that provides a low-level
 interface to the Amazon Web Services (AWS) API.")
-   (license asl2.0)))
+   (license license:asl2.0)))
 
 (define-public python2-botocore
   (package-with-python2 python-botocore))
@@ -7687,7 +7665,7 @@ interface to the Amazon Web Services (AWS) API.")
    (synopsis "Command line client for AWS")
    (description "AWS CLI provides a unified command line interface to the
 Amazon Web Services (AWS) API.")
-   (license asl2.0)))
+   (license license:asl2.0)))
 
 (define-public python-hypothesis
   (package
@@ -7709,7 +7687,7 @@ much larger range of examples than you would ever want to write by hand.  It’s
 based on the Haskell library, Quickcheck, and is designed to integrate
 seamlessly into your existing Python unit testing work flow.")
     (home-page "https://github.com/DRMacIver/hypothesis")
-    (license mpl2.0)
+    (license license:mpl2.0)
     (properties `((python2-variant . ,(delay python2-hypothesis))))))
 
 (define-public python2-hypothesis
@@ -7743,7 +7721,7 @@ unit test functions that use @code{py.test}. This is useful for using
 function multiple times, without setting up or tearing down fixture state as is
 normally the case.")
     (home-page "https://github.com/untitaker/pytest-subtesthack/")
-    (license unlicense)))
+    (license license:unlicense)))
 
 (define-public python2-pytest-subtesthack
   (package-with-python2 python-pytest-subtesthack))
@@ -7772,7 +7750,7 @@ normally the case.")
     (description "Provides bindings to libxdo for manipulating X11 via simulated
 input.  (Note that this is mostly a legacy library; you may wish to look at
 python-xdo for newer bindings.)")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python-wtforms
   (package
@@ -7795,7 +7773,7 @@ python-xdo for newer bindings.)")
      "WTForms is a flexible forms validation and rendering library
 for Python web development.  It is very similar to the web form API
 available in Django, but is a standalone package.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-wtforms))))))
 
 (define-public python2-wtforms
@@ -7852,7 +7830,7 @@ templates into Python modules.")
     (synopsis "Waitress WSGI server")
     (description "Waitress is meant to be a production-quality pure-Python WSGI
 server with very acceptable performance.")
-    (license zpl2.1)
+    (license license:zpl2.1)
     (properties `((python2-variant . ,(delay python2-waitress))))))
 
 (define-public python2-waitress
@@ -8033,7 +8011,7 @@ layouts.")
     (description "pyquery allows you to make jQuery queries on xml documents.
 The API is as much as possible the similar to jQuery.  pyquery uses lxml for
 fast xml and html manipulation.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-pyquery))))))
 
 (define-public python2-pyquery
@@ -8121,7 +8099,7 @@ minimum of WSGI.")
     (description
      "Anyjson loads whichever is the fastest JSON module installed
 and provides a uniform API regardless of which JSON implementation is used.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-anyjson))))))
 
 (define-public python2-anyjson
@@ -8157,7 +8135,7 @@ and provides a uniform API regardless of which JSON implementation is used.")
      "This is a fork of amqplib which was originally written by Barry Pederson.
 It is maintained by the Celery project, and used by kombu as a pure python
 alternative when librabbitmq is not available.")
-    (license lgpl2.1+)
+    (license license:lgpl2.1+)
     (properties `((python2-variant . ,(delay python2-amqp))))))
 
 (define-public python2-amqp
@@ -8199,7 +8177,7 @@ and also provide proven and tested solutions to common messaging problems.
 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
 message orientation, queuing, routing, reliability and security, for which the
 RabbitMQ messaging server is the most popular implementation.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-kombu))))))
 
 (define-public python2-kombu
@@ -8233,7 +8211,7 @@ RabbitMQ messaging server is the most popular implementation.")
 multiprocessing package itself is a renamed and updated version of R Oudkerk's
 pyprocessing package.  This standalone variant is intended to be compatible with
 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-billiard))))))
 
 (define-public python2-billiard
@@ -8274,7 +8252,7 @@ supports scheduling as well.  The execution units, called tasks, are executed
 concurrently on a single or more worker servers using multiprocessing,
 Eventlet, or gevent.  Tasks can execute asynchronously (in the background) or
 synchronously (wait until ready).")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-celery))))))
 
 (define-public python2-celery
@@ -8337,7 +8315,7 @@ ISO 8859, etc.).")
   (description
     "python-editor is a library that provides the editor module for
 programmatically interfacing with your system's $EDITOR.")
-  (license asl2.0)
+  (license license:asl2.0)
   (properties `((python2-variant . ,(delay python2-editor))))))
 
 (define-public python2-editor
@@ -8364,7 +8342,7 @@ programmatically interfacing with your system's $EDITOR.")
     (description "A Sphinx extension to literally insert the output of arbitrary
 commands into documents, helping you to keep your command examples up to date.")
     (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
-    (license bsd-2)
+    (license license:bsd-2)
     (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
 
 (define-public python2-sphinxcontrib-programoutput
@@ -8393,7 +8371,7 @@ commands into documents, helping you to keep your command examples up to date.")
 system.  The extension allows generation of API documentation by
 introspection of @code{zope.interface} instances in code.")
     (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
-    (license repoze)))
+    (license license:repoze)))
 
 (define-public python2-sphinx-repoze-autointerface
   (package-with-python2 python-sphinx-repoze-autointerface))
@@ -8420,7 +8398,7 @@ introspection of @code{zope.interface} instances in code.")
     (synopsis "Python PostgreSQL adapter")
     (description
      "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
-    (license lgpl3+)
+    (license license:lgpl3+)
     (properties `((python2-variant . ,(delay python2-psycopg2))))))
 
 (define-public python2-psycopg2
@@ -8450,7 +8428,7 @@ are supported and well tested. vCard 3.0 files are supported, and all data
 should be imported, but only a few components are understood in a sophisticated
 way.")
     (home-page "http://eventable.github.io/vobject/")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-vobject))))))
 
 (define-public python2-vobject
@@ -8477,7 +8455,7 @@ way.")
     (description "The Munkres module provides an implementation of the Munkres
 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
 useful for solving the Assignment Problem.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-munkres
   (package-with-python2 python-munkres))
@@ -8502,7 +8480,7 @@ useful for solving the Assignment Problem.")
     (description "Flask is a micro web framework based on the Werkzeug toolkit
 and Jinja2 template engine.  It is called a micro framework because it does not
 presume or force a developer to use a particular tool or library.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-flask))))))
 
 (define-public python2-flask
@@ -8565,7 +8543,7 @@ Python.")
     (synopsis "Utility for mocking out the `requests` Python library")
     (description "A utility library for mocking out the `requests` Python
 library.")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-responses))))))
 
 (define-public python2-responses
@@ -8626,7 +8604,7 @@ ambiguities (forward vs. backward slashes, etc.).
     (synopsis "Approximate and phonetic matching of strings")
     (description "Jellyfish uses a variety of string comparison and phonetic
 encoding algorithms to do fuzzy string matching.")
-    (license bsd-2)
+    (license license:bsd-2)
     (properties `((python2-variant . ,(delay python2-jellyfish))))))
 
 (define-public python2-jellyfish
@@ -8662,7 +8640,7 @@ encoding algorithms to do fuzzy string matching.")
     (synopsis "Unicode CSV module for Python 2")
     (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
 module, adding support for Unicode strings.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python-rarfile
   (package
@@ -8691,7 +8669,7 @@ module, adding support for Unicode strings.")
     (synopsis "RAR archive reader for Python")
     (description "This is Python module for RAR archive reading.  The interface
 is made as zipfile like as possible.")
-    (license isc)))
+    (license license:isc)))
 
 (define-public python2-rarfile
   (package-with-python2 python-rarfile))
@@ -8801,7 +8779,7 @@ in storage services that are compatible with the Amazon Simple Storage
 Service (S3) protocol, including S3 itself.  It supports rsync-like backup,
 GnuPG encryption, and more.  It also supports management of Amazon's
 CloudFront content delivery network.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public python-pkgconfig
   (package
@@ -8869,7 +8847,7 @@ LDFLAGS and parse the output to build extensions with setup.py.")
 files.  It contains a drop-in replacement for the I/O interface in the
 standard library's @code{bz2} module, including features from the latest
 development version of CPython that are not available in older releases.")
-    (license asl2.0)
+    (license license:asl2.0)
     (properties `((python2-variant . ,(delay python2-bz2file))))))
 
 (define-public python2-bz2file
@@ -8961,7 +8939,7 @@ to support both Python 2 and Python 3 with minimal overhead.")
 other signals and errors) in Cython code, using two related approaches,
 for mixed Cython/Python code or external C libraries and pure Cython code,
 respectively.")
-    (license lgpl3+)))
+    (license license:lgpl3+)))
 
 (define-public python2-cysignals
   (package-with-python2 python-cysignals))
@@ -9004,7 +8982,7 @@ respectively.")
   (synopsis "Experimental Python-2 to C++ Compiler")
   (description (string-append "This is an experimental compiler for a subset of
 Python.  It generates C++ code and a Makefile."))
-  (license (list gpl3 bsd-3 license:expat))))
+  (license (list license:gpl3 license:bsd-3 license:expat))))
 
 (define-public python2-rope
   (package
@@ -9031,7 +9009,7 @@ Python.  It generates C++ code and a Makefile."))
 the renaming, moving and extracting of attributes, functions, modules, fields
 and parameters in Python 2 source code.  These refactorings can also be applied
 to occurences in strings and comments.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public python-py3status
   (package
@@ -9052,7 +9030,7 @@ to occurences in strings and comments.")
     (description "py3status is an i3status wrapper which extends i3status
 functionality in a modular way, allowing you to extend your panel with your
 own code, responding to click events and updating clock every second.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python-tblib
   (package
@@ -9092,7 +9070,7 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 
 @item Parse traceback strings and raise with the parsed tracebacks.
 @end itemize")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-tblib
   (package-with-python2 python-tblib))
@@ -9126,7 +9104,7 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
     (synopsis "Non-validating SQL parser")
     (description "Sqlparse is a non-validating SQL parser for Python.  It
 provides support for parsing, splitting and formatting SQL statements.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-sqlparse
   (package-with-python2 python-sqlparse))
@@ -9151,7 +9129,7 @@ provides support for parsing, splitting and formatting SQL statements.")
 that supports micro-threads called \"tasklets\".  Tasklets run
 pseudo-concurrently (typically in a single or a few OS-level threads) and
 are synchronized with data exchanges on \"channels\".")
-    (license (list psfl license:expat))))
+    (license (list license:psfl license:expat))))
 
 (define-public python2-greenlet
   (package-with-python2 python-greenlet))
@@ -9239,7 +9217,7 @@ focus on event-based network programming and multiprotocol integration.")
     (synopsis "Python Lex & Yacc")
     (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
 It uses LR parsing and does extensive error checking.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-ply))))))
 
 (define-public python2-ply
@@ -9303,7 +9281,7 @@ data in Python.")
      "Kazoo is a Python client library for the Apache Zookeeper distributed
 application service.  It is designed to be easy to use and to avoid common
 programming errors.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-kazoo
   (package-with-python2 python-kazoo))
@@ -9337,7 +9315,7 @@ programming errors.")
      "PyKafka is a client for the Apache Kafka distributed messaging system.
 It includes Python implementations of Kafka producers and consumers, which
 are optionally backed by a C extension built on librdkafka.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-pykafka
   (package-with-python2 python-pykafka))
@@ -9398,7 +9376,7 @@ specified in POSIX.1-2001 and POSIX.1-2008.")
 It supports both the original 1.0 specification, as well as the
 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
 etc.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python-chai
   (package
@@ -9418,7 +9396,7 @@ etc.")
     (description
      "Chai provides an api for mocking, stubbing and spying your python
 objects, patterned after the Mocha library for Ruby.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-chai
   (package-with-python2 python-chai))
@@ -9447,7 +9425,7 @@ objects, patterned after the Mocha library for Ruby.")
      "Arrow is a Python library to creating, manipulating, formatting and
 converting dates, times, and timestamps.  It implements and updates the
 datetime type.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public python2-arrow
   (package-with-python2 python-arrow))
@@ -9494,7 +9472,7 @@ underscored string.")
     (description "Pure Python Levenshtein implementation, based off the
 Wikipedia code samples at
 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-pylev
   (package-with-python2 python-pylev))
@@ -9546,7 +9524,7 @@ docstring and colored output.")
     (description
      "Lazy object proxy is an object that wraps a callable but defers the call
 until the object is actually required, and caches the result of said call.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public python2-lazy-object-proxy
   (package-with-python2 python-lazy-object-proxy))
@@ -9605,7 +9583,7 @@ It supports TSIG authenticated messages and EDNS0.")
     (synopsis "Email address validation library for Python")
     (description
      "This library validates email address syntax and deliverability.")
-    (license cc0)))
+    (license license:cc0)))
 
 (define-public python2-email-validator
   (package-with-python2 python-email-validator))
@@ -9700,7 +9678,7 @@ addresses, and phone numbers.")
     (description
      "pyaml is a PyYAML based python module to produce pretty and readable
 YAML-serialized data.")
-    (license (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
+    (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
 
 (define-public python2-pyaml
   (package-with-python2 python-pyaml))
@@ -9723,7 +9701,7 @@ YAML-serialized data.")
     (description
      "flexmock is a testing library for Python that makes it easy to create
 mocks, stubs and fakes.")
-    (license bsd-3)))
+    (license license:bsd-3)))
 
 (define-public python2-flexmock
   (package-with-python2 python-flexmock))
@@ -9794,7 +9772,7 @@ interfaces in Python.  It's like GNU Readline but it also features syntax
 highlighting while typing, out-of-the-box multi-line input editing, advanced
 code completion, incremental search, support for Chinese double-width
 characters, mouse support, and auto suggestions.")
-  (license bsd-3)
+  (license license:bsd-3)
   (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
 
 (define-public python2-prompt-toolkit
@@ -9857,7 +9835,7 @@ characters, mouse support, and auto suggestions.")
 It supports syntax highlighting, multiline editing, autocompletion, mouse,
 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
 etc.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay ptpython-2))))))
 
 (define-public ptpython-2
@@ -9897,7 +9875,7 @@ etc.")
      "Stem is a Python controller library for Tor.  With it you can use Tor's
 control protocol to script against the Tor process and read descriptor data
 relays publish about themselves.")
-    (license lgpl3)))
+    (license license:lgpl3)))
 
 (define-public python2-stem
   (package-with-python2 python-stem))
@@ -9920,7 +9898,7 @@ relays publish about themselves.")
     (description "@code{pyserial} provide serial port bindings for Python.  It
 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
 and/or Xon/Xoff.  The port is accessed in RAW mode.")
-    (license bsd-3)
+    (license license:bsd-3)
     (properties `((python2-variant . ,(delay python2-pyserial))))))
 
 (define-public python2-pyserial
@@ -9994,3 +9972,272 @@ hardware-accelerated multitouch applications.")
 
 (define-public python2-kivy-next
   (package-with-python2 python-kivy-next))
+
+(define-public python-binaryornot
+  (package
+    (name "python-binaryornot")
+    (version "0.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "binaryornot" version))
+              (sha256
+               (base32
+                "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-chardet" ,python-chardet)
+       ("python-hypothesis" ,python-hypothesis)))
+    (home-page "https://github.com/audreyr/binaryornot")
+    (synopsis "Package to check if a file is binary or text")
+    (description "Ultra-lightweight pure Python package to check if a file is
+binary or text.")
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-binaryornot))))))
+
+(define-public python2-binaryornot
+  (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base)))
+      (inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-inputs base))))))
+
+(define-public python-nltk
+  (package
+    (name "python-nltk")
+    (version "3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "nltk" version))
+              (sha256
+               (base32
+                "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
+    (build-system python-build-system)
+    (home-page "http://nltk.org/")
+    (synopsis "Natural Language Toolkit")
+    (description "It provides interfaces to over 50 corpora and lexical
+resources such as WordNet, along with a suite of text processing libraries
+for classification, tokenization, stemming, tagging, parsing, and semantic
+reasoning, wrappers for natural language processing libraries.")
+    (license license:asl2.0)
+    (properties `((python2-variant . ,(delay python2-nltk))))))
+
+(define-public python2-nltk
+  (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-pymongo
+  (package
+    (name "python-pymongo")
+    (version "3.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pymongo" version))
+              (sha256
+               (base32
+                "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-certifi" ,python-certifi)))
+    (home-page "http://github.com/mongodb/mongo-python-driver")
+    (synopsis "Python driver for MongoDB")
+    (description "Python driver for MongoDB.")
+    (license license:asl2.0)
+    (properties `((python2-variant . ,(delay python2-pymongo))))))
+
+(define-public python2-pymongo
+  (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-sh
+  (package
+    (name "python-sh")
+    (version "1.11")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "sh" version))
+              (sha256
+               (base32
+                "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; no tests
+    (home-page "https://github.com/amoffat/sh")
+    (synopsis "Python subprocess interface")
+    (description "Abstracts process invocation by providing a function
+interface for programs.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-sh))))))
+
+(define-public python2-sh
+  (let ((base (package-with-python2 (strip-python2-variant python-sh))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-schematics
+  (package
+    (name "python-schematics")
+    (version "1.1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-six" ,python-six)))
+    (arguments
+     `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
+                     ; version requirements (eg python-coveralls)
+    (home-page "https://github.com/schematics/schematics")
+    (synopsis "Python Data Structures for Humans")
+    (description "Python Data Structures for Humans.")
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-schematics))))))
+
+(define-public python2-schematics
+  (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-publicsuffix
+  (package
+    (name "python-publicsuffix")
+    (version "1.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "publicsuffix" version))
+              (sha256
+               (base32
+                "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; tests use the internet
+    (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
+    (synopsis "Get suffix for a domain name")
+    (description "Get a public suffix for a domain name using the Public Suffix
+List.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-nltk))))))
+
+(define-public python2-publicsuffix
+  (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-publicsuffix2
+  (package
+    (name "python-publicsuffix2")
+    (version "2.20160621")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
+       (sha256
+        (base32
+         "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/pombredanne/python-publicsuffix2")
+    (synopsis "Get a public suffix for a domain name using the Public Suffix List")
+    (description "Get a public suffix for a domain name using the Public Suffix
+List.  Forked from and using the same API as the publicsuffix package.")
+    (license (list license:expat license:mpl2.0))
+    (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
+
+(define-public python2-publicsuffix2
+  (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-url
+  (package
+    (name "python-url")
+    (version "0.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "url" version))
+              (sha256
+               (base32
+                "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-publicsuffix" ,python-publicsuffix)))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
+    (arguments
+     `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
+    (home-page "http://github.com/seomoz/url-py")
+    (synopsis "URL Parsing")
+    (description "Library for parsing urls.")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-url))))))
+
+(define-public python2-url
+  (let ((base (package-with-python2 (strip-python2-variant python-url))))
+    (package (inherit base)
+      (inputs
+       `(("python2-publicsuffix" ,python2-publicsuffix)))
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
+(define-public python-freezegun
+  (package
+    (name "python-freezegun")
+    (version "0.3.7")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "freezegun" version))
+        (sha256
+          (base32
+            "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)
+       ("python-coverage" ,python-coverage)
+       ("python-dateutil-2" ,python-dateutil-2)))
+    (inputs
+     `(("python-six" ,python-six)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+        ;; The tests are normally executed via `make test`, but the PyPi
+        ;; package does not include the Makefile.
+        (replace 'check
+          (lambda _
+            (zero? (system* "nosetests" "./tests/")))))))
+    (home-page "https://github.com/spulec/freezegun")
+    (synopsis "Test utility for mocking the datetime module")
+    (description
+      "FreezeGun is a library that allows your python tests to travel through
+time by mocking the datetime module.")
+    (license license:asl2.0)))
+
+(define-public python2-freezegun
+  (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index a7eee7c06c..95690fa962 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -20,7 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages qt)
-  #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ lgpl3 x11-style))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build utils)
@@ -206,7 +206,7 @@
     (synopsis "Cross-platform GUI library")
     (description "Qt is a cross-platform application and UI framework for
 developers using C++ or QML, a CSS & JavaScript like language.")
-    (license lgpl2.1)
+    (license license:lgpl2.1)
 
     ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
     ;; see <http://hydra.gnu.org/build/112828>.
@@ -474,12 +474,24 @@ developers using C++ or QML, a CSS & JavaScript like language.")
     (native-search-paths
      (list (search-path-specification
             (variable "QMAKEPATH")
-            (files '("")))))
+            (files '("")))
+           (search-path-specification
+            (variable "QML2_IMPORT_PATH")
+            (files '("qml")))
+           (search-path-specification
+            (variable "QT_PLUGIN_PATH")
+            (files '("plugins")))
+           (search-path-specification
+            (variable "XDG_DATA_DIRS")
+            (files '("share")))
+           (search-path-specification
+            (variable "XDG_CONFIG_DIRS")
+            (files '("etc/xdg")))))
     (home-page "https://www.qt.io/")
     (synopsis "Cross-platform GUI library")
     (description "Qt is a cross-platform application and UI framework for
 developers using C++ or QML, a CSS & JavaScript like language.")
-    (license (list lgpl2.1 lgpl3))))
+    (license (list license:lgpl2.1 license:lgpl3))))
 
 (define-public qtsvg
   (package (inherit qtbase)
@@ -908,7 +920,7 @@ is then compiled to create the bindings extension module.  The SIP Python
 module provides support functions to the automatically generated code.")
     ;; There is a choice between a python like license, gpl2 and gpl3.
     ;; For compatibility with pyqt, we need gpl3.
-    (license gpl3)))
+    (license license:gpl3)))
 
 (define-public python2-sip
   (package (inherit python-sip)
@@ -973,7 +985,7 @@ module provides support functions to the automatically generated code.")
      "PyQt is a set of Python v2 and v3 bindings for the Qt application
 framework.  The bindings are implemented as a set of Python modules and
 contain over 620 classes.")
-    (license gpl3)))
+    (license license:gpl3)))
 
 (define-public python2-pyqt
   (package (inherit python-pyqt)
@@ -1055,7 +1067,7 @@ contain over 620 classes.")
                              "--destdir" lib
                              "--sipdir" sip))))
          %standard-phases)))
-    (license (list gpl2 gpl3)))) ; choice of either license
+    (license (list license:gpl2 license:gpl3)))) ; choice of either license
 
 (define-public qtkeychain
   (package
@@ -1089,4 +1101,4 @@ contain over 620 classes.")
     (description
       "QtKeychain is a Qt library to store passwords and other secret data
 securely.  It will not store any data unencrypted unless explicitly requested.")
-    (license bsd-3)))
+    (license license:bsd-3)))
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 52cdef1066..46588dd002 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4120,21 +4120,18 @@ call.")
      `(#:test-target "spec"
        #:phases
        (modify-phases %standard-phases
-         (add-before 'build 'remove-git-lsfiles-and-extra-gemspecs
-           (lambda _
-             (for-each (lambda (file)
-                         (substitute* file
-                           (("git ls-files") "find * |sort")))
-                       (list "concurrent-ruby.gemspec"
-                             "support/file_map.rb"))
-             #t))
-         (add-before 'build 'remove-extra-gemspecs
+         (add-before 'replace-git-ls-files 'remove-extra-gemspecs
            (lambda _
              ;; Delete extra gemspec files so 'first-gemspec' chooses the
              ;; correct one.
              (delete-file "concurrent-ruby-edge.gemspec")
              (delete-file "concurrent-ruby-ext.gemspec")
              #t))
+         (add-before 'build 'replace-git-ls-files2
+           (lambda _
+             (substitute* "support/file_map.rb"
+               (("git ls-files") "find * |sort"))
+             #t))
          (add-before 'check 'rake-compile
            ;; Fix the test error described at
            ;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408
diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm
index 77e033f847..675ca0ce5e 100644
--- a/gnu/packages/smalltalk.scm
+++ b/gnu/packages/smalltalk.scm
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,14 +20,23 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages smalltalk)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libsigsegv)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio)
+  #:use-module (gnu packages xorg)
   #:use-module (gnu packages zip))
 
 (define-public smalltalk
@@ -63,4 +74,76 @@
      "GNU Smalltalk is a free implementation of the Smalltalk language.  It
 implements the ANSI standard for the language and also includes extra classes
 such as ones for networking and GUI programming.")
-    (license gpl2+)))
+    (license license:gpl2+)))
+
+(define-public squeak-vm
+  (package
+    (name "squeak-vm")
+    (version "4.10.2.2614")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.squeakvm.org/unix/release/"
+                           "Squeak-" version "-src.tar.gz"))
+       (sha256
+        (base32
+         "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Make builds bit-reproducible.
+        '(begin
+           (substitute* "unix/cmake/verstamp"
+             (("vm_date=.*")
+              "vm_date = \"1970-01-01\";\n")
+             (("ux_version=.*")
+              "ux_version = \"GNU\";\n"))
+           (substitute* "unix/vm/config.cmake"
+             (("\\(VM_BUILD_STRING.*")
+              "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")"))))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("dbus" ,dbus)
+       ("freetype" ,freetype)
+       ("libffi" ,libffi)
+       ("libxrender" ,libxrender)
+       ("mesa" ,mesa)
+       ("pulseaudio" ,pulseaudio)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no check target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-hardcoded-PATH
+           (lambda _
+             ;; Remove hard-coded FHS PATH entries.
+             (substitute* '("unix/cmake/squeak.in"
+                            "unix/cmake/squeak.sh.in")
+               (("^PATH=.*") ""))
+             #t))
+         (add-after 'unpack 'create-build-dir
+           (lambda _
+             (mkdir "bld")
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (with-directory-excursion "bld"
+                 (zero?
+                  (system* "../unix/cmake/configure"
+                           (string-append "--prefix=" out)
+                           "--without-quartz"))))))
+         (replace 'build
+           (lambda _
+             (with-directory-excursion "bld"
+               (zero? (system* "make"))))))))
+    (synopsis "Smalltalk programming language and environment")
+    (description "Squeak is a full-featured implementation of the Smalltalk
+programming language and environment based on (and largely compatible with)
+the original Smalltalk-80 system.  Squeak has very powerful 2- and 3-D
+graphics, sound, video, MIDI, animation and other multimedia capabilities.  It
+also includes a customisable framework for creating dynamic HTTP servers and
+interactively extensible Web sites.")
+    (home-page "http://www.squeakvm.org")
+    (license license:x11)))
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 252ae8b9e8..7837723e39 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -187,7 +187,12 @@ text-based approach to terminal recording.")
 terminal emulators.  It tries to support all common standards while keeping
 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
     (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
-    (license (list license:expat license:public-domain))))
+    ;; Hash table implementation is lgpl2.1+ licensed.
+    ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
+    ;; derived from ISC.
+    ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
+    ;; under the bsd 2 license.
+    (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2))))
 
 (define-public kmscon
   (package
@@ -217,4 +222,11 @@ compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
 mode setting (KMS).  It is an attempt to replace the in-kernel VT implementation
 with a userspace console.  See kmscon(1) man-page for usage information.")
     (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
-    (license (list license:expat license:public-domain))))
+    ;; Hash table implementation is lgpl2.1+ licensed.
+    ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
+    ;; derived from ISC.
+    ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
+    ;; under the bsd 2 license.
+    ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
+    ;; under the terms of the GNU GPL.
+    (license (list license:expat license:lgpl2.1+ license:bsd-2 license:gpl2+))))
diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm
new file mode 100644
index 0000000000..15b24a6056
--- /dev/null
+++ b/gnu/packages/u-boot.scm
@@ -0,0 +1,139 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2016 David Craven <david@craven.ch>
+;;;
+;;; 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 (gnu packages u-boot)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module ((gnu packages algebra) #:select (bc))
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages python))
+
+(define-public dtc
+  (package
+    (name "dtc")
+    (version "1.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.kernel.org/pub/software/utils/dtc/"
+                    "dtc-" version ".tar.xz"))
+              (sha256
+               (base32
+                "155v52palf5fwfcnq696s41whjk0a5dqx98b7maqzdn7xbc2m6bp"))
+              (patches
+                (search-patches "dtc-add-missing-symbols-to-lds.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)))
+    (arguments
+     `(#:make-flags
+       (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda _
+             (substitute* "Makefile"
+               (("/usr/bin/install") "install"))
+             (substitute* "Makefile"
+               (("PREFIX = \\$\\(HOME\\)") ""))))
+         (delete 'configure))))
+    (home-page "https://www.devicetree.org")
+    (synopsis "Compiles device tree source files")
+    (description "@command{dtc} compiles device tree source files to device
+tree binary files. These are board description files used by Linux and BSD.")
+    (license license:gpl2+)))
+
+(define u-boot
+  (package
+    (name "u-boot")
+    (version "2016.07")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "ftp://ftp.denx.de/pub/u-boot/"
+                    "u-boot-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0lqj4ckmfqiap8mc6z2d5albs3g2h5mzccbn60hsgxhabhibfkwp"))))
+    (native-inputs
+     `(("bc" ,bc)
+       ("dtc" ,dtc)
+       ("python-2" ,python-2)))
+    (build-system  gnu-build-system)
+    (home-page "http://www.denx.de/wiki/U-Boot/")
+    (synopsis "ARM bootloader")
+    (description "U-Boot is a bootloader used mostly for ARM boards. It
+also initializes the boards (RAM etc).")
+    (license license:gpl2+)))
+
+(define (make-u-boot-package board triplet)
+  "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
+  (package
+    (inherit u-boot)
+    (name (string-append "u-boot-" (string-downcase board)))
+    (native-inputs
+     `(("cross-gcc" ,(cross-gcc triplet))
+       ("cross-binutils" ,(cross-binutils triplet))
+       ,@(package-native-inputs u-boot)))
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-"))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let ((config-name (string-append ,board "_defconfig")))
+               (if (file-exists? (string-append "configs/" config-name))
+                   (zero? (apply system* "make" `(,@make-flags ,config-name)))
+                   (begin
+                     (display "Invalid board name. Valid board names are:")
+                     (let ((dir (opendir "configs"))
+                           (suffix-length (string-length "_defconfig")))
+                       (do ((file-name (readdir dir) (readdir dir)))
+                           ((eof-object? file-name))
+                         (when (string-suffix? "_defconfig" file-name)
+                           (format #t "- ~A\n"
+                                   (string-drop-right file-name suffix-length))))
+                       (closedir dir))
+                     #f)))))
+         (replace 'install
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (libexec (string-append out "/libexec"))
+                    (uboot-files (find-files "." ".*\\.(bin|efi|spl)$")))
+               (mkdir-p libexec)
+               (for-each
+                (lambda (file)
+                  (let ((target-file (string-append libexec "/" file)))
+                    (mkdir-p (dirname target-file))
+                    (copy-file file target-file)))
+                uboot-files)))))))))
+
+(define-public u-boot-vexpress_ca9x4
+  (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
+
+(define-public u-boot-malta
+  (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c39368d9ad..9ff9801997 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,10 +28,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages version-control)
-  #:use-module ((guix licenses)
-                #:select (asl2.0 bsd-2 bsd-3
-                          gpl1+ gpl2 gpl2+ gpl3+ lgpl2.1
-                          public-domain x11-style))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -108,19 +106,19 @@
      "GNU Bazaar is a version control system that allows you to record
 changes to project files over time.  It supports both a distributed workflow
 as well as the classic centralized workflow.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public git
   (package
    (name "git")
-   (version "2.9.3")
+   (version "2.10.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://kernel.org/software/scm/git/git-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0qzs681a64k3shh5p0rg41l1z16fbk5sj0xga45k34hp1hsp654z"))))
+              "1rr9zyafb6q3wixyjar6cc7z7vdh1dqa4b5irz3gz1df02n68cy7"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("native-perl" ,perl)
@@ -133,7 +131,7 @@ as well as the classic centralized workflow.")
                 version ".tar.xz"))
           (sha256
            (base32
-            "0kabsmjfbvq4y1vlwq0yl2y4033a90rnwsq01d7np3cvy55fiq0l"))))))
+            "1y92v1bxk67ilsizqnjba6hqvrsy2zvmipyd9nnz865s21yrj5ry"))))))
    (inputs
     `(("curl" ,curl)
       ("expat" ,expat)
@@ -292,7 +290,7 @@ as well as the classic centralized workflow.")
    (description
     "Git is a free distributed version control system designed to handle
 everything from small to very large projects with speed and efficiency.")
-   (license gpl2)
+   (license license:gpl2)
    (home-page "http://git-scm.com/")))
 
 (define-public libgit2
@@ -336,7 +334,7 @@ everything from small to very large projects with speed and efficiency.")
 provided as a re-entrant linkable library with a solid API, allowing you to
 write native speed custom Git applications in any language with bindings.")
     ;; GPLv2 with linking exception
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public cgit
   (package
@@ -397,7 +395,7 @@ write native speed custom Git applications in any language with bindings.")
     (description
      "CGit is an attempt to create a fast web interface for the Git SCM, using
 a built-in cache to decrease server I/O pressure.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public shflags
   (package
@@ -441,7 +439,7 @@ different versions of getopt on various OSes make writing portable shell
 scripts difficult.  shFlags instead provides an API that doesn't change across
 shell and OS versions so the script writer can be confident that the script
 will work.")
-    (license lgpl2.1)))
+    (license license:lgpl2.1)))
 
 (define-public git-flow
   (package
@@ -484,7 +482,7 @@ management strategy that helps developers keep track of features, hotfixes,
 and releases in bigger software projects.  The git-flow library of git
 subcommands helps automate some parts of the flow to make working with it a
 lot easier.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public git-test-sequence
   (let ((commit "48e5a2f5a13a5f30452647237e23362b459b9c76"))
@@ -519,7 +517,7 @@ lot easier.")
        "git-test-sequence is similar to an automated git bisect except it’s
 linear.  It will test every change between two points in the DAG.  It will
 also walk each side of a merge and test those changes individually.")
-      (license (x11-style "file://LICENSE")))))
+      (license (license:x11-style "file://LICENSE")))))
 
 (define-public gitolite
   (package
@@ -575,7 +573,7 @@ also walk each side of a merge and test those changes individually.")
     (description
      "Gitolite is an access control layer on top of Git, providing fine access
 control to Git repositories.")
-    (license gpl2)))
+    (license license:gpl2)))
 
 (define-public mercurial
   (package
@@ -602,7 +600,7 @@ control to Git repositories.")
      "Mercurial is a free, distributed source control management tool.
 It efficiently handles projects of any size
 and offers an easy and intuitive interface.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public neon
   (package
@@ -650,7 +648,7 @@ abstract interface to parsing XML using libxml2 or expat, and wrappers for
 simplifying handling XML HTTP response bodies;
 WebDAV metadata support, wrappers for PROPFIND and PROPPATCH to simplify
 property manipulation.")
-    (license gpl2+))) ; for documentation and tests; source under lgpl2.0+
+    (license license:gpl2+))) ; for documentation and tests; source under lgpl2.0+
 
 (define-public subversion
   (package
@@ -717,7 +715,7 @@ centralized version control system characterized by its
 reliability as a safe haven for valuable data; the simplicity of its model and
 usage; and its ability to support the needs of a wide variety of users and
 projects, from individuals to large-scale enterprise operations.")
-    (license asl2.0)))
+    (license license:asl2.0)))
 
 (define-public rcs
   (package
@@ -740,7 +738,7 @@ file-by-file basis, in contrast to subsequent version control systems such as
 CVS, Subversion, and Git.  This can make it suitable for system
 administration files, for example, which are often inherently local to one
 machine.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public cvs
   (package
@@ -768,7 +766,7 @@ machine.")
 Configuration Management (SCM).  Using it, you can record the history of
 sources files, and documents.  It fills a similar role to the free software
 RCS, PRCS, and Aegis packages.")
-    (license gpl1+)))
+    (license license:gpl1+)))
 
 (define-public cvs-fast-export
   (package
@@ -807,7 +805,7 @@ The program can also produce a visualization of the resulting commit directed
 acyclic graph (DAG) in the input format of @uref{http://www.graphviz.org,
 Graphviz}.  The package also includes @command{cvssync}, a tool for mirroring
 masters from remote CVS hosts.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public vc-dwim
   (package
@@ -833,7 +831,7 @@ using version control at the same time, for example by printing a reminder
 when a file change has been described in the ChangeLog but the file has not
 been added to the VC.  vc-chlog scans changed files and generates
 standards-compliant ChangeLog entries based on the changes that it detects.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public diffstat
   (package
@@ -854,7 +852,7 @@ standards-compliant ChangeLog entries based on the changes that it detects.")
      "Diffstat reads the output of 'diff' and displays a histogram of the
 insertions, deletions, and modifications per-file.  It is useful for reviewing
 large, complex patch files.")
-    (license (x11-style "file://COPYING"))))
+    (license (license:x11-style "file://COPYING"))))
 
 (define-public cssc
   (package
@@ -896,7 +894,7 @@ large, complex patch files.")
     (description  "GNU CSSC provides a replacement for the legacy Unix source
 code control system SCCS.  This allows old code still under that system to be
 accessed and migrated on modern systems.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 ;; This package can unfortunately work only in -TEST mode, since Aegis
 ;; requires that it is installed setuid root.
@@ -980,7 +978,7 @@ changes to a program independently, and Aegis coordinates integrating these
 changes back into the master source of the program, with as little disruption
 as possible.  Resolution of contention for source files, a major headache for
 any project with more than one developer, is one of Aegis's major functions.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public reposurgeon
   (package
@@ -1032,7 +1030,7 @@ and can thus be used to script production of very high-quality conversions
 from Subversion to any supported Distributed Version Control System (DVCS).")
     ;; Most files are distributed under bsd-2, except 'repocutter' which is
     ;; under bsd-3.
-    (license (list bsd-2 bsd-3))))
+    (license (list license:bsd-2 license:bsd-3))))
 
 (define-public tig
   (package
@@ -1058,7 +1056,7 @@ from Subversion to any supported Distributed Version Control System (DVCS).")
      "Tig is an ncurses text user interface for Git, primarily intended as
 a history browser.  It can also stage hunks for commit, or colorize the
 output of the 'git' command.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public findnewest
   (package
@@ -1085,7 +1083,7 @@ output of the 'git' command.")
     (description
      "Recursively find the newest file in a file tree and print its
 modification time.")
-    (license bsd-2)))
+    (license license:bsd-2)))
 
 (define-public myrepos
   (package
@@ -1114,7 +1112,7 @@ modification time.")
 fetching updates) over a collection of version control repositories.  It
 supports a large number of version control systems: Git, Subversion,
 Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
-    (license gpl2+)))
+    (license license:gpl2+)))
 
 (define-public git-annex-remote-hubic
   (package
@@ -1145,42 +1143,21 @@ Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
     (description
      "This package allows you to use your hubic account as a \"special
 repository\" with git-annex.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public fossil
   (package
     (name "fossil")
-    (version "1.34")
+    (version "1.35")
     (source
      (origin
        (method url-fetch)
-       ;; Upstream source affected by
-       ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20962
        (uri (string-append
-             "https://web.archive.org/web/20160402202958/"
-             "https://www.fossil-scm.org/download/fossil-src-"
-             version ".tar.gz"))
+             "https://www.fossil-scm.org/index.html/uv/download/"
+             "fossil-src-" version ".tar.gz"))
        (sha256
         (base32
-         "17x4vgjcfihwmq195qg32irp50panvjqfpvhqydfvv4ghwzbi9jk"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; Commit 0a2ebe57 on 2015-08-03 18:35:53 changed output formatting
-           ;; for some commands, but affected tests were not updated.  Use
-           ;; substitute here, which is more concise than patching.
-           (substitute* "test/clean.test"
-             (("NEW ") "NEW    "))
-           (substitute* '("test/revert.test" "test/mv-rm.test")
-             (("REVERTED:") "REVERT  ")
-             (("DELETE:")   "DELETE  ")
-             (("UNMANAGE:") "UNMANAGE "))
-           ;; Fix use of __DATE__ and __TIME__
-           (substitute* "src/main.c"
-             (("Compiled on %s %s") "Compiled")
-             (("__DATE__, __TIME__, ") ""))
-           #t))
-       (patches (list (search-patch "fossil-test-fixes.patch")))))
+         "07ds6rhq69bhydpm9a01mgdhxf88p9b6y5hdnhn8gjc7ba92zyf1"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("tcl" ,tcl)                     ;for configuration only
@@ -1219,5 +1196,32 @@ repository\" with git-annex.")
      "Fossil is a distributed source control management system which supports
 access and administration over HTTP CGI or via a built-in HTTP server.  It has
 a built-in wiki, built-in file browsing, built-in tickets system, etc.")
-    (license (list public-domain        ;src/miniz.c, src/shell.c
-                   bsd-2))))
+    (license (list license:public-domain        ;src/miniz.c, src/shell.c
+                   license:bsd-2))))
+
+(define-public stagit
+  (package
+    (name "stagit")
+    (version "0.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://dl.2f30.org/releases/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0z5r06wqrfnsz24ci4hjqbd62svclvhkgzaq9npsyjcp6jnf7izc"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No tests
+       #:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)))) ; No configure script
+    (inputs
+     `(("libgit2" ,libgit2)))
+    (home-page "http://2f30.org")
+    (synopsis "Static git page generator")
+    (description "Stagit creates static pages for git repositories, the results can
+be served with a HTTP file server of your choice.")
+    (license license:expat)))
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 5c59ee2f95..5ec1424b22 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -400,14 +400,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 (define-public ffmpeg
   (package
     (name "ffmpeg")
-    (version "3.1.2")
+    (version "3.1.3")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0qdxp6r6x47jzi6nmbsv3dhvm073c8n5hpnlmj5gwihgkyva5ljq"))))
+               "08l8290gipm632dhrqndnphdpkc5ncqc1j3hxdx46r1a3q3mqmzq"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
@@ -790,7 +790,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.19.0")
+    (version "0.20.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -798,7 +798,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
                     ".tar.gz"))
               (sha256
                (base32
-                "1qk7blpg64v47qfnvpgnbf413v5gzn900wmlivs727fd88cq3x9x"))
+                "0mibhjg5skcwcfpg6dx7yi2gj14xawnq2jzmcfwq9knmvv9cjvpy"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index cc83a04679..323ff111d4 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -938,7 +940,7 @@ connectivity of the X server running on a particular @code{DISPLAY}.")
 (define-public rofi
   (package
     (name "rofi")
-    (version "1.1.0")
+    (version "1.2.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/DaveDavenport/rofi/"
@@ -946,17 +948,17 @@ connectivity of the X server running on a particular @code{DISPLAY}.")
                                   version "/rofi-" version ".tar.xz"))
               (sha256
                (base32
-                "1l8vl0mh7i0b1ycifqpg6392f5i4qxlv003m126skfk6fnlfq8hn"))))
+                "0xxx0xpxhrhlhi2axq9867zqrhwqavc1qrr833k1xr0pvm5m0aqc"))))
     (build-system gnu-build-system)
     (inputs
-     `(("libx11" ,libx11)
-       ("pango" ,pango)
+     `(("pango" ,pango)
        ("cairo" ,cairo)
        ("glib" ,glib)
        ("startup-notification" ,startup-notification)
        ("libxkbcommon" ,libxkbcommon)
        ("libxcb" ,libxcb)
        ("xcb-util" ,xcb-util)
+       ("xcb-util-xrm" ,xcb-util-xrm)
        ("xcb-util-wm" ,xcb-util-wm)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1021,3 +1023,42 @@ The taskbar includes transparency and color settings for the font, icons,
 border, and background.  It also supports multihead setups, customized mouse
 actions, a built-in clock, a battery monitor and a system tray.")
     (license license:gpl2)))
+
+(define-public xcb-util-xrm
+  (package
+    (name "xcb-util-xrm")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/Airblader/xcb-util-xrm/releases"
+                    "/download/v" version "/xcb-util-xrm-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1h5vxwpd37dqfw9yj1l4zd9c5dj30r3g0szgysr6kd7xrqgaq04l"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Drop bundled m4.
+               '(delete-file-recursively "m4"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("m4" ,m4)
+       ("libx11" ,libx11))) ; for tests
+    (inputs
+     `(("libxcb" ,libxcb)
+       ("xcb-util" ,xcb-util)))
+    (home-page "https://github.com/Airblader/xcb-util-xrm")
+    (synopsis "XCB utility functions for the X resource manager")
+    (description
+     "The XCB util module provides a number of libraries which sit on
+top of libxcb, the core X protocol library, and some of the extension
+libraries.  These experimental libraries provide convenience functions
+and interfaces which make the raw X protocol more usable.  Some of the
+libraries also provide client-side code which is not strictly part of
+the X protocol but which has traditionally been provided by Xlib.
+
+XCB util-xrm module provides the following libraries:
+
+- xrm: utility functions for the X resource manager.")
+    (license license:x11)))
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 33ebc80733..fe14b1c6d4 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2384,7 +2384,7 @@ devices, thus making direct access unnecessary.")
 (define-public xf86-input-evdev
   (package
     (name "xf86-input-evdev")
-    (version "2.10.1")
+    (version "2.10.3")
     (source
       (origin
         (method url-fetch)
@@ -2394,7 +2394,7 @@ devices, thus making direct access unnecessary.")
                ".tar.bz2"))
         (sha256
           (base32
-            "05z05n39v8s2b0hwhcjb1bca7j8gc62bv9jxnibawwmjym3jp75g"))))
+            "18ijnclnylrr7vkvflalkw4bqfily3scg6baczjjgycdpsj1p8js"))))
     (build-system gnu-build-system)
     (inputs
       `(("udev" ,eudev)
@@ -2534,7 +2534,7 @@ as USB mice.")
 (define-public xf86-input-synaptics
   (package
     (name "xf86-input-synaptics")
-    (version "1.8.3")
+    (version "1.8.99.1")
     (source
       (origin
         (method url-fetch)
@@ -2544,7 +2544,7 @@ as USB mice.")
                ".tar.bz2"))
         (sha256
           (base32
-            "009zx199pilcvlaqm6fx4mg94q81d6vvl5rznmw3frzkfh6117yk"))))
+            "1apbcwn20p7sy07ghlldmqcnxag2r9sdjqmb4xxzki0hz8wm72ac"))))
     (build-system gnu-build-system)
     (inputs `(("libx11" ,libx11)
               ("libxi" ,libxi)
@@ -2646,7 +2646,7 @@ as USB mice.")
 (define-public xf86-video-ati
   (package
     (name "xf86-video-ati")
-    (version "7.6.1")
+    (version "7.7.0")
     (source
       (origin
         (method url-fetch)
@@ -2656,7 +2656,7 @@ as USB mice.")
                ".tar.bz2"))
         (sha256
           (base32
-            "0k6kw69mcarlmxlb4jlhz887jxqr94qx2pin04xcv2ysp3pdj5i5"))))
+            "1hy1n8an98mflfbdcb3q7wv59x971j7nf9zhivf90p0lgdbiqkc4"))))
     (build-system gnu-build-system)
     (inputs `(("mesa" ,mesa)
               ("xxf86driproto" ,xf86driproto)
@@ -3072,7 +3072,7 @@ graphics cards.")
 (define-public xf86-video-openchrome
   (package
     (name "xf86-video-openchrome")
-    (version "0.3.3")
+    (version "0.5.0")
     (source
       (origin
         (method url-fetch)
@@ -3081,9 +3081,8 @@ graphics cards.")
                version
                ".tar.bz2"))
         (sha256
-          (base32
-           "1v8j4i1r268n4fc5gq54zg1x50j0rhw71f3lba7411mcblg2z7p4"))
-        (patches (search-patches "xf86-video-openchrome-glibc-2.20.patch"))))
+         (base32
+          "1fsmr455lk89zl795d6b5ypyqjim40j3h2vjch52lcssjw9xdza9"))))
     (build-system gnu-build-system)
     (inputs `(("libx11" ,libx11)
               ("libxext" ,libxext)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index bf21707bfe..8dacf54668 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -27,6 +27,8 @@
   #:use-module (gnu services avahi)
   #:use-module (gnu services xorg)
   #:use-module (gnu services networking)
+  #:use-module ((gnu system file-systems)
+                #:select (%elogind-file-systems))
   #:use-module (gnu system shadow)
   #:use-module (gnu system pam)
   #:use-module (gnu packages glib)
@@ -760,7 +762,11 @@ seats.)"
 
                        ;; Extend PAM with pam_elogind.so.
                        (service-extension pam-root-service-type
-                                          pam-extension-procedure)))))
+                                          pam-extension-procedure)
+
+                       ;; We need /run/user, /run/systemd, etc.
+                       (service-extension file-system-service-type
+                                          (const %elogind-file-systems))))))
 
 (define* (elogind-service #:key (config (elogind-configuration)))
   "Return a service that runs the @command{elogind} login and seat management
@@ -823,7 +829,7 @@ and extends polkit with the actions from @code{gnome-settings-daemon}."
 
 (define* (xfce-desktop-service #:key (config (xfce-desktop-configuration)))
   "Return a service that adds the @code{xfce} package to the system profile,
-and extends polkit with the abilit for @code{thunar} to manipulate the file
+and extends polkit with the ability for @code{thunar} to manipulate the file
 system as root from within a user session, after the user has authenticated
 with the administrator's password."
   (service xfce-desktop-service-type config))
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 7a9db90012..03bfbf1d78 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -17,8 +17,8 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu services herd)
-  #:use-module (guix combinators)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
@@ -37,6 +37,11 @@
             unknown-shepherd-error?
             unknown-shepherd-error-sexp
 
+            live-service?
+            live-service-provision
+            live-service-requirement
+            live-service-running
+
             current-services
             unload-services
             unload-service
@@ -165,25 +170,27 @@ of pairs."
      (let ((key (and=> (assoc-ref alist 'key) car)) ...)
        exp ...))))
 
+;; Information about live Shepherd services.
+(define-record-type <live-service>
+  (live-service provision requirement running)
+  live-service?
+  (provision    live-service-provision)           ;list of symbols
+  (requirement  live-service-requirement)         ;list of symbols
+  (running      live-service-running))            ;#f | object
+
 (define (current-services)
-  "Return two lists: the list of currently running services, and the list of
-currently stopped services.  Return #f and #f if the list of services could
-not be obtained."
+  "Return the list of currently defined Shepherd services, represented as
+<live-service> objects.  Return #f if the list of services could not be
+obtained."
   (with-shepherd-action 'root ('status) services
     (match services
       ((('service ('version 0 _ ...) _ ...) ...)
-       (fold2 (lambda (service running-services stopped-services)
-                (alist-let* service (provides running)
-                  (if running
-                      (values (cons (first provides) running-services)
-                              stopped-services)
-                      (values running-services
-                              (cons (first provides) stopped-services)))))
-              '()
-              '()
-              services))
+       (map (lambda (service)
+              (alist-let* service (provides requires running)
+                (live-service provides requires running)))
+            services))
       (x
-       (values #f #f)))))
+       #f))))
 
 (define (unload-service service)
   "Unload SERVICE, a symbol name; return #t on success."
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index a14f51592a..3273184b9a 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -25,6 +25,7 @@
   #:use-module (guix records)
   #:use-module (guix derivations)                 ;imported-modules, etc.
   #:use-module (gnu services)
+  #:use-module (gnu services herd)
   #:use-module (gnu packages admin)
   #:use-module (ice-9 match)
   #:use-module (ice-9 vlist)
@@ -52,7 +53,9 @@
 
             shepherd-service-file
 
-            shepherd-service-back-edges))
+            shepherd-service-lookup-procedure
+            shepherd-service-back-edges
+            shepherd-service-upgrade))
 
 ;;; Commentary:
 ;;;
@@ -249,20 +252,35 @@ stored."
 
     (gexp->file "shepherd.conf" config)))
 
-(define (shepherd-service-back-edges services)
+(define* (shepherd-service-lookup-procedure services
+                                            #:optional
+                                            (provision
+                                             shepherd-service-provision))
+  "Return a procedure that, when passed a symbol, return the item among
+SERVICES that provides this symbol.  PROVISION must be a one-argument
+procedure that takes a service and returns the list of symbols it provides."
+  (let ((services (fold (lambda (service result)
+                          (fold (cut vhash-consq <> service <>)
+                                result
+                                (provision service)))
+                        vlist-null
+                        services)))
+    (lambda (name)
+      (match (vhash-assq name services)
+        ((_ . service) service)
+        (#f            #f)))))
+
+(define* (shepherd-service-back-edges services
+                                      #:key
+                                      (provision shepherd-service-provision)
+                                      (requirement shepherd-service-requirement))
   "Return a procedure that, when given a <shepherd-service> from SERVICES,
-returns the list of <shepherd-service> that depend on it."
+returns the list of <shepherd-service> that depend on it.
+
+Use PROVISION and REQUIREMENT as one-argument procedures that return the
+symbols provided/required by a service."
   (define provision->service
-    (let ((services (fold (lambda (service result)
-                            (fold (cut vhash-consq <> service <>)
-                                  result
-                                  (shepherd-service-provision service)))
-                          vlist-null
-                          services)))
-      (lambda (name)
-        (match (vhash-assq name services)
-          ((_ . service) service)
-          (#f            #f)))))
+    (shepherd-service-lookup-procedure services provision))
 
   (define edges
     (fold (lambda (service edges)
@@ -270,11 +288,59 @@ returns the list of <shepherd-service> that depend on it."
                     (vhash-consq (provision->service requirement) service
                                  edges))
                   edges
-                  (shepherd-service-requirement service)))
+                  (requirement service)))
           vlist-null
           services))
 
   (lambda (service)
     (vhash-foldq* cons '() service edges)))
 
+(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."
+  (define (essential? service)
+    (memq (first (live-service-provision service))
+          '(root shepherd)))
+
+  (define lookup-target
+    (shepherd-service-lookup-procedure target
+                                       shepherd-service-provision))
+
+  (define lookup-live
+    (shepherd-service-lookup-procedure live
+                                       live-service-provision))
+
+  (define (running? service)
+    (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
+                                 #:requirement live-service-requirement))
+
+  (define (obsolete? service)
+    (match (lookup-target (first (live-service-provision service)))
+      (#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-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))))
+
+  (values to-unload to-load))
+
 ;;; shepherd.scm ends here
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 905c88ff66..4e311deb84 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -26,7 +26,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gl)
-  #:use-module (gnu packages slim)
+  #:use-module (gnu packages display-managers)
   #:use-module (gnu packages gnustep)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages bash)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 116e2813e8..0dc472e3c7 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -257,7 +257,6 @@ TARGET in the other system."
   (append (list %pseudo-terminal-file-system
                 %shared-memory-file-system
                 %immutable-store)
-          %elogind-file-systems
           %control-groups))
 
 ;; File systems for Linux containers differ from %base-file-systems in that
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index c3948900eb..cfdcf5e136 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -78,6 +78,8 @@
                         (default '()))            ; list of strings
   (comment        user-account-comment (default ""))
   (home-directory user-account-home-directory)
+  (create-home-directory? user-account-create-home-directory? ;Boolean
+                          (default #t))
   (shell          user-account-shell              ; gexp
                   (default #~(string-append #$bash "/bin/bash")))
   (system?        user-account-system?            ; Boolean
@@ -128,6 +130,7 @@
          (group "nogroup")
          (shell #~(string-append #$shadow "/sbin/nologin"))
          (home-directory "/nonexistent")
+         (create-home-directory? #f)
          (system? #t))))
 
 (define (default-skeletons)
@@ -255,6 +258,7 @@ of user '~a' is undeclared")
       #$(user-account-supplementary-groups account)
       #$(user-account-comment account)
       #$(user-account-home-directory account)
+      #$(user-account-create-home-directory? account)
       ,#$(user-account-shell account)             ; this one is a gexp
       #$(user-account-password account)
       #$(user-account-system? account)))
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 7170ab1e38..41f50c0e7a 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -122,11 +122,13 @@ info --version")
                               (operating-system-user-accounts os))))))
 
           (test-assert "shepherd services"
-            (let ((services (marionette-eval '(begin
-                                                (use-modules (gnu services herd))
-                                                (call-with-values current-services
-                                                  append))
-                                             marionette)))
+            (let ((services (marionette-eval
+                             '(begin
+                                (use-modules (gnu services herd))
+
+                                (map (compose car live-service-provision)
+                                     (current-services)))
+                             marionette)))
               (lset= eq?
                      (pk 'services services)
                      '(root #$@(operating-system-shepherd-service-names os)))))
@@ -190,6 +192,42 @@ info --version")
                                   (setlocale LC_ALL before)))
                              marionette))
 
+          (test-assert "/run/current-system is a GC root"
+            (marionette-eval '(begin
+                                ;; Make sure the (guix …) modules are found.
+                                (eval-when (expand load eval)
+                                  (set! %load-path
+                                    (cons
+                                     (string-append
+                                      "/run/current-system/profile/share/guile/site/"
+                                      (effective-version))
+                                     %load-path))
+                                  (set! %load-compiled-path
+                                    (cons
+                                     (string-append
+                                      "/run/current-system/profile/share/guile/site/"
+                                      (effective-version))
+                                     %load-compiled-path)))
+
+                                (use-modules (srfi srfi-34) (guix store))
+
+                                (let ((system (readlink "/run/current-system")))
+                                  (guard (c ((nix-protocol-error? c)
+                                             (file-exists? system)))
+                                    (with-store store
+                                      (delete-paths store (list system))
+                                      #f))))
+                             marionette))
+
+          ;; This symlink is currently unused, but better have it point to the
+          ;; right place.  See
+          ;; <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01641.html>.
+          (test-equal "/var/guix/gcroots/profiles is a valid symlink"
+            "/var/guix/profiles"
+            (marionette-eval '(readlink "/var/guix/gcroots/profiles")
+                             marionette))
+
+
           (test-assert "screendump"
             (begin
               (marionette-control (string-append "screendump " #$output
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index 6dc19ff2db..00a4a46d81 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -83,7 +83,7 @@ INPUTS."
   (string-join
    (apply append (map (match-lambda
                         ((_ . dir)
-                         (find-files dir "\\.*jar$")))
+                         (find-files dir "\\.jar$")))
                       inputs)) ":"))
 
 (define* (unpack #:key source #:allow-other-keys)
diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
new file mode 100644
index 0000000000..48a32674e9
--- /dev/null
+++ b/guix/build/qt-utils.scm
@@ -0,0 +1,40 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven <david@craven.ch>
+;;;
+;;; 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 build qt-utils)
+  #:use-module (guix build utils)
+  #:export (wrap-qt-program))
+
+(define (wrap-qt-program out program)
+  (define (suffix env-var path)
+    (let ((env-val (getenv env-var)))
+      (if env-val (string-append env-val ":" path) path)))
+
+  (let ((qml-path        (suffix "QML2_IMPORT_PATH"
+                                 (string-append out "/qml")))
+        (plugin-path     (suffix "QT_PLUGIN_PATH"
+                                 (string-append out "/plugins")))
+        (xdg-data-path   (suffix "XDG_DATA_DIRS"
+                                 (string-append out "/share")))
+        (xdg-config-path (suffix "XDG_CONFIG_DIRS"
+                                 (string-append out "/etc/xdg"))))
+    (wrap-program (string-append out "/bin/" program)
+      `("QML2_IMPORT_PATH" = (,qml-path))
+      `("QT_PLUGIN_PATH" = (,plugin-path))
+      `("XDG_DATA_DIRS" = (,xdg-data-path))
+      `("XDG_CONFIG_DIRS" = (,xdg-config-path)))))
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index 79ac380cb8..c2d2766279 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Pjotr Prins <pjotr.public01@thebird.nl>
-;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -69,6 +69,16 @@ directory."
 (define (first-gemspec)
   (first-matching-file "\\.gemspec$"))
 
+(define* (replace-git-ls-files #:key source #:allow-other-keys)
+  "Many gemspec files downloaded from outside rubygems.org use `git ls-files`
+to list of the files to be included in the built gem.  However, since this
+operation is not deterministic, we replace it with `find`."
+  (when (not (gem-archive? source))
+    (let ((gemspec (first-gemspec)))
+      (substitute* gemspec
+        (("`git ls-files`") "`find . -type f |sort`"))))
+  #t)
+
 (define* (extract-gemspec #:key source #:allow-other-keys)
   "Remove the original gemspec, if present, and replace it with a new one.
 This avoids issues with upstream gemspecs requiring tools such as git to
@@ -120,27 +130,54 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
                            1))
          (out (assoc-ref outputs "out"))
          (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0"))
-         (gem-name (first-matching-file "\\.gem$")))
+         (gem-file (first-matching-file "\\.gem$"))
+         (gem-file-basename (basename gem-file))
+         (gem-name (substring gem-file-basename
+                              0
+                              (- (string-length gem-file-basename) 4)))
+         (gem-directory (string-append gem-home "/gems/" gem-name)))
     (setenv "GEM_HOME" gem-home)
     (mkdir-p gem-home)
-    (and (apply system* "gem" "install" gem-name
+    (and (apply system* "gem" "install" gem-file
                 "--local" "--ignore-dependencies"
                 ;; Executables should go into /bin, not /lib/ruby/gems.
                 "--bindir" (string-append out "/bin")
                 gem-flags)
-         ;; Remove the cached gem file as this is unnecessary and contains
-         ;; timestamped files rendering builds not reproducible.
-         (begin (delete-file (string-append gem-home "/cache/" gem-name))
-                #t))))
+         (begin
+           ;; Remove the cached gem file as this is unnecessary and contains
+           ;; timestamped files rendering builds not reproducible.
+           (let ((cached-gem (string-append gem-home "/cache/" gem-file)))
+             (log-file-deletion cached-gem)
+             (delete-file cached-gem))
+           ;; For gems with native extensions, several Makefile-related files
+           ;; are created that contain timestamps or other elements making
+           ;; them not reproducible.  They are unnecessary so we remove them.
+           (if (file-exists? (string-append gem-directory "/ext"))
+               (begin
+                 (for-each (lambda (file)
+                             (log-file-deletion file)
+                             (delete-file file))
+                           (append
+                            (find-files (string-append gem-home "/doc")
+                                        "page-Makefile.ri")
+                            (find-files (string-append gem-home "/extensions")
+                                        "gem_make.out")
+                            (find-files (string-append gem-directory "/ext")
+                                        "Makefile")))))
+           #t))))
+
+(define (log-file-deletion file)
+  (display (string-append "deleting '" file "' for reproducibility\n")))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
     (delete 'configure)
+    (replace 'unpack unpack)
     (add-before 'build 'extract-gemspec extract-gemspec)
+    (add-after 'extract-gemspec 'replace-git-ls-files replace-git-ls-files)
     (replace 'build build)
-    (replace 'unpack unpack)
-    (replace 'install install)
-    (replace 'check check)))
+    (replace 'check check)
+    (replace 'install install)))
 
 (define* (ruby-build #:key inputs (phases %standard-phases)
                      #:allow-other-keys #:rest args)
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 213a155fd6..5b7c47554a 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -83,7 +83,7 @@
   "Return the base distribution module for a given module.  E.g. the 'ok'
 module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would
 return \"Test-Simple\""
-  (assoc-ref (json-fetch (string-append "http://api.metacpan.org/module/"
+  (assoc-ref (json-fetch (string-append "https://api.metacpan.org/module/"
                                         module))
              "distribution"))
 
@@ -91,7 +91,7 @@ return \"Test-Simple\""
   "Return an alist representation of the CPAN metadata for the perl module MODULE,
 or #f on failure.  MODULE should be e.g. \"Test::Script\""
   ;; This API always returns the latest release of the module.
-  (json-fetch (string-append "http://api.metacpan.org/release/"
+  (json-fetch (string-append "https://api.metacpan.org/release/"
                              ;; XXX: The 'release' api requires the "release"
                              ;; name of the package.  This substitution seems
                              ;; reasonably consistent across packages.
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index f07f453e11..9af78ea888 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,7 +75,7 @@
 (define (hackage-source-url name version)
   "Given a Hackage package NAME and VERSION, return a url to the source
 tarball."
-  (string-append "http://hackage.haskell.org/package/" name
+  (string-append "https://hackage.haskell.org/package/" name
                  "/" name "-" version ".tar.gz"))
 
 (define* (hackage-cabal-url name #:optional version)
@@ -82,9 +83,9 @@ tarball."
 .cabal file on Hackage.  If VERSION is #f or missing, the url for the latest
 version is returned."
   (if version
-      (string-append "http://hackage.haskell.org/package/"
+      (string-append "https://hackage.haskell.org/package/"
                      name "-" version "/" name ".cabal")
-      (string-append "http://hackage.haskell.org/package/"
+      (string-append "https://hackage.haskell.org/package/"
                      name "/" name ".cabal")))
 
 (define (hackage-name->package-name name)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 44e004b084..93cd0f0fa5 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -22,7 +22,7 @@
   #:use-module (srfi srfi-1)
   #:use-module (guix hash)
   #:use-module (guix base32)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
   #:use-module ((guix build download) #:prefix build:)
   #:export (factorize-uri
@@ -112,12 +112,12 @@ recursively apply the procedure to the sub-list."
 (define (string->license str)
   "Convert the string STR into a license object."
   (match str
-    ("GNU LGPL" lgpl2.0)
-    ("GPL" gpl3)
-    ((or "BSD" "BSD License") bsd-3)
-    ((or "MIT" "MIT license" "Expat license") expat)
-    ("Public domain" public-domain)
-    ((or "Apache License, Version 2.0" "Apache 2.0") asl2.0)
+    ("GNU LGPL" license:lgpl2.0)
+    ("GPL" license:gpl3)
+    ((or "BSD" "BSD License") license:bsd-3)
+    ((or "MIT" "MIT license" "Expat license") license:expat)
+    ("Public domain" license:public-domain)
+    ((or "Apache License, Version 2.0" "Apache 2.0") license:asl2.0)
     (_ #f)))
 
 (define (license->symbol license)
@@ -125,12 +125,12 @@ recursively apply the procedure to the sub-list."
 to in the (guix licenses) module, or #f if there is no such known license."
   ;; TODO: Traverse list public variables in (guix licenses) instead so we
   ;; don't have to maintain a list manualy.
-  (assoc-ref `((,lgpl2.0 . lgpl2.0)
-               (,gpl3 . gpl3)
-               (,bsd-3 . bsd-3)
-               (,expat . expat)
-               (,public-domain . public-domain)
-               (,asl2.0 . asl2.0))
+  (assoc-ref `((,license:lgpl2.0 . license:lgpl2.0)
+               (,license:gpl3 . license:gpl3)
+               (,license:bsd-3 . license:bsd-3)
+               (,license:expat . license:expat)
+               (,license:public-domain . license:public-domain)
+               (,license:asl2.0 . license:asl2.0))
              license))
 
 (define (snake-case str)
diff --git a/guix/packages.scm b/guix/packages.scm
index 3646b9ba13..d544c34cf8 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -94,6 +94,7 @@
             package-transitive-propagated-inputs
             package-transitive-native-search-paths
             package-transitive-supported-systems
+            package-input-rewriting
             package-source-derivation
             package-derivation
             package-cross-derivation
@@ -732,6 +733,35 @@ dependencies are known to build on SYSTEM."
   "Return the \"target inputs\" of BAG, recursively."
   (transitive-inputs (bag-target-inputs bag)))
 
+(define* (package-input-rewriting replacements
+                                  #:optional (rewrite-name identity))
+  "Return a procedure that, when passed a package, replaces its direct and
+indirect dependencies (but not its implicit inputs) according to REPLACEMENTS.
+REPLACEMENTS is a list of package pairs; the first element of each pair is the
+package to replace, and the second one is the replacement.
+
+Optionally, REWRITE-NAME is a one-argument procedure that takes the name of a
+package and returns its new name after rewrite."
+  (define (rewrite input)
+    (match input
+      ((label (? package? package) outputs ...)
+       (match (assq-ref replacements package)
+         (#f  (cons* label (replace package) outputs))
+         (new (cons* label new outputs))))
+      (_
+       input)))
+
+  (define-memoized/v (replace p)
+    "Return a variant of P with its inputs rewritten."
+    (package
+      (inherit p)
+      (name (rewrite-name (package-name p)))
+      (inputs (map rewrite (package-inputs p)))
+      (native-inputs (map rewrite (package-native-inputs p)))
+      (propagated-inputs (map rewrite (package-propagated-inputs p)))))
+
+  replace)
+
 
 ;;;
 ;;; Package derivations.
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index e06c38aaab..8c7322d617 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -162,7 +162,7 @@ Export/import one or more packages from/to the store.\n"))
                    (alist-cons 'expression arg result)))
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'dry-run? #t result)))
+                   (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
 
          %standard-build-options))
 
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a02a0d5792..86b95b4075 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -193,33 +193,17 @@ of \"guile\"."
     (map (lambda (spec)
            (match (string-tokenize spec not-equal)
              ((old new)
-              (cons old (specification->package new)))
+              (cons (specification->package old)
+                    (specification->package new)))
              (_
               (leave (_ "invalid replacement specification: ~s~%") spec))))
          replacement-specs))
 
-  (define (rewrite input)
-    (match input
-      ((label (? package? package) outputs ...)
-       (match (assoc-ref replacements (package-name package))
-         (#f  (cons* label (replace package) outputs))
-         (new (cons* label new outputs))))
-      (_
-       input)))
-
-  (define replace
-    (memoize                                      ;XXX: use eq?
-     (lambda (p)
-       (package
-         (inherit p)
-         (inputs (map rewrite (package-inputs p)))
-         (native-inputs (map rewrite (package-native-inputs p)))
-         (propagated-inputs (map rewrite (package-propagated-inputs p)))))))
-
-  (lambda (store obj)
-    (if (package? obj)
-        (replace obj)
-        obj)))
+  (let ((rewrite (package-input-rewriting replacements)))
+    (lambda (store obj)
+      (if (package? obj)
+          (rewrite obj)
+          obj))))
 
 (define %transformations
   ;; Transformations that can be applied to things to build.  The car is the
@@ -541,7 +525,7 @@ must be one of 'package', 'all', or 'transitive'~%")
                    (alist-cons 'file arg result)))
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'dry-run? #t result)))
+                   (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
          (option '(#\r "root") #t #f
                  (lambda (opt name arg result)
                    (alist-cons 'gc-root arg result)))
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 9f72b7bf24..0c69bfc9d3 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -226,7 +226,7 @@ COMMAND or an interactive shell in that environment.\n"))
                    (alist-cons 'ad-hoc? #t result)))
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'dry-run? #t result)))
+                   (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
          (option '(#\s "system") #t #f
                  (lambda (opt name arg result)
                    (alist-cons 'system arg
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 51191e7e7b..eac3214bbf 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -161,6 +161,18 @@ markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
                       'description)
         #f)))
 
+  (define (check-trademarks description)
+    "Check that DESCRIPTION does not contain '™' or '®' characters.  See
+http://www.gnu.org/prep/standards/html_node/Trademarks.html."
+    (match (string-index description (char-set #\™ #\®))
+      ((and (? number?) index)
+       (emit-warning package
+                     (format #f (_ "description should not contain ~
+trademark sign '~a' at ~d")
+                             (string-ref description index) index)
+                     'description))
+      (else #t)))
+
   (define (check-proper-start description)
     (unless (or (properly-starts-sentence? description)
                 (string-prefix-ci? (package-name package) description))
@@ -191,6 +203,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
     (if (string? description)
         (begin
           (check-not-empty description)
+          (check-trademarks description)
           ;; Use raw description for this because Texinfo rendering
           ;; automatically fixes end of sentence space.
           (check-end-of-sentence-space description)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 2a751a4552..fd42cdb36e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -486,7 +486,8 @@ kind of search path~%")
                            #f)))
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result arg-handler)
-                   (values (alist-cons 'dry-run? #t result)
+                   (values (alist-cons 'dry-run? #t
+                                       (alist-cons 'graft? #f result))
                            #f)))
          (option '("bootstrap") #f #f
                  (lambda (opt name arg result arg-handler)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 4b53c3d263..953c6243ed 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -276,36 +276,17 @@ on service '~a':~%")
   "Call MPROC, a monadic procedure in %STORE-MONAD, passing it the list of
 names of services to load (upgrade), and the list of names of services to
 unload."
-  (define (essential? service)
-    (memq service '(root shepherd)))
-
-  (define new-service-names
-    (map (compose first shepherd-service-provision)
-         new-services))
-
-  (let-values (((running stopped) (current-services)))
-    (if (and running stopped)
-        (let* ((to-load
-                ;; Only load services that are either new or currently stopped.
-                (remove (lambda (service)
-                          (memq (first (shepherd-service-provision service))
-                                running))
-                        new-services))
-               (to-unload
-                ;; Unload services that are (1) no longer required, or (2) are
-                ;; in TO-LOAD.
-                (remove essential?
-                        (append (remove (lambda (service)
-                                          (memq service new-service-names))
-                                        (append running stopped))
-                                (filter (lambda (service)
-                                          (memq service stopped))
-                                        (map shepherd-service-canonical-name
-                                             to-load))))))
-          (mproc to-load to-unload))
-        (with-monad %store-monad
-          (warning (_ "failed to obtain list of shepherd services~%"))
-          (return #f)))))
+  (match (current-services)
+    ((services ...)
+     (let-values (((to-unload to-load)
+                   (shepherd-service-upgrade services new-services)))
+       (mproc to-load
+              (map (compose first live-service-provision)
+                   to-unload))))
+    (#f
+     (with-monad %store-monad
+       (warning (_ "failed to obtain list of shepherd services~%"))
+       (return #f)))))
 
 (define (upgrade-shepherd-services os)
   "Upgrade the Shepherd (PID 1) by unloading obsolete services and loading new
@@ -750,7 +731,7 @@ Build the operating system declared in FILE according to ACTION.\n"))
 
          (option '(#\n "dry-run") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'dry-run? #t result)))
+                   (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
          (option '(#\s "system") #t #f
                  (lambda (opt name arg result)
                    (alist-cons 'system arg
diff --git a/tests/cpan.scm b/tests/cpan.scm
index 898081b3e5..80ff044abd 100644
--- a/tests/cpan.scm
+++ b/tests/cpan.scm
@@ -66,9 +66,9 @@
              (lambda ()
                (display
                 (match url
-                  ("http://api.metacpan.org/release/Foo-Bar"
+                  ("https://api.metacpan.org/release/Foo-Bar"
                    test-json)
-                  ("http://api.metacpan.org/module/Test::Script"
+                  ("https://api.metacpan.org/module/Test::Script"
                    "{ \"distribution\" : \"Test-Script\" }")
                   ("http://example.com/Foo-Bar-0.1.tar.gz"
                    test-source)
diff --git a/tests/gem.scm b/tests/gem.scm
index 0b37c70142..a46c2b1439 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -71,7 +71,7 @@
          ('synopsis "A cool gem")
          ('description "This package provides a cool gem")
          ('home-page "https://example.com")
-         ('license ('list 'expat 'asl2.0)))
+         ('license ('list 'license:expat 'license:asl2.0)))
        #t)
       (x
        (pk 'fail x #f)))))
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index 12da950eba..d7c1b7057e 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -72,7 +72,7 @@ mount_test_code="
                   ;; correspond to a parent file system.
                   ((_ mount (or \"tmpfs\" \"proc\" \"sysfs\" \"devtmpfs\"
                                 \"devpts\" \"cgroup\" \"mqueue\") _ _ _)
-                   (and (string-prefix? mount (getcwd))
+                   (and (string-prefix? (getcwd) mount)
 		        mount))
                   ((_ mount _ _ _ _)
                    mount)))
diff --git a/tests/hackage.scm b/tests/hackage.scm
index d1ebe37405..a4de8be91e 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -110,7 +110,7 @@ library
          ('origin
            ('method 'url-fetch)
            ('uri ('string-append
-                  "http://hackage.haskell.org/package/foo/foo-"
+                  "https://hackage.haskell.org/package/foo/foo-"
                   'version
                   ".tar.gz"))
            ('sha256
diff --git a/tests/lint.scm b/tests/lint.scm
index 770f43e57f..df69d2b4b1 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
@@ -203,6 +203,20 @@ string) on HTTP requests."
                    "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD)."))))
        (check-description-style pkg)))))
 
+(test-assert "description: may not contain trademark signs"
+  (and (->bool
+        (string-contains (with-warnings
+                           (let ((pkg (dummy-package "x"
+                                        (description "Does The Right Thing™"))))
+                             (check-description-style pkg)))
+                         "should not contain trademark sign"))
+       (->bool
+        (string-contains (with-warnings
+                           (let ((pkg (dummy-package "x"
+                                        (description "Works with Format®"))))
+                             (check-description-style pkg)))
+                         "should not contain trademark sign"))))
+
 (test-assert "synopsis: not a string"
   (->bool
    (string-contains (with-warnings
diff --git a/tests/packages.scm b/tests/packages.scm
index e9c8690730..daceea5d62 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -742,6 +742,31 @@
            (and (build-derivations %store (list drv))
                 (file-exists? (string-append out "/bin/make")))))))
 
+(test-assert "package-input-rewriting"
+  (let* ((dep     (dummy-package "chbouib"
+                    (native-inputs `(("x" ,grep)))))
+         (p0      (dummy-package "example"
+                    (inputs `(("foo" ,coreutils)
+                              ("bar" ,grep)
+                              ("baz" ,dep)))))
+         (rewrite (package-input-rewriting `((,coreutils . ,sed)
+                                             (,grep . ,findutils))
+                                           (cut string-append "r-" <>)))
+         (p1      (rewrite p0))
+         (p2      (rewrite p0)))
+    (and (not (eq? p1 p0))
+         (eq? p1 p2)                              ;memoization
+         (string=? "r-example" (package-name p1))
+         (match (package-inputs p1)
+           ((("foo" dep1) ("bar" dep2) ("baz" dep3))
+            (and (eq? dep1 sed)
+                 (eq? dep2 findutils)
+                 (string=? (package-name dep3) "r-chbouib")
+                 (eq? dep3 (rewrite dep))         ;memoization
+                 (match (package-native-inputs dep3)
+                   ((("x" dep))
+                    (eq? dep findutils)))))))))
+
 (test-eq "fold-packages" hello
   (fold-packages (lambda (p r)
                    (if (string=? (package-name p) "hello")
diff --git a/tests/pypi.scm b/tests/pypi.scm
index 01d8a575ab..ab4e9c958b 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -130,7 +130,7 @@ baz > 13.37")
          ('home-page "http://example.com")
          ('synopsis "summary")
          ('description "summary")
-         ('license 'lgpl2.0))
+         ('license 'license:lgpl2.0))
        (string=? (bytevector->nix-base32-string
                   test-source-hash)
                  hash))
@@ -190,7 +190,7 @@ baz > 13.37")
          ('home-page "http://example.com")
          ('synopsis "summary")
          ('description "summary")
-         ('license 'lgpl2.0))
+         ('license 'license:lgpl2.0))
        (string=? (bytevector->nix-base32-string
                   test-source-hash)
                  hash))
diff --git a/tests/services.scm b/tests/services.scm
index 477a197160..8993c3dafc 100644
--- a/tests/services.scm
+++ b/tests/services.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,12 +18,17 @@
 
 (define-module (test-services)
   #:use-module (gnu services)
+  #:use-module (gnu services herd)
   #:use-module (gnu services shepherd)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-64))
 
+(define live-service
+  (@@ (gnu services herd) live-service))
+
+
 (test-begin "services")
 
 (test-assert "service-back-edges"
@@ -105,6 +110,15 @@
       (fold-services (list s) #:target-type t1)
       #f)))
 
+(test-assert "shepherd-service-lookup-procedure"
+  (let* ((s1 (shepherd-service (provision '(s1 s1b)) (start #f)))
+         (s2 (shepherd-service (provision '(s2 s2b)) (start #f)))
+         (s3 (shepherd-service (provision '(s3 s3b s3c)) (start #f)))
+         (lookup (shepherd-service-lookup-procedure (list s1 s2 s3))))
+    (and (eq? (lookup 's1) (lookup 's1b) s1)
+         (eq? (lookup 's2) (lookup 's2b) s2)
+         (eq? (lookup 's3) (lookup 's3b) s3))))
+
 (test-assert "shepherd-service-back-edges"
   (let* ((s1 (shepherd-service (provision '(s1)) (start #f)))
          (s2 (shepherd-service (provision '(s2))
@@ -118,4 +132,67 @@
          (lset= eq? (e s2) (list s3))
          (null? (e s3)))))
 
+(test-equal "shepherd-service-upgrade: nothing to do"
+  '(() ())
+  (call-with-values
+      (lambda ()
+        (shepherd-service-upgrade '() '()))
+    list))
+
+(test-equal "shepherd-service-upgrade: one unchanged, one upgraded, one new"
+  '(((bar))                                       ;unload
+    ((bar) (baz)))                                ;load
+  (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.
+        (shepherd-service-upgrade
+         (list (live-service '(foo) '() #t)
+               (live-service '(bar) '() #f)
+               (live-service '(root) '() #t))     ;essential!
+         (list (shepherd-service (provision '(foo))
+                                 (start #t))
+               (shepherd-service (provision '(bar))
+                                 (start #t))
+               (shepherd-service (provision '(baz))
+                                 (start #t)))))
+    (lambda (unload load)
+      (list (map live-service-provision unload)
+            (map shepherd-service-provision load)))))
+
+(test-equal "shepherd-service-upgrade: service depended on is not unloaded"
+  '(((baz))                                       ;unload
+    ())                                           ;load
+  (call-with-values
+      (lambda ()
+        ;; Service 'bar' is not among the target services; yet, it must not be
+        ;; unloaded because 'foo' depends on it.
+        (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)
+      (list (map live-service-provision unload)
+            (map shepherd-service-provision load)))))
+
+(test-equal "shepherd-service-upgrade: obsolete services that depend on each other"
+  '(((foo) (bar) (baz))                           ;unload
+    ((qux)))                                      ;load
+  (call-with-values
+      (lambda ()
+        ;; 'foo', 'bar', and 'baz' depend on each other, but all of them are
+        ;; obsolete, and thus should be unloaded.
+        (shepherd-service-upgrade
+         (list (live-service '(foo) '(bar) #t)    ;obsolete
+               (live-service '(bar) '(baz) #t)    ;obsolete
+               (live-service '(baz) '() #t))      ;obsolete
+         (list (shepherd-service (provision '(qux))
+                                 (start #t)))))
+    (lambda (unload load)
+      (list (map live-service-provision unload)
+            (map shepherd-service-provision load)))))
+
 (test-end)
diff --git a/tests/system.scm b/tests/system.scm
index b5bb9af016..ca34409be9 100644
--- a/tests/system.scm
+++ b/tests/system.scm
@@ -59,7 +59,7 @@
                         %base-file-systems))
     (users %base-user-accounts)))
 
-
+
 (test-begin "system")
 
 (test-assert "operating-system-store-file-system"