Merge branch 'master' into core-updates-frozen
authorMarius Bakke <marius@gnu.org>
Thu, 16 Sep 2021 23:25:52 +0000 (01:25 +0200)
committerMarius Bakke <marius@gnu.org>
Thu, 16 Sep 2021 23:25:52 +0000 (01:25 +0200)
 Conflicts:
gnu/packages/bioinformatics.scm
gnu/packages/chez.scm
gnu/packages/docbook.scm
gnu/packages/ebook.scm
gnu/packages/gnome.scm
gnu/packages/linux.scm
gnu/packages/networking.scm
gnu/packages/python-web.scm
gnu/packages/python-xyz.scm
gnu/packages/tex.scm
gnu/packages/version-control.scm
gnu/packages/xml.scm
guix/build-system/dune.scm
guix/build-system/go.scm
guix/build-system/linux-module.scm
guix/packages.scm

59 files changed:
1  2 
Makefile.am
doc/guix-cookbook.texi
doc/guix.texi
gnu/local.mk
gnu/packages/admin.scm
gnu/packages/algebra.scm
gnu/packages/autotools.scm
gnu/packages/ci.scm
gnu/packages/cran.scm
gnu/packages/crates-io.scm
gnu/packages/crypto.scm
gnu/packages/databases.scm
gnu/packages/django.scm
gnu/packages/docbook.scm
gnu/packages/ebook.scm
gnu/packages/education.scm
gnu/packages/emacs-xyz.scm
gnu/packages/engineering.scm
gnu/packages/games.scm
gnu/packages/geo.scm
gnu/packages/gnome.scm
gnu/packages/gnuzilla.scm
gnu/packages/golang.scm
gnu/packages/haskell-xyz.scm
gnu/packages/haskell.scm
gnu/packages/kde-pim.scm
gnu/packages/linux.scm
gnu/packages/llvm.scm
gnu/packages/mail.scm
gnu/packages/man.scm
gnu/packages/maths.scm
gnu/packages/music.scm
gnu/packages/networking.scm
gnu/packages/patchutils.scm
gnu/packages/perl.scm
gnu/packages/python-web.scm
gnu/packages/python-xyz.scm
gnu/packages/rust-apps.scm
gnu/packages/ssh.scm
gnu/packages/task-management.scm
gnu/packages/tex.scm
gnu/packages/version-control.scm
gnu/packages/video.scm
gnu/packages/vim.scm
gnu/packages/virtualization.scm
gnu/packages/web.scm
gnu/packages/wm.scm
gnu/packages/xdisorg.scm
gnu/packages/xfce.scm
gnu/packages/xml.scm
guix/build-system/dune.scm
guix/build-system/go.scm
guix/build-system/linux-module.scm
guix/import/elpa.scm
guix/lint.scm
guix/packages.scm
tests/hackage.scm
tests/packages.scm
tests/store.scm

diff --combined Makefile.am
@@@ -227,6 -227,7 +227,6 @@@ MODULES =                                  
    guix/build/union.scm                                \
    guix/build/profiles.scm                     \
    guix/build/compile.scm                      \
 -  guix/build/rpath.scm                                \
    guix/build/cvs.scm                          \
    guix/build/svn.scm                          \
    guix/build/syscalls.scm                       \
    guix/build/emacs-utils.scm                  \
    guix/build/java-utils.scm                   \
    guix/build/lisp-utils.scm                   \
 +  guix/build/meson-configuration.scm          \
    guix/build/maven/java.scm                   \
    guix/build/maven/plugin.scm                 \
    guix/build/maven/pom.scm                    \
    guix/scripts/refresh.scm                    \
    guix/scripts/repl.scm                               \
    guix/scripts/describe.scm                   \
 +  guix/scripts/style.scm                      \
    guix/scripts/system.scm                     \
    guix/scripts/system/search.scm              \
    guix/scripts/system/reconfigure.scm         \
@@@ -371,6 -370,10 +371,10 @@@ AUX_FILES =                                              
    gnu/packages/aux-files/chromium/master-preferences.json             \
    gnu/packages/aux-files/emacs/guix-emacs.el          \
    gnu/packages/aux-files/guix.vim                     \
+   gnu/packages/aux-files/linux-libre/5.14-arm.conf    \
+   gnu/packages/aux-files/linux-libre/5.14-arm64.conf  \
+   gnu/packages/aux-files/linux-libre/5.14-i686.conf   \
+   gnu/packages/aux-files/linux-libre/5.14-x86_64.conf \
    gnu/packages/aux-files/linux-libre/5.13-arm.conf    \
    gnu/packages/aux-files/linux-libre/5.13-arm64.conf  \
    gnu/packages/aux-files/linux-libre/5.13-i686.conf   \
    gnu/packages/aux-files/linux-libre/4.4-i686.conf    \
    gnu/packages/aux-files/linux-libre/4.4-x86_64.conf  \
    gnu/packages/aux-files/pack-audit.c                 \
 +  gnu/packages/aux-files/python/sanity-check.py               \
 +  gnu/packages/aux-files/python/sitecustomize.py      \
    gnu/packages/aux-files/run-in-namespace.c
  
  # Templates, examples.
@@@ -509,7 -510,6 +513,7 @@@ SCM_TESTS =                                        
    tests/swh.scm                               \
    tests/syscalls.scm                          \
    tests/system.scm                            \
 +  tests/style.scm                             \
    tests/texlive.scm                           \
    tests/transformations.scm                   \
    tests/ui.scm                                        \
@@@ -624,9 -624,11 +628,11 @@@ EXTRA_DIST +=                                            
    .guix-authorizations                                        \
    .guix-channel                                               \
    scripts/guix.in                                     \
+   etc/disarchive-manifest.scm                         \
    etc/guix-install.sh                                 \
    etc/news.scm                                                \
    etc/release-manifest.scm                            \
+   etc/source-manifest.scm                             \
    etc/system-tests.scm                                        \
    etc/historical-authorizations                               \
    build-aux/build-self.scm                            \
diff --combined doc/guix-cookbook.texi
@@@ -793,8 -793,10 +793,8 @@@ another, more sophisticated package (sl
                    "17pjvprmdrx4h6bb1hhc98w9qi6ki7yl57f090n9kbhswxqfs7s3"))
                  (patches (search-patches "libgit2-mtime-0.patch"))
                  (modules '((guix build utils)))
 -                (snippet '(begin
 -                            ;; Remove bundled software.
 -                            (delete-file-recursively "deps")
 -                            #true))))
 +                ;; Remove bundled software.
 +                (snippet '(delete-file-recursively "deps"))))
        (build-system cmake-build-system)
        (outputs '("out" "debug"))
        (arguments
                   (("#!/bin/sh") (string-append "#!" (which "sh"))))
                 (substitute* "tests/clar/fs.h"
                   (("/bin/cp") (which "cp"))
 -                 (("/bin/rm") (which "rm")))
 -               #true))
 +                 (("/bin/rm") (which "rm")))))
             ;; Run checks more verbosely.
             (replace 'check
               (lambda _ (invoke "./libgit2_clar" "-v" "-Q")))
             (add-after 'unpack 'make-files-writable-for-tests
               (lambda _ (for-each make-file-writable (find-files "." ".*")))))))
        (inputs
 -       `(("libssh2" ,libssh2)
 -         ("http-parser" ,http-parser)
 -         ("python" ,python-wrapper)))
 +       (list libssh2 http-parser python-wrapper))
        (native-inputs
 -       `(("pkg-config" ,pkg-config)))
 +       (list pkg-config))
        (propagated-inputs
         ;; These two libraries are in 'Requires.private' in libgit2.pc.
 -       `(("openssl" ,openssl)
 -         ("zlib" ,zlib)))
 +       (list openssl zlib))
        (home-page "https://libgit2.github.com/")
        (synopsis "Library providing Git core methods")
        (description
@@@ -884,6 -890,22 +884,6 @@@ Snippets might need additional Guile mo
  
  @subsubsection Inputs
  
 -First, a syntactic comment: See the quasi-quote / comma syntax?
 -
 -@lisp
 -    (native-inputs
 -     `(("pkg-config" ,pkg-config)))
 -@end lisp
 -
 -is equivalent to
 -
 -@lisp
 -    (native-inputs
 -     (list (list "pkg-config" pkg-config)))
 -@end lisp
 -
 -You'll mostly see the former because it's shorter.
 -
  There are 3 different input types.  In short:
  
  @table @asis
@@@ -917,24 -939,6 +917,24 @@@ It also matters when a substitute is av
  and @emph{propagated inputs} will be fetched: the @emph{native inputs} are not required to
  install a package from a substitute.
  
 +@quotation Note
 +You may see here and there snippets where package inputs are written
 +quite differently, like so:
 +
 +@lisp
 +;; The "old style" for inputs.
 +(inputs
 + `(("libssh2" ,libssh2)
 +   ("http-parser" ,http-parser)
 +   ("python" ,python-wrapper)))
 +@end lisp
 +
 +This is the ``old style'', where each input in the list is explicitly
 +given a label (a string).  It is still supported but we recommend using
 +the style above instead.  @xref{package Reference,,, guix, GNU Guix
 +Reference Manual}, for more info.
 +@end quotation
 +
  @subsubsection Outputs
  
  Just like how a package can have multiple inputs, it can also produce multiple
@@@ -2046,10 -2050,12 +2046,12 @@@ Copy into it the output of
  cat ~/.ssh/<username>_rsa.pub
  @end example
  
- Power the Linode down. In the Linode's Disks/Configurations tab, resize
- the Debian disk to be smaller. 30 GB is recommended.
+ Power the Linode down.
+ In the Linode's Storage tab, resize the Debian disk to be smaller.
+ 30 GB free space is recommended.  Then click "Add a disk", and fill
+ out the form with the following:
  
- In the Linode settings, "Add a disk", with the following:
  @itemize @bullet
  @item
  Label: "Guix"
@@@ -2061,9 -2067,9 +2063,9 @@@ Filesystem: ext
  Set it to the remaining size
  @end itemize
  
- On the "configuration" field that comes with the default image, press
- "..." and select "Edit", then on that menu add to @file{/dev/sdc} the "Guix"
label.
+ In the Configurations tab, press "Edit" on the default Debian profile.
+ Under "Block Device Assignment" click "Add a Device". It should be
@file{/dev/sdc} and you can select the "Guix" disk. Save Changes.
  
  Now "Add a Configuration", with the following:
  @itemize @bullet
@@@ -2089,8 -2095,8 +2091,8 @@@ Root device: @file{/dev/sda
  Turn off all the filesystem/boot helpers
  @end itemize
  
- Now power it back up, picking the Debian configuration.  Once it's
booted up, ssh in your server via @code{ssh
+ Now power it back up, booting with the Debian configuration.  Once it's
running, ssh to your server via @code{ssh
  root@@@var{<your-server-IP-here>}}. (You can find your server IP address in
  your Linode Summary section.) Now you can run the "install guix from
  @pxref{Binary Installation,,, guix, GNU Guix}" steps:
@@@ -2179,19 -2185,20 +2181,20 @@@ Replace the following fields in the abo
  @end lisp
  
  The last line in the above example lets you log into the server as root
- and set the initial root password.  After you have done this, you may
+ and set the initial root password (see the note at the end of this
+ recipe about root login).  After you have done this, you may
  delete that line from your configuration and reconfigure to prevent root
  login.
  
Save your ssh public key (eg: @file{~/.ssh/id_rsa.pub}) as
- @file{@var{<your-username-here>}_rsa.pub} and your
Copy your ssh public key (eg: @file{~/.ssh/id_rsa.pub}) as
+ @file{@var{<your-username-here>}_rsa.pub} and put
  @file{guix-config.scm} in the same directory.  In a new terminal run
  these commands.
  
  @example
  sftp root@@<remote server ip address>
- put /home/<username>/ssh/id_rsa.pub .
- put /path/to/linode/guix-config.scm .
+ put /path/to/files/<username>_rsa.pub .
+ put /path/to/files/guix-config.scm .
  @end example
  
  In your first terminal, mount the guix drive:
@@@ -2201,9 -2208,9 +2204,9 @@@ mkdir /mnt/gui
  mount /dev/sdc /mnt/guix
  @end example
  
- Due to the way we set things up above, we do not install GRUB
- completely.  Instead we install only our grub configuration file.  So we
need to copy over some of the other GRUB stuff that is already there:
+ Due to the way we set up the bootloader section of the guix-config.scm,
+ only the grub configuration file will be installed.  So, we need to copy
over some of the other GRUB stuff already installed on the Debian system:
  
  @example
  mkdir -p /mnt/guix/boot/grub
@@@ -2256,7 -2263,7 +2259,7 @@@ still need to set your root and user pa
  the ``Launch Console'' option in your linode.  Choose the ``Glish''
  instead of ``Weblish''.  Now you should be able to ssh into the machine.
  
- Horray!  At this point you can shut down the server, delete the
+ Hooray!  At this point you can shut down the server, delete the
  Debian disk, and resize the Guix to the rest of the size.
  Congratulations!
  
diff --combined doc/guix.texi
@@@ -47,7 -47,7 +47,7 @@@ Copyright @copyright{} 2017, 2018 Carl
  Copyright @copyright{} 2017 Thomas Danckaert@*
  Copyright @copyright{} 2017 humanitiesNerd@*
  Copyright @copyright{} 2017, 2021 Christine Lemmer-Webber@*
- Copyright @copyright{} 2017, 2018, 2019, 2020 Marius Bakke@*
+ Copyright @copyright{} 2017, 2018, 2019, 2020, 2021 Marius Bakke@*
  Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@*
  Copyright @copyright{} 2017, 2019, 2020, 2021 Maxim Cournoyer@*
  Copyright @copyright{} 2017, 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice@*
@@@ -291,7 -291,6 +291,7 @@@ Utilitie
  * Invoking guix hash::          Computing the cryptographic hash of a file.
  * Invoking guix import::        Importing package definitions.
  * Invoking guix refresh::       Updating package definitions.
 +* Invoking guix style::         Styling package definitions.
  * Invoking guix lint::          Finding errors in package definitions.
  * Invoking guix size::          Profiling disk usage.
  * Invoking guix graph::         Visualizing the graph of packages.
@@@ -1895,12 -1894,12 +1895,12 @@@ themselves
  @subsection X11 Fonts
  
  @cindex fonts
 -The majority of graphical applications use Fontconfig to locate and
 -load fonts and perform X11-client-side rendering.  The @code{fontconfig}
 -package in Guix looks for fonts in @file{$HOME/.guix-profile}
 -by default.  Thus, to allow graphical applications installed with Guix
 -to display fonts, you have to install fonts with Guix as well.
 -Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
 +The majority of graphical applications use Fontconfig to locate and load
 +fonts and perform X11-client-side rendering.  The @code{fontconfig}
 +package in Guix looks for fonts in @file{$HOME/.guix-profile} by
 +default.  Thus, to allow graphical applications installed with Guix to
 +display fonts, you have to install fonts with Guix as well.  Essential
 +font packages include @code{font-ghostscript}, @code{font-dejavu}, and
  @code{font-gnu-freefont}.
  
  @cindex @code{fc-cache}
@@@ -2789,8 -2788,8 +2789,8 @@@ you should add them to @file{~/.bash_pr
  do not use Bash) so that environment variables are set next time you
  spawn a shell.  You only need to do this once and other search paths
  environment variables will be taken care of similarly---e.g., if you
 -eventually install @code{python} and Python libraries, @code{PYTHONPATH}
 -will be defined.
 +eventually install @code{python} and Python libraries,
 +@env{GUIX_PYTHONPATH} will be defined.
  
  You can go on installing packages at your will.  To list installed
  packages, run:
@@@ -3534,26 -3533,24 +3534,26 @@@ Show details about @var{package}, take
  recutils manual}).
  
  @example
 -$ guix package --show=python | recsel -p name,version
 -name: python
 -version: 2.7.6
 +$ guix package --show=guile | recsel -p name,version
 +name: guile
 +version: 3.0.5
  
 -name: python
 -version: 3.3.5
 +name: guile
 +version: 3.0.2
 +
 +name: guile
 +version: 2.2.7
 +@dots{}
  @end example
  
  You may also specify the full name of a package to only get details about a
  specific version of it (this time using the @command{guix show} alias):
  @example
 -$ guix show python@@3.4 | recsel -p name,version
 -name: python
 -version: 3.4.3
 +$ guix show guile@@3.0.5 | recsel -p name,version
 +name: guile
 +version: 3.0.5
  @end example
  
 -
 -
  @item --list-installed[=@var{regexp}]
  @itemx -I [@var{regexp}]
  List the currently installed packages in the specified profile, with the
@@@ -5633,11 -5630,11 +5633,11 @@@ guix environment guile -- make -j
  
  In other situations, it is more convenient to specify the list of
  packages needed in the environment.  For example, the following command
 -runs @command{python} from an environment containing Python@tie{}2.7 and
 +runs @command{python} from an environment containing Python@tie{}3 and
  NumPy:
  
  @example
 -guix environment --ad-hoc python2-numpy python-2.7 -- python
 +guix environment --ad-hoc python-numpy python -- python3
  @end example
  
  Furthermore, one might want the dependencies of a package and also some
@@@ -6512,7 -6509,7 +6512,7 @@@ package looks like this
                  "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
      (build-system gnu-build-system)
      (arguments '(#:configure-flags '("--enable-silent-rules")))
 -    (inputs `(("gawk" ,gawk)))
 +    (inputs (list gawk))
      (synopsis "Hello, GNU world: An example GNU package")
      (description "Guess what GNU Hello prints!")
      (home-page "https://www.gnu.org/software/hello/")
@@@ -6600,8 -6597,8 +6600,8 @@@ Reference Manual})
  
  @item
  The @code{inputs} field specifies inputs to the build process---i.e.,
 -build-time or run-time dependencies of the package.  Here, we define an
 -input called @code{"gawk"} whose value is that of the @code{gawk}
 +build-time or run-time dependencies of the package.  Here, we add
 +an input, a reference to the @code{gawk}
  variable; @code{gawk} is itself bound to a @code{<package>} object.
  
  @cindex backquote (quasiquote)
@@@ -6726,42 -6723,20 +6726,42 @@@ list, typically containing sequential k
  @itemx @code{native-inputs} (default: @code{'()})
  @itemx @code{propagated-inputs} (default: @code{'()})
  @cindex inputs, of packages
 -These fields list dependencies of the package.  Each one is a list of
 -tuples, where each tuple has a label for the input (a string) as its
 +These fields list dependencies of the package.  Each element of these
 +lists is either a package, origin, or other ``file-like object''
 +(@pxref{G-Expressions}); to specify the output of that file-like object
 +that should be used, pass a two-element list where the second element is
 +the output (@pxref{Packages with Multiple Outputs}, for more on package
 +outputs).  For example, the list below specifies three inputs:
 +
 +@lisp
 +(list libffi libunistring
 +      `(,glib "bin"))      ;the "bin" output of GLib
 +@end lisp
 +
 +In the example above, the @code{"out"} output of @code{libffi} and
 +@code{libunistring} is used.
 +
 +@quotation Compatibility Note
 +Until version 1.3.0, input lists were a list of tuples,
 +where each tuple has a label for the input (a string) as its
  first element, a package, origin, or derivation as its second element,
  and optionally the name of the output thereof that should be used, which
 -defaults to @code{"out"} (@pxref{Packages with Multiple Outputs}, for
 -more on package outputs).  For example, the list below specifies three
 -inputs:
 +defaults to @code{"out"}.  For example, the list below is equivalent to
 +the one above, but using the @dfn{old input style}:
  
  @lisp
 +;; Old input style (deprecated).
  `(("libffi" ,libffi)
    ("libunistring" ,libunistring)
 -  ("glib:bin" ,glib "bin"))  ;the "bin" output of Glib
 +  ("glib:bin" ,glib "bin"))  ;the "bin" output of GLib
  @end lisp
  
 +This style is now deprecated; it is still supported but support will be
 +removed in a future version.  It should not be used for new package
 +definitions.  @xref{Invoking guix style}, on how to migrate to the new
 +style.
 +@end quotation
 +
  @cindex cross compilation, package dependencies
  The distinction between @code{native-inputs} and @code{inputs} is
  necessary when considering cross-compilation.  When cross-compiling,
@@@ -6847,37 -6822,13 +6847,37 @@@ cross-compiling
    ;; When cross-compiled, Guile, for example, depends on
    ;; a native version of itself.  Add it here.
    (native-inputs (if (%current-target-system)
 -                     `(("self" ,this-package))
 +                     (list this-package)
                       '())))
  @end lisp
  
  It is an error to refer to @code{this-package} outside a package definition.
  @end deffn
  
 +The following helper procedures are provided to help deal with package
 +inputs.
 +
 +@deffn {Scheme Procedure} lookup-package-input @var{package} @var{name}
 +@deffnx {Scheme Procedure} lookup-package-native-input @var{package} @var{name}
 +@deffnx {Scheme Procedure} lookup-package-propagated-input @var{package} @var{name}
 +@deffnx {Scheme Procedure} lookup-package-direct-input @var{package} @var{name}
 +Look up @var{name} among @var{package}'s inputs (or native, propagated,
 +or direct inputs).  Return it if found, @code{#f} otherwise.
 +
 +@var{name} is the name of a package depended on.  Here's how you might
 +use it:
 +
 +@lisp
 +(use-modules (guix packages) (gnu packages base))
 +
 +(lookup-package-direct-input coreutils "gmp")
 +@result{} #<package gmp@@6.2.1 @dots{}>
 +@end lisp
 +
 +In this example we obtain the @code{gmp} package that is among the
 +direct inputs of @code{coreutils}.
 +@end deffn
 +
  Because packages are regular Scheme objects that capture a complete
  dependency graph and associated build procedures, it is often useful to
  write procedures that take a package and return a modified version
@@@ -7059,9 -7010,10 +7059,10 @@@ retrieve
  The URL of the Git repository to clone.
  
  @item @code{commit}
- This string denotes either the commit to fetch (a hexadecimal string,
- either the full SHA1 commit or a ``short'' commit string; the latter is
- not recommended) or the tag to fetch.
+ This string denotes either the commit to fetch (a hexadecimal string),
+ or the tag to fetch.  You can also use a ``short'' commit ID or a
+ @command{git describe} style identifier such as
+ @code{v1.0.1-10-g58d7909c97}.
  
  @item @code{recursive?} (default: @code{#f})
  This Boolean indicates whether to recursively fetch Git sub-modules.
@@@ -7157,42 -7109,20 +7158,42 @@@ optional dependency, you can define a v
  dependency like so:
  
  @lisp
 -(use-modules (gnu packages gdb)    ;for 'gdb'
 -             (srfi srfi-1))        ;for 'alist-delete'
 +(use-modules (gnu packages gdb))   ;for 'gdb'
  
  (define gdb-sans-guile
    (package
      (inherit gdb)
 -    (inputs (alist-delete "guile"
 -                          (package-inputs gdb)))))
 +    (inputs (modify-inputs (package-inputs gdb)
 +              (delete "guile")))))
  @end lisp
  
 -The @code{alist-delete} call above removes the tuple from the
 -@code{inputs} field that has @code{"guile"} as its first element
 -(@pxref{SRFI-1 Association Lists,,, guile, GNU Guile Reference
 -Manual}).
 +The @code{modify-inputs} form above removes the @code{"guile"} package
 +from the @code{inputs} field of @code{gdb}.  The @code{modify-inputs}
 +macro is a helper that can prove useful anytime you want to remove, add,
 +or replace package inputs.
 +
 +@deffn {Scheme Syntax} modify-inputs @var{inputs} @var{clauses}
 +Modify the given package inputs, as returned by @code{package-inputs} & co.,
 +according to the given clauses.  The example below removes the GMP and ACL
 +inputs of Coreutils and adds libcap to the back of the input list:
 +
 +@lisp
 +(modify-inputs (package-inputs coreutils)
 +  (delete "gmp" "acl")
 +  (append libcap))
 +@end lisp
 +
 +The example below replaces the @code{guile} package from the inputs of
 +@code{guile-redis} with @code{guile-2.2}:
 +
 +@lisp
 +(modify-inputs (package-inputs guile-redis)
 +  (replace "guile" guile-2.2))
 +@end lisp
 +
 +The last type of clause is @code{prepend}, to add inputs to the front of
 +the list.
 +@end deffn
  
  In some cases, you may find it useful to write functions
  (``procedures'', in Scheme parlance) that return a package based on some
@@@ -7209,7 -7139,8 +7210,7 @@@ depends on it
      (name name)
      (version "3.0")
      ;; several fields omitted
 -    (inputs
 -     `(("lua" ,lua)))
 +    (inputs (list lua))
      (synopsis "Socket library for Lua")))
  
  (define-public lua5.1-socket
@@@ -7805,11 -7736,6 +7806,6 @@@ is useful when a package contains multi
  only one of them.  This is equivalent to passing the @code{-p} argument to
  @code{dune}.
  
- The @code{#:profile} parameter can be passed to specify the
- @uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile,
- dune build profile}. This is equivalent to passing the @code{--profile}
- argument to @code{dune}. Its default value is @code{"release"}.
  @end defvr
  
  @defvr {Scheme Variable} go-build-system
@@@ -7833,6 -7759,13 +7829,13 @@@ Packages that provide Go libraries shou
  the built output.  The key @code{#:install-source?}, which defaults to
  @code{#t}, controls whether or not the source code is installed.  It can
  be set to @code{#f} for packages that only provide executable files.
+ Packages can be cross-built, and if a specific architecture or operating
+ system is desired then the keywords @code{#:goarch} and @code{#:goos}
+ can be used to force the package to be built for that architecture and
+ operating system.  The combinations known to Go can be found
+ @url{"https://golang.org/doc/install/source#environment", in their
+ documentation}.
  @end defvr
  
  @defvr {Scheme Variable} glib-or-gtk-build-system
@@@ -8047,9 -7980,8 +8050,9 @@@ packages, which consists in running @co
  then @code{python setup.py install --prefix=/gnu/store/@dots{}}.
  
  For packages that install stand-alone Python programs under @code{bin/},
 -it takes care of wrapping these programs so that their @env{PYTHONPATH}
 -environment variable points to all the Python libraries they depend on.
 +it takes care of wrapping these programs so that their
 +@env{GUIX_PYTHONPATH} environment variable points to all the Python
 +libraries they depend on.
  
  Which Python package is used to perform the build can be specified with
  the @code{#:python} parameter.  This is a useful way to force a package
@@@ -8061,13 -7993,6 +8064,13 @@@ By default guix calls @code{setup.py} u
  @code{setuptools}, much like @command{pip} does.  Some packages are not
  compatible with setuptools (and pip), thus you can disable this by
  setting the @code{#:use-setuptools?} parameter to @code{#f}.
 +
 +If a @code{"python"} output is available, the package is installed into it
 +instead of the default @code{"out"} output. This is useful for packages that
 +include a Python package as only a part of the software, and thus want to
 +combine the phases of @code{python-build-system} with another build system.
 +Python bindings are a common usecase.
 +
  @end defvr
  
  @defvr {Scheme Variable} perl-build-system
@@@ -8288,7 -8213,9 +8291,7 @@@ implements the build procedure for pack
  
  It adds both Meson and @uref{https://ninja-build.org/, Ninja} to the set
  of inputs, and they can be changed with the parameters @code{#:meson}
 -and @code{#:ninja} if needed.  The default Meson is
 -@code{meson-for-build}, which is special because it doesn't clear the
 -@code{RUNPATH} of binaries and libraries when they are installed.
 +and @code{#:ninja} if needed.
  
  This build system is an extension of @code{gnu-build-system}, but with the
  following phases changed to some specific for Meson:
@@@ -8319,11 -8246,11 +8322,11 @@@ Apart from that, the build system also 
  
  @item fix-runpath
  This phase ensures that all binaries can find the libraries they need.
 -It searches for required libraries in subdirectories of the package being
 -built, and adds those to @code{RUNPATH} where needed.  It also removes
 -references to libraries left over from the build phase by
 -@code{meson-for-build}, such as test dependencies, that aren't actually
 -required for the program to run.
 +It searches for required libraries in subdirectories of the package
 +being built, and adds those to @code{RUNPATH} where needed.  It also
 +removes references to libraries left over from the build phase by
 +@code{meson}, such as test dependencies, that aren't actually required
 +for the program to run.
  
  @item glib-or-gtk-wrap
  This phase is the phase provided by @code{glib-or-gtk-build-system}, and it
@@@ -8702,14 -8629,12 +8705,14 @@@ Make @var{file} writable for its owner
  @end deffn
  
  @deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
 -  [#:log (current-output-port)] [#:follow-symlinks? #f] [#:keep-mtime? #f]
 +  [#:log (current-output-port)] [#:follow-symlinks? #f] @
 +  [#:copy-file copy-file] [#:keep-mtime? #f] [#:keep-permissions? #t]
  Copy @var{source} directory to @var{destination}.  Follow symlinks if
 -@var{follow-symlinks?}  is true; otherwise, just preserve them.  When
 -@var{keep-mtime?} is true, keep the modification time of the files in
 -@var{source} on those of @var{destination}.  Write verbose output to the
 -@var{log} port.
 +@var{follow-symlinks?}  is true; otherwise, just preserve them.  Call
 +@var{copy-file} to copy regular files.  When @var{keep-mtime?} is true,
 +keep the modification time of the files in @var{source} on those of
 +@var{destination}.  When @var{keep-permissions?} is true, preserve file
 +permissions.  Write verbose output to the @var{log} port.
  @end deffn
  
  @deffn {Scheme Procedure} delete-file-recursively @var{dir} @
@@@ -8793,31 -8718,6 +8796,31 @@@ Return the complete file name for @var{
  @code{$PATH}, or @code{#f} if @var{program} could not be found.
  @end deffn
  
 +@deffn {Scheme Procedure} search-input-file @var{inputs} @var{name}
 +@deffnx {Scheme Procedure} search-input-directory @var{inputs} @var{name}
 +Return the complete file name for @var{name} as found in @var{inputs};
 +@code{search-input-file} searches for a regular file and
 +@code{search-input-directory} searches for a directory.  If @var{name}
 +could not be found, an exception is raised.
 +
 +Here, @var{inputs} must be an association list like @code{inputs} and
 +@code{native-inputs} as available to build phases (@pxref{Build
 +Phases}).
 +@end deffn
 +
 +Here is a (simplified) example of how @code{search-input-file} is used
 +in a build phase of the @code{wireguard-tools} package:
 +
 +@lisp
 +(add-after 'install 'wrap-wg-quick
 +  (lambda* (#:key inputs outputs #:allow-other-keys)
 +    (let ((coreutils (string-append (assoc-ref inputs "coreutils")
 +                                    "/bin")))
 +      (wrap-program (search-input-file outputs "bin/wg-quick")
 +        #:sh (search-input-file inputs "bin/bash")
 +        `("PATH" ":" prefix ,(list coreutils))))))
 +@end lisp
 +
  @subsection Build Phases
  
  @cindex build phases
@@@ -10315,7 -10215,6 +10318,7 @@@ the Scheme programming interface of Gui
  * Invoking guix hash::          Computing the cryptographic hash of a file.
  * Invoking guix import::        Importing package definitions.
  * Invoking guix refresh::       Updating package definitions.
 +* Invoking guix style::         Styling package definitions.
  * Invoking guix lint::          Finding errors in package definitions.
  * Invoking guix size::          Profiling disk usage.
  * Invoking guix graph::         Visualizing the graph of packages.
@@@ -10760,7 -10659,8 +10763,8 @@@ guix build --with-branch=guile-sqlite3=
  @item --with-commit=@var{package}=@var{commit}
  This is similar to @option{--with-branch}, except that it builds from
  @var{commit} rather than the tip of a branch.  @var{commit} must be a valid
- Git commit SHA1 identifier or a tag.
+ Git commit SHA1 identifier, a tag, or a @command{git describe} style
+ identifier such as @code{1.0-3-gabc123}.
  
  @item --with-patch=@var{package}=@var{file}
  Add @var{file} to the list of patches applied to @var{package}, where
@@@ -11709,6 -11609,10 +11713,10 @@@ contained in the GnuPG keyring a
  @code{emacs} package (@pxref{Package Installation, ELPA package
  signatures,, emacs, The GNU Emacs Manual}).
  
+ @item
+ @uref{https://elpa.nongnu.org/nongnu/, NonGNU}, selected by the
+ @code{nongnu} identifier.
  @item
  @uref{https://stable.melpa.org/packages, MELPA-Stable}, selected by the
  @code{melpa-stable} identifier.
@@@ -12187,98 -12091,6 +12195,98 @@@ token procured from @uref{https://githu
  otherwise.
  
  
 +@node Invoking guix style
 +@section Invoking @command{guix style}
 +
 +The @command{guix style} command helps packagers style their package
 +definitions according to the latest fashionable trends.  The command
 +currently focuses on one aspect: the style of package inputs.  It may
 +eventually be extended to handle other stylistic matters.
 +
 +The way package inputs are written is going through a transition
 +(@pxref{package Reference}, for more on package inputs).  Until version
 +1.3.0, package inputs were written using the ``old style'', where each
 +input was given an explicit label, most of the time the package name:
 +
 +@lisp
 +(package
 +  ;; @dots{}
 +  ;; The "old style" (deprecated).
 +  (inputs `(("libunistring" ,libunistring)
 +            ("libffi" ,libffi))))
 +@end lisp
 +
 +Today, the old style is deprecated and the preferred style looks like
 +this:
 +
 +@lisp
 +(package
 +  ;; @dots{}
 +  ;; The "new style".
 +  (inputs (list libunistring libffi)))
 +@end lisp
 +
 +Likewise, uses of @code{alist-delete} and friends to manipulate inputs
 +is now deprecated in favor of @code{modify-inputs} (@pxref{Defining
 +Package Variants}, for more info on @code{modify-inputs}).
 +
 +In the vast majority of cases, this is a purely mechanical change on the
 +surface syntax that does not even incur a package rebuild.  Running
 +@command{guix style} can do that for you, whether you're working on
 +packages in Guix proper or in an external channel.
 +
 +The general syntax is:
 +
 +@example
 +guix style [@var{options}] @var{package}@dots{}
 +@end example
 +
 +This causes @command{guix style} to analyze and rewrite the definition
 +of @var{package}@dots{}.  It does so in a conservative way: preserving
 +comments and bailing out if it cannot make sense of the code that
 +appears in an inputs field.  The available options are listed below.
 +
 +@table @code
 +@item --load-path=@var{directory}
 +@itemx -L @var{directory}
 +Add @var{directory} to the front of the package module search path
 +(@pxref{Package Modules}).
 +
 +@item --expression=@var{expr}
 +@itemx -e @var{expr}
 +Style the package @var{expr} evaluates to.
 +
 +For example, running:
 +
 +@example
 +guix style -e '(@@ (gnu packages gcc) gcc-5)'
 +@end example
 +
 +styles the @code{gcc-5} package definition.
 +
 +@item --input-simplification=@var{policy}
 +Specify the package input simplification policy for cases where an input
 +label does not match the corresponding package name.  @var{policy} may
 +be one of the following:
 +
 +@table @code
 +@item silent
 +Simplify inputs only when the change is ``silent'', meaning that the
 +package does not need to be rebuilt (its derivation is unchanged).
 +
 +@item safe
 +Simplify inputs only when that is ``safe'' to do: the package might need
 +to be rebuilt, but the change is known to have no observable effect.
 +
 +@item always
 +Simplify inputs even when input labels do not match package names, and
 +even if that might have an observable effect.
 +@end table
 +
 +The default is @code{silent}, meaning that input simplifications do not
 +trigger any package rebuild.
 +@end table
 +
  @node Invoking guix lint
  @section Invoking @command{guix lint}
  
@@@ -12407,13 -12219,6 +12415,13 @@@ declare them as in this example
  @item formatting
  Warn about obvious source code formatting issues: trailing white space,
  use of tabulations, etc.
 +
 +@item input-labels
 +Report old-style input labels that do not match the name of the
 +corresponding package.  This aims to help migrate from the ``old input
 +style''.  @xref{package Reference}, for more information on package
 +inputs and input styles.  @xref{Invoking guix style}, on how to migrate
 +to the new style.
  @end table
  
  The general syntax is:
@@@ -18772,12 -18577,6 +18780,12 @@@ programs
  Defaults to @samp{"lp"}.
  @end deftypevr
  
 +@deftypevr {@code{files-configuration} parameter} string log-file-group
 +Specifies the group name or ID that will be used for log files.
 +
 +Defaults to @samp{"lpadmin"}.
 +@end deftypevr
 +
  @deftypevr {@code{files-configuration} parameter} string log-file-perm
  Specifies the permissions for all log files that the scheduler writes.
  
  From there on, GDB will pick up debugging information from the
  @file{.debug} files under @file{~/.guix-profile/lib/debug}.
  
 +Below is an alternative GDB script which is useful when working with
 +other profiles.  It takes advantage of the optional Guile integration in
 +GDB.  This snippet is included by default on Guix System in the
 +@file{~/.gdbinit} file.
 +
 +@example
 +guile
 +(use-modules (gdb))
 +(execute (string-append "set debug-file-directory "
 +                        (or (getenv "GDB_DEBUG_FILE_DIRECTORY")
 +                            "~/.guix-profile/lib/debug")))
 +end
 +@end example
 +
  In addition, you will most likely want GDB to be able to show the source
  code being debugged.  To do that, you will have to unpack the source
  code of the package of interest (obtained with @code{guix build
diff --combined gnu/local.mk
@@@ -20,7 -20,7 +20,7 @@@
  # Copyright © 2018, 2019, 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
  # Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
  # Copyright © 2018, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 -# Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
 +# Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  # Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
  # Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
  # Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
@@@ -40,7 -40,6 +40,7 @@@
  # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@gmail.com>
  # Copyright © 2020 Vinicius Monego <monego@posteo.net>
  # Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 +# Copyright © 2021 Greg Hogan <code@greghogan.com>
  # Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
  # Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
  # Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
@@@ -527,7 -526,6 +527,7 @@@ GNU_SYSTEM_MODULES =                               
    %D%/packages/slang.scm                      \
    %D%/packages/smalltalk.scm                  \
    %D%/packages/sml.scm                                \
 +  %D%/packages/solidity.scm                   \
    %D%/packages/speech.scm                     \
    %D%/packages/sphinx.scm                     \
    %D%/packages/spice.scm                      \
@@@ -835,7 -833,6 +835,7 @@@ dist_patch_DATA =                                          
    %D%/packages/patches/ath9k-htc-firmware-gcc.patch           \
    %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch    \
    %D%/packages/patches/ath9k-htc-firmware-objcopy.patch               \
 +  %D%/packages/patches/atlas-gfortran-compat.patch            \
    %D%/packages/patches/audacity-build-with-system-portaudio.patch \
    %D%/packages/patches/audacity-add-include.patch             \
    %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
    %D%/packages/patches/bastet-change-source-of-unordered_set.patch    \
    %D%/packages/patches/bazaar-CVE-2017-14176.patch            \
    %D%/packages/patches/bc-fix-cross-compilation.patch         \
 +  %D%/packages/patches/bdb-5.3-atomics-on-gcc-9.patch         \
    %D%/packages/patches/bear-disable-preinstall-tests.patch    \
    %D%/packages/patches/brightnessctl-elogind-support.patch    \
    %D%/packages/patches/bsd-games-2.17-64bit.patch             \
    %D%/packages/patches/beancount-disable-googleapis-fonts.patch       \
    %D%/packages/patches/behave-skip-a-couple-of-tests.patch    \
    %D%/packages/patches/beignet-correct-file-names.patch               \
 -  %D%/packages/patches/biber-fix-encoding-write.patch         \
 -  %D%/packages/patches/biber-sortinithash.patch                       \
    %D%/packages/patches/bidiv-update-fribidi.patch             \
 +  %D%/packages/patches/binutils-2.37-file-descriptor-leak.patch       \
    %D%/packages/patches/binutils-boot-2.20.1a.patch            \
    %D%/packages/patches/binutils-loongson-workaround.patch     \
    %D%/packages/patches/binutils-mingw-w64-timestamp.patch     \
    %D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch        \
    %D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch        \
    %D%/packages/patches/classpath-aarch64-support.patch                \
 +  %D%/packages/patches/classpath-miscompilation.patch         \
    %D%/packages/patches/clucene-pkgconfig.patch                        \
    %D%/packages/patches/cmake-curl-certificates.patch          \
    %D%/packages/patches/coda-use-system-libs.patch             \
    %D%/packages/patches/collectd-5.11.0-noinstallvar.patch             \
    %D%/packages/patches/combinatorial-blas-awpm.patch          \
    %D%/packages/patches/combinatorial-blas-io-fix.patch                \
 +  %D%/packages/patches/coreutils-gnulib-tests.patch           \
    %D%/packages/patches/coreutils-ls.patch                     \
    %D%/packages/patches/cpufrequtils-fix-aclocal.patch         \
    %D%/packages/patches/cpuinfo-system-libraries.patch         \
    %D%/packages/patches/crda-optional-gcrypt.patch             \
    %D%/packages/patches/clucene-contribs-lib.patch               \
    %D%/packages/patches/cube-nocheck.patch                     \
 -  %D%/packages/patches/cups-CVE-2020-10001.patch              \
    %D%/packages/patches/curl-use-ssl-cert-env.patch            \
 -  %D%/packages/patches/curl-7.76-use-ssl-cert-env.patch       \
    %D%/packages/patches/curl-7.77-tls-priority-string.patch    \
    %D%/packages/patches/cursynth-wave-rand.patch                       \
    %D%/packages/patches/cvs-CVE-2017-12836.patch               \
    %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch                \
    %D%/packages/patches/cyrus-sasl-CVE-2019-19906.patch                \
    %D%/packages/patches/c++-gsl-find-system-gtest.patch                \
 +  %D%/packages/patches/c++-gsl-move-array-bounds-tests.patch  \
    %D%/packages/patches/date-output-pkg-config-files.patch     \
    %D%/packages/patches/datefudge-gettimeofday.patch           \
    %D%/packages/patches/dbacl-include-locale.h.patch           \
    %D%/packages/patches/dbus-helper-search-path.patch          \
 -  %D%/packages/patches/dbus-CVE-2020-12049.patch              \
    %D%/packages/patches/dbus-c++-gcc-compat.patch              \
    %D%/packages/patches/dbus-c++-threading-mutex.patch         \
    %D%/packages/patches/dbxfs-remove-sentry-sdk.patch          \
    %D%/packages/patches/disarchive-cross-compilation.patch     \
    %D%/packages/patches/dkimproxy-add-ipv6-support.patch               \
    %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch    \
 +  %D%/packages/patches/docbook-xsl-support-old-url.patch      \
    %D%/packages/patches/doc++-include-directives.patch         \
    %D%/packages/patches/doc++-segfault-fix.patch                       \
    %D%/packages/patches/docker-fix-tests.patch                 \
    %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch        \
 -  %D%/packages/patches/doxygen-test.patch                     \
 -  %D%/packages/patches/doxygen-1.8.17-runtests.patch          \
    %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch    \
    %D%/packages/patches/dstat-skip-devices-without-io.patch    \
    %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch  \
    %D%/packages/patches/eudev-rules-directory.patch            \
    %D%/packages/patches/evilwm-lost-focus-bug.patch            \
    %D%/packages/patches/evolution-CVE-2020-11879.patch         \
 +  %D%/packages/patches/evolution-printableoptions.patch               \
    %D%/packages/patches/evolution-data-server-CVE-2020-14928.patch     \
    %D%/packages/patches/evolution-data-server-CVE-2020-16117.patch     \
 +  %D%/packages/patches/evolution-data-server-printableoptions.patch   \
    %D%/packages/patches/evolution-data-server-locales.patch    \
    %D%/packages/patches/evolution-data-server-libical-compat.patch     \
    %D%/packages/patches/exercism-disable-self-update.patch     \
    %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch               \
    %D%/packages/patches/fifo-map-remove-catch.hpp.patch                \
    %D%/packages/patches/findutils-localstatedir.patch          \
 -  %D%/packages/patches/findutils-test-rwlock-threads.patch    \
    %D%/packages/patches/flann-cmake-3.11.patch                 \
 +  %D%/packages/patches/fontconfig-cache-ignore-mtime.patch    \
    %D%/packages/patches/foobillard++-pkg-config.patch          \
    %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch   \
    %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch   \
 -  %D%/packages/patches/fontconfig-hurd-path-max.patch         \
    %D%/packages/patches/fp16-system-libraries.patch            \
    %D%/packages/patches/fpc-reproducibility.patch              \
    %D%/packages/patches/fplll-std-fenv.patch                   \
    %D%/packages/patches/freedink-engine-fix-sdl-hints.patch    \
 +  %D%/packages/patches/freeglut-gcc-compat.patch              \
    %D%/packages/patches/freeimage-unbundle.patch               \
    %D%/packages/patches/fuse-overlapping-headers.patch                         \
    %D%/packages/patches/fxdiv-system-libraries.patch           \
    %D%/packages/patches/ganeti-drbd-compat.patch                       \
    %D%/packages/patches/ganeti-haskell-pythondir.patch         \
    %D%/packages/patches/ganeti-os-disk-size.patch              \
 -  %D%/packages/patches/ganeti-preserve-PYTHONPATH.patch               \
    %D%/packages/patches/ganeti-shepherd-master-failover.patch  \
    %D%/packages/patches/ganeti-shepherd-support.patch          \
    %D%/packages/patches/gash-utils-ls-test.patch                       \
    %D%/packages/patches/gdb-hurd.patch                         \
    %D%/packages/patches/gd-fix-tests-on-i686.patch             \
    %D%/packages/patches/gd-brect-bounds.patch                  \
 -  %D%/packages/patches/gdk-pixbuf-CVE-2020-29385.patch                \
 +  %D%/packages/patches/gd-Revert-fix-303-gdlib.pc-use-Requires-instead-of-Libs.patch  \
    %D%/packages/patches/gdm-default-session.patch              \
    %D%/packages/patches/geary-CVE-2020-24661.patch             \
    %D%/packages/patches/genimage-signedness.patch              \
    %D%/packages/patches/ghc-monad-par-fix-tests.patch          \
    %D%/packages/patches/ghc-pandoc-fix-html-tests.patch                \
    %D%/packages/patches/ghc-pandoc-fix-latex-test.patch                \
 -  %D%/packages/patches/ghostscript-CVE-2020-15900.patch               \
 -  %D%/packages/patches/ghostscript-freetype-compat.patch      \
    %D%/packages/patches/ghostscript-no-header-id.patch         \
    %D%/packages/patches/ghostscript-no-header-uuid.patch               \
    %D%/packages/patches/ghostscript-no-header-creationdate.patch \
    %D%/packages/patches/giara-fix-login.patch                      \
 +  %D%/packages/patches/glade-gls-set-script-name.patch                \
 +  %D%/packages/patches/glade-test-widget-null-icon.patch      \
    %D%/packages/patches/glib-appinfo-watch.patch                       \
 -  %D%/packages/patches/glib-tests-timer.patch                 \
 -  %D%/packages/patches/glib-CVE-2021-27218.patch              \
 -  %D%/packages/patches/glib-CVE-2021-27219-01.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-02.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-03.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-04.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-05.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-06.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-07.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-08.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-09.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-10.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-11.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-12.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-13.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-14.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-15.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-16.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-17.patch           \
 -  %D%/packages/patches/glib-CVE-2021-27219-18.patch           \
 -  %D%/packages/patches/glib-CVE-2021-28153.patch              \
 +  %D%/packages/patches/glib-networking-gnutls-binding.patch   \
 +  %D%/packages/patches/glib-skip-failing-test.patch           \
    %D%/packages/patches/glibc-CVE-2018-11236.patch             \
    %D%/packages/patches/glibc-CVE-2018-11237.patch             \
    %D%/packages/patches/glibc-CVE-2019-7309.patch              \
    %D%/packages/patches/glibc-bootstrap-system-2.2.5.patch     \
    %D%/packages/patches/glibc-bootstrap-system-2.16.0.patch    \
    %D%/packages/patches/glibc-bootstrap-system.patch           \
 +  %D%/packages/patches/glibc-cross-objcopy.patch              \
 +  %D%/packages/patches/glibc-cross-objdump.patch              \
 +  %D%/packages/patches/glibc-dl-cache.patch                   \
    %D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
    %D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch       \
 +  %D%/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch  \
    %D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch  \
    %D%/packages/patches/glibc-hurd-gettyent.patch              \
    %D%/packages/patches/glibc-hurd-mach-print.patch            \
    %D%/packages/patches/glibc-locales.patch                    \
    %D%/packages/patches/glibc-locales-2.28.patch                       \
    %D%/packages/patches/glibc-reinstate-prlimit64-fallback.patch       \
 +  %D%/packages/patches/glibc-skip-c++.patch                   \
    %D%/packages/patches/glibc-versioned-locpath.patch          \
 -  %D%/packages/patches/glibc-2.27-git-fixes.patch             \
 -  %D%/packages/patches/glibc-2.28-git-fixes.patch             \
    %D%/packages/patches/glibc-2.29-git-updates.patch           \
 -  %D%/packages/patches/glibc-2.27-supported-locales.patch             \
 -  %D%/packages/patches/glibc-2.28-supported-locales.patch             \
    %D%/packages/patches/glibc-2.29-supported-locales.patch             \
 +  %D%/packages/patches/glibc-static-nss.patch                 \
    %D%/packages/patches/glibc-supported-locales.patch          \
    %D%/packages/patches/gmp-arm-asm-nothumb.patch              \
    %D%/packages/patches/gmp-faulty-test.patch                  \
    %D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \
    %D%/packages/patches/gnome-tweaks-search-paths.patch                \
    %D%/packages/patches/gnupg-default-pinentry.patch           \
 +  %D%/packages/patches/gnupg-1-build-with-gcc10.patch         \
    %D%/packages/patches/gnutls-skip-trust-store-test.patch     \
    %D%/packages/patches/gnutls-cross.patch                     \
 -  %D%/packages/patches/gnutls-CVE-2021-20231.patch            \
 -  %D%/packages/patches/gnutls-CVE-2021-20232.patch            \
 +  %D%/packages/patches/gnutls-guile-eintr-eagain.patch                \
    %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
    %D%/packages/patches/gobject-introspection-cc.patch         \
    %D%/packages/patches/gobject-introspection-girepository.patch       \
    %D%/packages/patches/go-fix-script-tests.patch                      \
+   %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \
+   %D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \
    %D%/packages/patches/go-skip-gc-test.patch                  \
    %D%/packages/patches/gpm-glibc-2.26.patch                   \
    %D%/packages/patches/gpodder-disable-updater.patch          \
    %D%/packages/patches/gpsbabel-fix-i686-test.patch           \
    %D%/packages/patches/grantlee-merge-theme-dirs.patch                \
 -  %D%/packages/patches/graphviz-CVE-2020-18032.patch          \
    %D%/packages/patches/grep-timing-sensitive-test.patch               \
    %D%/packages/patches/grocsvs-dont-use-admiral.patch         \
    %D%/packages/patches/gromacs-tinyxml2.patch                 \
    %D%/packages/patches/guile-present-coding.patch             \
    %D%/packages/patches/guile-rsvg-pkgconfig.patch             \
    %D%/packages/patches/guile-emacs-fix-configure.patch                \
 +  %D%/packages/patches/guile-ssh-fix-test-suite.patch         \
 +  %D%/packages/patches/guile-ssh-read-error.patch             \
    %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch      \
    %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
    %D%/packages/patches/gtk2-theme-paths.patch                 \
    %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch      \
    %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
 +  %D%/packages/patches/gtk-doc-respect-xml-catalog.patch       \
    %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
    %D%/packages/patches/gtksourceview-2-add-default-directory.patch \
    %D%/packages/patches/gvfs-add-support-for-libplist-2.2.patch        \
    %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch     \
    %D%/packages/patches/icecat-use-system-media-libs.patch     \
    %D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch \
 -  %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch      \
 -  %D%/packages/patches/icu4c-CVE-2020-10531.patch             \
    %D%/packages/patches/id3lib-CVE-2007-4460.patch                     \
    %D%/packages/patches/id3lib-UTF16-writing-bug.patch                 \
    %D%/packages/patches/idris-disable-test.patch                       \
    %D%/packages/patches/imagemagick-ReadDCMImage-fix.patch     \
    %D%/packages/patches/imagemagick-ReadDCMPixels-fix.patch    \
    %D%/packages/patches/imagemagick-WriteTHUMBNAILImage-fix.patch      \
 -  %D%/packages/patches/inetutils-hurd.patch                   \
    %D%/packages/patches/inkscape-poppler-0.76.patch            \
    %D%/packages/patches/instead-use-games-path.patch           \
    %D%/packages/patches/inkscape-1.1-fix-build-witch-gcc7.5.patch      \
    %D%/packages/patches/jfsutils-add-sysmacros.patch           \
    %D%/packages/patches/jfsutils-gcc-compat.patch              \
    %D%/packages/patches/jfsutils-include-systypes.patch                \
 -  %D%/packages/patches/jsoncpp-fix-inverted-case.patch                \
    %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch    \
    %D%/packages/patches/julia-tracker-16-compat.patch          \
    %D%/packages/patches/kdbusaddons-kinit-file-name.patch      \
    %D%/packages/patches/libblockdev-glib-compat.patch          \
    %D%/packages/patches/libffi-3.3-powerpc-fixes.patch         \
    %D%/packages/patches/libffi-float128-powerpc64le.patch      \
 +  %D%/packages/patches/librime-fix-build-with-gcc10.patch     \
    %D%/packages/patches/libvirt-add-install-prefix.patch       \
    %D%/packages/patches/libziparchive-add-includes.patch               \
    %D%/packages/patches/localed-xorg-keyboard.patch            \
    %D%/packages/patches/lcalc-default-parameters-2.patch               \
    %D%/packages/patches/lcalc-lcommon-h.patch                  \
    %D%/packages/patches/lcalc-using-namespace-std.patch                \
 -  %D%/packages/patches/lcms-CVE-2018-16435.patch              \
    %D%/packages/patches/ldc-bootstrap-disable-tests.patch      \
    %D%/packages/patches/ldc-disable-phobos-tests.patch         \
    %D%/packages/patches/ldns-drill-examples.patch              \
    %D%/packages/patches/libtgvoip-disable-webrtc.patch                 \
    %D%/packages/patches/libtheora-config-guess.patch           \
    %D%/packages/patches/libtirpc-hurd.patch                    \
 -  %D%/packages/patches/libtirpc-hurd-client.patch             \
    %D%/packages/patches/libtommath-fix-linkage.patch           \
    %D%/packages/patches/libtool-skip-tests2.patch              \
    %D%/packages/patches/libusb-0.1-disable-tests.patch         \
    %D%/packages/patches/libutils-remove-damaging-includes.patch        \
    %D%/packages/patches/libvdpau-va-gl-unbundle.patch          \
    %D%/packages/patches/libvpx-CVE-2016-2818.patch             \
 +  %D%/packages/patches/libxml2-parent-pointers.patch          \
 +  %D%/packages/patches/libxml2-terminating-newline.patch      \
 +  %D%/packages/patches/libxml2-xpath-recursion-limit.patch    \
    %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch \
    %D%/packages/patches/libxslt-generated-ids.patch            \
    %D%/packages/patches/libxt-guix-search-paths.patch          \
    %D%/packages/patches/luajit-no_ldconfig.patch                       \
    %D%/packages/patches/luit-posix.patch                               \
    %D%/packages/patches/lvm2-static-link.patch                 \
-   %D%/packages/patches/mailutils-fix-uninitialized-variable.patch     \
    %D%/packages/patches/mailutils-variable-lookup.patch                \
    %D%/packages/patches/make-impure-dirs.patch                 \
    %D%/packages/patches/marble-qt-add-qt-headers.patch         \
    %D%/packages/patches/mariadb-CVE-2021-27928.patch           \
 +  %D%/packages/patches/mariadb-cmake-compat.patch             \
    %D%/packages/patches/mars-install.patch                     \
    %D%/packages/patches/mars-sfml-2.3.patch                    \
    %D%/packages/patches/maxima-defsystem-mkdir.patch           \
    %D%/packages/patches/libmemcached-build-with-gcc7.patch     \
    %D%/packages/patches/libmhash-hmac-fix-uaf.patch            \
    %D%/packages/patches/mercurial-hg-extension-path.patch       \
 +  %D%/packages/patches/mesa-opencl-all-targets.patch          \
    %D%/packages/patches/mesa-skip-tests.patch                  \
    %D%/packages/patches/mescc-tools-boot.patch                 \
 -  %D%/packages/patches/meson-for-build-rpath.patch            \
    %D%/packages/patches/metabat-fix-compilation.patch          \
    %D%/packages/patches/mhash-keygen-test-segfault.patch               \
    %D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch   \
    %D%/packages/patches/minisat-friend-declaration.patch               \
    %D%/packages/patches/minisat-install.patch                  \
    %D%/packages/patches/mit-krb5-hurd.patch                    \
 -  %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \
    %D%/packages/patches/mpc123-initialize-ao.patch             \
    %D%/packages/patches/mpg321-CVE-2019-14247.patch            \
    %D%/packages/patches/module-init-tools-moduledir.patch      \
    %D%/packages/patches/nginx-socket-cloexec.patch             \
    %D%/packages/patches/nsis-env-passthru.patch                        \
    %D%/packages/patches/nsis-source-date-epoch.patch           \
 +  %D%/packages/patches/nss-getcwd-nonnull.patch                       \
    %D%/packages/patches/nss-increase-test-timeout.patch                \
    %D%/packages/patches/nss-3.56-pkgconfig.patch                       \
    %D%/packages/patches/ntfs-3g-CVE-2019-9755.patch            \
    %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch   \
    %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch  \
    %D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch  \
 +  %D%/packages/patches/ocaml-multiple-definitions.patch               \
 +  %D%/packages/patches/ocaml-4.09-multiple-definitions.patch  \
    %D%/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch     \
    %D%/packages/patches/omake-fix-non-determinism.patch        \
    %D%/packages/patches/oneko-remove-nonfree-characters.patch  \
    %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
    %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch          \
    %D%/packages/patches/pthreadpool-system-libraries.patch     \
 +  %D%/packages/patches/python-chai-drop-python2.patch         \
 +  %D%/packages/patches/python-random2-getrandbits-test.patch          \
    %D%/packages/patches/sdcc-disable-non-free-code.patch               \
    %D%/packages/patches/sdl-pango-api_additions.patch          \
    %D%/packages/patches/sdl-pango-blit_overflow.patch          \
    %D%/packages/patches/patchutils-test-perms.patch            \
    %D%/packages/patches/patch-hurd-path-max.patch              \
    %D%/packages/patches/perl-autosplit-default-time.patch      \
 -  %D%/packages/patches/perl-cross.patch                               \
 -  %D%/packages/patches/perl-deterministic-ordering.patch      \
    %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \
    %D%/packages/patches/perl-image-exiftool-CVE-2021-22204.patch       \
 -  %D%/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \
    %D%/packages/patches/perl-net-amazon-s3-moose-warning.patch \
    %D%/packages/patches/perl-net-dns-resolver-programmable-fix.patch   \
    %D%/packages/patches/perl-no-sys-dirs.patch                 \
    %D%/packages/patches/pinball-system-ltdl.patch              \
    %D%/packages/patches/pingus-boost-headers.patch             \
    %D%/packages/patches/pingus-sdl-libs-config.patch           \
 +  %D%/packages/patches/pipewire-0.2.7-fno-common.patch                \
    %D%/packages/patches/pixman-CVE-2016-5296.patch             \
    %D%/packages/patches/pjproject-correct-the-cflags-field.patch \
    %D%/packages/patches/pjproject-fix-pkg-config-ldflags.patch \
    %D%/packages/patches/python-2.7-site-prefixes.patch         \
    %D%/packages/patches/python-2.7-source-date-epoch.patch     \
    %D%/packages/patches/python-2.7-CVE-2021-3177.patch         \
 +  %D%/packages/patches/python-2.7-no-static-lib.patch         \
    %D%/packages/patches/python-3-arm-alignment.patch           \
    %D%/packages/patches/python-3-deterministic-build-info.patch        \
    %D%/packages/patches/python-3-search-paths.patch            \
    %D%/packages/patches/python-3-fix-tests.patch                       \
 -  %D%/packages/patches/python-3.8-fix-tests.patch             \
 -  %D%/packages/patches/python-3.8-CVE-2021-3177.patch         \
 -  %D%/packages/patches/python-3.9-fix-tests.patch             \
 +  %D%/packages/patches/python-3-hurd-configure.patch          \
 +  %D%/packages/patches/python-3-no-static-lib.patch           \
    %D%/packages/patches/python-CVE-2018-14647.patch            \
    %D%/packages/patches/python-CVE-2020-26116.patch            \
    %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch     \
    %D%/packages/patches/python-cross-compile.patch             \
    %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
    %D%/packages/patches/python-configobj-setuptools.patch      \
 +  %D%/packages/patches/python-docopt-pytest6-compat.patch     \
    %D%/packages/patches/python-execnet-read-only-fix.patch     \
 +  %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch  \
    %D%/packages/patches/python-flask-restful-werkzeug-compat.patch     \
    %D%/packages/patches/python-keras-integration-test.patch    \
    %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
    %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch \
    %D%/packages/patches/python-memcached-syntax-warnings.patch \
    %D%/packages/patches/python-mox3-python3.6-compat.patch     \
 -  %D%/packages/patches/python-testtools.patch                 \
 +  %D%/packages/patches/python-typing-inspect-fix.patch                \
    %D%/packages/patches/python-packaging-test-arch.patch               \
    %D%/packages/patches/python2-parameterized-docstring-test.patch     \
    %D%/packages/patches/python-paste-remove-timing-test.patch  \
    %D%/packages/patches/quassel-qt-514-compat.patch            \
    %D%/packages/patches/quickswitch-fix-dmenu-check.patch      \
    %D%/packages/patches/qtwebkit-pbutils-include.patch         \
 +  %D%/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch \
 +  %D%/packages/patches/qtwebkit-fix-building-with-python-3.9.patch    \
 +  %D%/packages/patches/qtwebkit-fix-building-with-icu-68.patch        \
 +  %D%/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch     \
    %D%/packages/patches/randomjungle-disable-static-build.patch        \
    %D%/packages/patches/rapicorn-isnan.patch                   \
    %D%/packages/patches/rapidjson-gcc-compat.patch             \
    %D%/packages/patches/ripperx-missing-file.patch             \
    %D%/packages/patches/rpcbind-CVE-2017-8779.patch            \
    %D%/packages/patches/rtags-separate-rct.patch                       \
+   %D%/packages/patches/racket-minimal-backport-1629887.patch    \
    %D%/packages/patches/racket-minimal-sh-via-rktio.patch      \
    %D%/packages/patches/remake-impure-dirs.patch                       \
    %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch        \
    %D%/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch \
    %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \
    %D%/packages/patches/ruby-sanitize-system-libxml.patch      \
 -  %D%/packages/patches/rust-1.19-mrustc.patch                 \
 -  %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
 -  %D%/packages/patches/rust-1.45-linker-locale.patch          \
 -  %D%/packages/patches/rust-1.48-linker-locale.patch          \
 -  %D%/packages/patches/rust-bootstrap-stage0-test.patch               \
    %D%/packages/patches/rust-coresimd-doctest.patch            \
    %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
    %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch        \
    %D%/packages/patches/tar-skip-unreliable-tests.patch                \
    %D%/packages/patches/tcc-boot-0.9.27.patch                  \
    %D%/packages/patches/tclxml-3.2-install.patch                       \
 -  %D%/packages/patches/tcl-fix-cross-compilation.patch                \
    %D%/packages/patches/tcsh-fix-autotest.patch                        \
    %D%/packages/patches/teensy-loader-cli-help.patch           \
    %D%/packages/patches/texinfo-5-perl-compat.patch            \
 -  %D%/packages/patches/texlive-bin-poppler-0.83.patch         \
 -  %D%/packages/patches/texlive-bin-poppler-0.86.patch         \
    %D%/packages/patches/telegram-purple-adjust-test.patch      \
    %D%/packages/patches/telepathy-glib-channel-memory-leak.patch       \
    %D%/packages/patches/texi2html-document-encoding.patch      \
    %D%/packages/patches/vboot-utils-fix-format-load-address.patch      \
    %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch      \
    %D%/packages/patches/vboot-utils-skip-test-workbuf.patch    \
 -  %D%/packages/patches/vigra-python-compat.patch              \
    %D%/packages/patches/vinagre-newer-freerdp.patch             \
    %D%/packages/patches/vinagre-newer-rdp-parameters.patch      \
    %D%/packages/patches/virglrenderer-CVE-2017-6386.patch      \
    %D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \
    %D%/packages/patches/xsane-support-ipv6.patch                       \
    %D%/packages/patches/xsane-tighten-default-umask.patch      \
 +  %D%/packages/patches/xygrib-fix-finding-data.patch          \
    %D%/packages/patches/yggdrasil-extra-config.patch   \
    %D%/packages/patches/ytfzf-programs.patch        \
    %D%/packages/patches/ytfzf-updates.patch        \
    %D%/packages/patches/ytnef-CVE-2021-3403.patch      \
 -  %D%/packages/patches/ytnef-CVE-2021-3404.patch      \
 -  %D%/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch       \
 -  %D%/packages/patches/zziplib-CVE-2018-16548.patch
 +  %D%/packages/patches/ytnef-CVE-2021-3404.patch
  
  MISC_DISTRO_FILES =                           \
    %D%/packages/ld-wrapper.in
diff --combined gnu/packages/admin.scm
@@@ -1,5 -1,5 +1,5 @@@
  ;;; GNU Guix --- Functional package management for GNU
 -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier <bavier@posteo.net>
@@@ -35,7 -35,6 +35,7 @@@
  ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
  ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
  ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
  ;;; Copyright © 2021 qblade <qblade@protonmail.com>
@@@ -277,14 -276,7 +277,14 @@@ and provides a \"top-like\" mode (monit
                                    version ".tar.gz"))
                (sha256
                 (base32
 -                "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
 +                "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))
 +              (modules '((guix build utils)))
 +              (snippet
 +               '(begin
 +                  ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
 +                  (substitute* "Makefile.in"
 +                    (("compile --target")
 +                     "compile -O1 --target"))))))
      (build-system gnu-build-system)
      (arguments
       '(#:configure-flags '("--localstatedir=/var")
@@@ -660,8 -652,7 +660,8 @@@ console."
       `(("ncurses" ,ncurses)))
      (native-inputs
       `(("autoconf" ,autoconf)
 -       ("automake" ,automake)))
 +       ("automake" ,automake)
 +       ("python" ,python-minimal-wrapper)))     ; for scripts/MakeHeader.py
      (home-page "https://htop.dev")
      (synopsis "Interactive process viewer")
      (description
@@@ -762,14 -753,15 +762,14 @@@ re-executing them as necessary."
  (define-public inetutils
    (package
      (name "inetutils")
 -    (version "1.9.4")
 +    (version "2.0")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/inetutils/inetutils-"
                                   version ".tar.gz"))
 -             (patches (search-patches "inetutils-hurd.patch"))
               (sha256
                (base32
 -               "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
 +               "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl"))))
      (build-system gnu-build-system)
      (arguments
       `(#:configure-flags '("--localstatedir=/var"
                                     "--disable-uucpd"
                                     "--disable-whois")
                                   '()))
 +       ;; Make sure that canonical "coreutils" package is not referred.
 +       #:make-flags
 +       (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
 +                            (assoc-ref %build-inputs "coreutils*")
 +                            "/bin/cp\\\""))
         ;; On some systems, 'libls.sh' may fail with an error such as:
         ;; "Failed to tell switch -a apart from -A".
         #:parallel-tests? #f))
 -    (inputs `(("ncurses" ,ncurses)
 +    (inputs `(("coreutils*" ,coreutils)
 +              ("shadow" ,shadow)    ;for login (used in telnetd and rlogind)
 +              ("ncurses" ,ncurses)
                ("readline" ,readline)))        ;for 'ftp'
      (native-inputs (if (member (%current-system)
                                 (package-supported-systems net-tools))
@@@ -956,11 -941,6 +956,11 @@@ to allow automatic login and starting a
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
 +       ;; This package consists solely of architecture-independent
 +       ;; tables. Cross-compilation is pointless! Make sure we'll
 +       ;; always get the same derivation.
 +       #:target #f
 +       #:allowed-references ()
         #:builder (begin
                     (use-modules (guix build utils)
                                  (srfi srfi-26))
@@@ -1282,7 -1262,8 +1282,7 @@@ connection alive."
                        (sed       (assoc-ref inputs "sed*")))
                   (substitute* "client/scripts/linux"
                     (("/sbin/ip")
 -                    (string-append (assoc-ref inputs "iproute")
 -                                   "/sbin/ip")))
 +                    (search-input-file inputs "/sbin/ip")))
  
                   (mkdir-p libexec)
                   (copy-file "client/scripts/linux"
@@@ -1633,7 -1614,8 +1633,7 @@@ at once based on a Perl regular express
                      (lambda* (#:key inputs #:allow-other-keys)
                        (substitute* "rc/rc"
                          (("/usr/sbin/sendmail")
 -                         (string-append (assoc-ref inputs "mailutils")
 -                                        "/bin/mail")))
 +                         (search-input-file inputs "/bin/mail")))
                        #t))
                    (add-after 'unpack 'fix-configure
                      (lambda* (#:key inputs native-inputs #:allow-other-keys)
@@@ -1687,7 -1669,7 +1687,7 @@@ system administrator."
  (define-public sudo
    (package
      (name "sudo")
-     (version "1.9.7p2")
+     (version "1.9.8")
      (source (origin
                (method url-fetch)
                (uri
                                      version ".tar.gz")))
                (sha256
                 (base32
-                 "1a7w99mlpa7kb7zfqkhvafli0a3xhz50kws25y2sg2dzbmrfxd98"))
+                 "1rlln9nb3lvg4qlkp0c9qxjflx36rf16mflg0sps2kl0k7lmswzi"))
                (modules '((guix build utils)))
                (snippet
                 '(begin
         ;; the chroot's /etc/passwd doesn't have it.  Turn off the tests.
         #:tests? #f))
      (native-inputs
 -     ;; XXX TODO: Remove on next rebuild cycle.
 -     (if (hurd-target?)
 -         '()
 -         `(("groff" ,groff))))
 +     `(("groff" ,groff)))
      (inputs
       `(("coreutils" ,coreutils)
         ,@(if (hurd-target?)
@@@ -3012,13 -2997,13 +3012,13 @@@ platform-specific methods."
    (package
      (name "audit")
      (home-page "https://people.redhat.com/sgrubb/audit/")
 -    (version "2.8.5")
 +    (version "3.0.4")
      (source (origin
                (method url-fetch)
                (uri (string-append home-page "audit-" version ".tar.gz"))
                (sha256
                 (base32
 -                "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
 +                "1xlcvc2g7qrbnin5pw0bacalva5ldjw97yi6nr17g0yjp4jyhnlc"))))
      (build-system gnu-build-system)
      (arguments
       `(#:configure-flags (list "--with-python=no"
@@@ -3103,7 -3088,7 +3103,7 @@@ done with the @code{auditctl} utility."
                   "install-nping")
                 (make ndiff "install-ndiff")
                 (wrap-program (string-append ndiff "/bin/ndiff")
 -                 `("PYTHONPATH" prefix
 +                 `("GUIX_PYTHONPATH" prefix
                     (,(python-path ndiff)))))
               #t))
           ;; These are the tests that do not require network access.
@@@ -3159,7 -3144,7 +3159,7 @@@ results (ndiff), and a packet generatio
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
                 (wrap-program (string-append out "/bin/dstat")
 -                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
                 #t))))))
      (inputs
       `(("python" ,python-wrapper)
@@@ -4213,7 -4198,8 +4213,7 @@@ cache of unix and unix-like systems."
         (modify-phases %standard-phases
           (add-before 'build 'setenv-PATH
             (lambda _
 -             (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
 -             #t)))))
 +             (setenv "PYTHONPATH" "lib"))))))
      (propagated-inputs
       `(("python-pygobject" ,python-pygobject)
         ("python-pyudev" ,python-pyudev)
diff --combined gnu/packages/algebra.scm
@@@ -4,7 -4,7 +4,7 @@@
  ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 -;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
 +;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
  ;;; Copyright © 2017, 2019, 2021 Eric Bavier <bavier@posteo.net>
@@@ -78,7 -78,7 +78,7 @@@
  (define-public mpfrcx
    (package
     (name "mpfrcx")
-    (version "0.6.2")
+    (version "0.6.3")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@@ -86,7 -86,7 +86,7 @@@
                    version ".tar.gz"))
              (sha256
               (base32
-               "165syd6kihwp6bry9hvr3v0908cgadsz5w5h5ry4mjnchrklnb7w"))))
+               "1545vgizpypqi2rrriad0ybqv0qwbn9zr0ibxpk00gha9ihv7acx"))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("gmp" ,gmp)
@@@ -248,8 -248,8 +248,8 @@@ the real span of the lattice."
                  "095s7vdlsxmxa0n0l1a082m6gjaypqfqkaj99z8j7dx0ji89hy8n"))))
      (build-system gnu-build-system)
      (native-inputs
 -     `(("texlive" ,(texlive-union
 -                    (list texlive-amsfonts/patched)))))
 +     `(("texlive" ,(texlive-updmap.cfg
 +                    (list texlive-amsfonts)))))
      (inputs `(("gmp" ,gmp)
                ("libx11" ,libx11)
                ("perl" ,perl)
@@@ -343,7 -343,7 +343,7 @@@ precision."
  (define-public giac
    (package
      (name "giac")
-     (version "1.7.0-29")
+     (version "1.7.0-31")
      (source
       (origin
         (method url-fetch)
                             "~parisse/debian/dists/stable/main/source/"
                             "giac_" version ".tar.gz"))
         (sha256
-         (base32 "1dw0mh212ri9viks15cn75m38m4q4nj3hlv2bbrpdz8sgnnssz0a"))))
+         (base32 "19vjyijlm3hb758h6nk70k41zw9wrbg6vwfx4r4rgvrb1myy5kpl"))))
      (build-system gnu-build-system)
      (arguments
       `(#:modules ((ice-9 ftw)
@@@ -702,14 -702,12 +702,14 @@@ binary."
         ("ed" ,ed)
         ("flex" ,flex)
         ("texinfo" ,texinfo)))
 +    (inputs
 +     `(("readline" ,readline)))
      (arguments
       '(#:configure-flags
         (list "--with-readline")
         #:phases
         (modify-phases %standard-phases
 -         (add-after 'unpack 'autogen
 +         (replace 'bootstrap
             (lambda _
               (invoke "autoreconf" "-vif"))))))
      (home-page "https://www.gnu.org/software/bc/")
          "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
      (build-system gnu-build-system)
      (inputs
 -     ;; TODO: remove `if' in the next rebuild cycle.
 -     (if (%current-target-system)
 -         `(("bash" ,bash-minimal)
 -           ("perl" ,perl)
 -           ("m4" ,m4))
 -         '()))
 +     `(("bash" ,bash-minimal)
 +       ("perl" ,perl)
 +       ("m4" ,m4)))
      (native-inputs
       `(("perl" ,perl)
         ("m4" ,m4)))
@@@ -132,7 -135,18 +132,18 @@@ know anything about Autoconf or M4."
                                   (find-files "bin"
                                               (lambda (file stat)
                                                 (executable-file? file)))))
-                #t))))))))
+                #t))
+            (add-after 'install 'unpatch-shebangs
+              (lambda* (#:key outputs #:allow-other-keys)
+                ;; Scripts that "autoconf -i" installs (config.guess,
+                ;; config.sub, and install-sh) must use a regular shebang
+                ;; rather than a reference to the store.  Restore it.
+                ;; TODO: Move this phase to 'autoconf-2.69'.
+                (let* ((out (assoc-ref outputs "out"))
+                       (build-aux (string-append
+                                   out "/share/autoconf/build-aux")))
+                  (substitute* (find-files build-aux)
+                    (("^#!.*/bin/sh") "#!/bin/sh")))))))))))
  
  (define-public autoconf autoconf-2.69)
  
@@@ -202,9 -216,9 +213,9 @@@ files with a system-specific shebang.
      (inputs `(("guile"
                 ;; XXX: Kludge to hide the circular dependency.
                 ,(module-ref (resolve-interface '(gnu packages guile))
 -                            'guile-2.0))
 +                            'guile-3.0/fixed))
                ("autoconf" ,autoconf)
 -              ("bash" ,bash)))
 +              ("bash" ,bash-minimal)))
      (arguments
       '(#:modules ((guix build utils))
         #:builder
@@@ -317,21 -331,24 +328,21 @@@ output is indexed in many ways to simpl
  (define-public automake
    (package
      (name "automake")
 -    (version "1.16.2")
 +    (version "1.16.3")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/automake/automake-"
                                   version ".tar.xz"))
               (sha256
                (base32
 -                "1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c"))
 +                "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"))
               (patches
                (search-patches "automake-skip-amhello-tests.patch"))))
      (build-system gnu-build-system)
      (inputs
 -     ;; TODO: remove `if' in the next rebuild cycle.
 -     (if (%current-target-system)
 -         `(("autoconf" ,autoconf-wrapper)
 -           ("bash" ,bash-minimal)
 -           ("perl" ,perl))
 -         '()))
 +     `(("autoconf" ,autoconf-wrapper)
 +       ("bash" ,bash-minimal)
 +       ("perl" ,perl)))
      (native-inputs
       `(("autoconf" ,autoconf-wrapper)
         ("perl" ,perl)))
@@@ -476,19 -493,11 +487,19 @@@ Makefile, simplifying the entire proces
                 (("/bin/sh")
                  (string-append bash "/bin/sh")))
               #t)))
 -         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
 -           (lambda* (#:key inputs #:allow-other-keys)
 -             (substitute* "build-aux/ltmain.in"
 -               (("^#!.*/bin/sh$") "#!/bin/sh"))
 -             #t)))))
 +         ;; These files may be copied into source trees by libtoolize,
 +         ;; therefore they must not point to store file names that would be
 +         ;; leaked with tarballs generated by make dist.
 +         (add-after 'install 'restore-build-aux-shebang
 +           (lambda* (#:key outputs #:allow-other-keys)
 +             (let* ((out (assoc-ref outputs "out"))
 +                    (dir (string-append out "/share/libtool/build-aux")))
 +               (for-each (lambda (file)
 +                           (format #t "restoring shebang on `~a'~%" file)
 +                           (substitute* file
 +                             (("^#!.*/bin/sh") "#!/bin/sh")))
 +                         (find-files dir ".*"))
 +               #t))))))
  
      (synopsis "Generic shared library support tools")
      (description
diff --combined gnu/packages/ci.scm
@@@ -73,8 -73,8 +73,8 @@@
                  (file-name (string-append name "-" version "-checkout")))))))
  
  (define-public cuirass
-   (let ((commit "91e8b2ec2c2dbb87089b0c98a29bba427ba7b7bb")
-         (revision "3"))
+   (let ((commit "60190401ce4ccc890629ec3cb22a84a8ab8c2645")
+         (revision "4"))
      (package
        (name "cuirass")
        (version (git-version "1.1.0" revision commit))
@@@ -87,7 -87,7 +87,7 @@@
           (file-name (git-file-name name version))
           (sha256
            (base32
-            "00xkxvghfgnmbs182s0q67habxjkv9sh7q8acsiy66m0z4f57y39"))))
+            "0b0bs32lzk5ck7lw8ac9dj2h70sqc5y430vhi7rcnwj48mdrchma"))))
        (build-system gnu-build-system)
        (arguments
         `(#:modules ((guix build utils)
                     `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
                   #t))))))
        (inputs
 -       `(("guile" ,guile-3.0/libgc-7)
 +       `(("guile" ,guile-3.0-latest)
           ("guile-avahi" ,guile-avahi)
           ("guile-fibers" ,guile-fibers)
           ("guile-gcrypt" ,guile-gcrypt)
diff --combined gnu/packages/cran.scm
@@@ -2023,17 -2023,17 +2023,17 @@@ previewing themes in real time."
                 ;; replace them.
                 (with-directory-excursion "inst/www/shared"
                   (replace-file "strftime/strftime-min.js"
 -                               (string-append (assoc-ref inputs "js-strftime")
 -                                              "/share/javascript/strftime.min.js"))
 +                               (search-input-file inputs
 +                                                  "/share/javascript/strftime.min.js"))
                   (replace-file "highlight/highlight.pack.js"
 -                               (string-append (assoc-ref inputs "js-highlight")
 -                                              "/share/javascript/highlight.min.js"))
 +                               (search-input-file inputs
 +                                                  "/share/javascript/highlight.min.js"))
                   (replace-file "datatables/js/jquery.dataTables.min.js"
 -                               (string-append (assoc-ref inputs "js-datatables")
 -                                              "/share/javascript/jquery.dataTables.min.js"))
 +                               (search-input-file inputs
 +                                                  "/share/javascript/jquery.dataTables.min.js"))
                   (replace-file "selectize/js/selectize.min.js"
 -                               (string-append (assoc-ref inputs "js-selectize")
 -                                              "/share/javascript/selectize.min.js"))
 +                               (search-input-file inputs
 +                                                  "/share/javascript/selectize.min.js"))
                   (for-each (match-lambda
                               ((source . target)
                                (minify source #:target target)))
@@@ -2137,8 -2137,8 +2137,8 @@@ responsive, and powerful applications w
           (add-after 'unpack 'replace-minified-javascript
             (lambda* (#:key inputs #:allow-other-keys)
               (with-directory-excursion "inst/www/jsTree-3.3.7/"
 -               (symlink (string-append (assoc-ref inputs "js-requirejs")
 -                                       "/share/javascript/require.min.js")
 +               (symlink (search-input-file inputs
 +                                           "/share/javascript/require.min.js")
                          "libs/require.js")
                 (call-with-values
                     (lambda ()
@@@ -9390,6 -9390,144 +9390,144 @@@ and make comparisons between different 
  several entropy estimators.")
      (license license:gpl3+)))
  
+ (define-public r-nsprcomp
+   (package
+     (name "r-nsprcomp")
+     (version "0.5.1-2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "nsprcomp" version))
+        (sha256
+         (base32
+          "1zlc1ximx96f235c0l8qfs6vbp1kpnbf943wxsfahnnlnxvwi59f"))))
+     (properties `((upstream-name . "nsprcomp")))
+     (build-system r-build-system)
+     (home-page "https://sigg-iten.ch/research/")
+     (synopsis "Non-negative and sparse PCA")
+     (description
+      "This package implements two methods for performing a constrained
+ principal component analysis (PCA), where non-negativity and/or sparsity
+ constraints are enforced on the principal axes (PAs).  The function
+ @code{nsprcomp} computes one principal component (PC) after the other.  Each
+ PA is optimized such that the corresponding PC has maximum additional variance
+ not explained by the previous components.  In contrast, the function
+ @code{nscumcomp} jointly computes all PCs such that the cumulative variance is
+ maximal.  Both functions have the same interface as the @code{prcomp} function
+ from the @code{stats} package (plus some extra parameters).")
+     (license license:gpl2+)))
+ (define-public r-cmplot
+   (package
+     (name "r-cmplot")
+     (version "3.6.2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "CMplot" version))
+        (sha256
+         (base32
+          "13y05j5gsdc712fn7yvcz5nx2pbcdvl201hfb6jzpvl86qx2l0j1"))))
+     (properties `((upstream-name . "CMplot")))
+     (build-system r-build-system)
+     (home-page "https://github.com/YinLiLin/CMplot")
+     (synopsis "Circle Manhattan plot")
+     (description
+      "Circle Manhattan Plot is an R package that can lay out genome-wide
+ association study P-value results in both traditional rectangular patterns,
+ QQ-plot and novel circular ones.  United in only one bull's eye style plot,
+ association results from multiple traits can be compared interactively,
+ thereby to reveal both similarities and differences between signals.
+ Additional functions include: highlight signals, a group of SNPs, chromosome
+ visualization and candidate genes around SNPs.")
+     (license license:gpl2+)))
+ (define-public r-precrec
+   (package
+     (name "r-precrec")
+     (version "0.12.7")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "precrec" version))
+        (sha256
+         (base32
+          "0vwzaqnh9ymrm52dd79bihwqprnygz0d71ay8fv51hdw0zg6saya"))))
+     (properties `((upstream-name . "precrec")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-assertthat" ,r-assertthat)
+        ("r-data-table" ,r-data-table)
+        ("r-ggplot2" ,r-ggplot2)
+        ("r-gridextra" ,r-gridextra)
+        ("r-rcpp" ,r-rcpp)
+        ("r-withr" ,r-withr)))
+     (native-inputs `(("r-knitr" ,r-knitr)))
+     (home-page "https://evalclass.github.io/precrec/")
+     (synopsis "Calculate accurate precision-recall and ROC curves")
+     (description
+      "This package provides tools for accurate calculations and visualization
+ of precision-recall and ROC (Receiver Operator Characteristics) curves.")
+     (license license:gpl3)))
+ (define-public r-netrep
+   (package
+     (name "r-netrep")
+     (version "1.2.4")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "NetRep" version))
+        (sha256
+         (base32
+          "1swlb2k9bc7whvslxbklz864j9ynvna73hvq5rhv61cv5vy05ksd"))))
+     (properties `((upstream-name . "NetRep")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-abind" ,r-abind)
+        ("r-bh" ,r-bh)
+        ("r-foreach" ,r-foreach)
+        ("r-rcolorbrewer" ,r-rcolorbrewer)
+        ("r-rcpp" ,r-rcpp)
+        ("r-rcpparmadillo" ,r-rcpparmadillo)
+        ("r-rhpcblasctl" ,r-rhpcblasctl)
+        ("r-statmod" ,r-statmod)))
+     (native-inputs `(("r-knitr" ,r-knitr)))
+     (home-page "https://cran.r-project.org/package=NetRep")
+     (synopsis "Permutation testing network module preservation across datasets")
+     (description
+      "This package provides functions for assessing the
+ replication/preservation of a network module's topology across datasets
+ through permutation testing.")
+     (license license:gpl2)))
+ (define-public r-intergraph
+   (package
+     (name "r-intergraph")
+     (version "2.0-2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "intergraph" version))
+        (sha256
+         (base32
+          "18a7xgb2rp0w9jl2rkh8nzyjprrs5w7h2iidvc8c38bzx3qpggkc"))))
+     (properties `((upstream-name . "intergraph")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-igraph" ,r-igraph)
+        ("r-network" ,r-network)))
+     (native-inputs
+      `(("r-knitr" ,r-knitr)))
+     (home-page "http://mbojan.github.io/intergraph")
+     (synopsis "Coercion routines for network data objects")
+     (description
+      "Functions implemented in this package allow to coerce (i.e. convert)
+ network data between classes provided by other R packages.  Currently
+ supported classes are those defined in packages @code{network} and
+ @code{igraph}.")
+     (license license:gpl3)))
  (define-public r-abcoptim
    (package
      (name "r-abcoptim")
@@@ -9517,6 -9655,233 +9655,233 @@@ and coverage methods to tune the choic
  @end enumerate")
      (license license:gpl3)))
  
+ (define-public r-ggnetwork
+   (package
+     (name "r-ggnetwork")
+     (version "0.5.10")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "ggnetwork" version))
+        (sha256
+         (base32
+          "0gqdgy5yh700dg0f7xb80hczlnqfisn8l55j7amd1n7fp2x5sr8v"))))
+     (properties `((upstream-name . "ggnetwork")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-ggplot2" ,r-ggplot2)
+        ("r-ggrepel" ,r-ggrepel)
+        ("r-igraph" ,r-igraph)
+        ("r-network" ,r-network)
+        ("r-sna" ,r-sna)))
+     (native-inputs `(("r-knitr" ,r-knitr)))
+     (home-page "https://github.com/briatte/ggnetwork")
+     (synopsis "Geometries to plot networks with ggplot2")
+     (description
+      "This package provides geometries to plot network objects with the
+ ggplot2 package.")
+     (license license:gpl3)))
+ (define-public r-cvauc
+   (package
+     (name "r-cvauc")
+     (version "1.1.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "cvAUC" version))
+        (sha256
+         (base32
+          "13bk97l5nn97h85iz93zxazhr63n21nwyrpnl856as9qp59yvn64"))))
+     (properties `((upstream-name . "cvAUC")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-data-table" ,r-data-table)
+        ("r-rocr" ,r-rocr)))
+     (home-page "https://github.com/ledell/cvAUC")
+     (synopsis "Cross-validated area under the ROC curve confidence intervals")
+     (description
+      "This package contains various tools for working with and evaluating
+ cross-validated area under the ROC curve (AUC) estimators.  The primary
+ functions of the package are @code{ci.cvAUC} and @code{ci.pooled.cvAUC}, which
+ report cross-validated AUC and compute confidence intervals for
+ cross-validated AUC estimates based on influence curves for i.i.d. and pooled
+ repeated measures data, respectively.")
+     (license license:asl2.0)))
+ (define-public r-gam
+   (package
+     (name "r-gam")
+     (version "1.20")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "gam" version))
+        (sha256
+         (base32
+          "1zhy2fp7pxac8xp3z3hndhprj4s5gx3305b627vc78bal1ml3swi"))))
+     (properties `((upstream-name . "gam")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-foreach" ,r-foreach)))
+     (native-inputs
+      `(("gfortran" ,gfortran)))
+     (home-page "https://cran.r-project.org/package=gam")
+     (synopsis "Generalized additive models")
+     (description
+      "This package provides functions for fitting and working with generalized
+ additive models, as described in chapter 7 of \"Statistical Models in
+ S\" (Chambers and Hastie (eds), 1991), and \"Generalized Additive
+ Models\" (Hastie and Tibshirani, 1990).")
+     (license license:gpl2)))
+ (define-public r-superlearner
+   (package
+     (name "r-superlearner")
+     (version "2.0-28")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "SuperLearner" version))
+        (sha256
+         (base32
+          "00any24msgflyagy87nznpfjz5g9v15frqda6c679wa8plx26hjz"))))
+     (properties `((upstream-name . "SuperLearner")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-cvauc" ,r-cvauc)
+        ("r-gam" ,r-gam)
+        ("r-nnls" ,r-nnls)))
+     (native-inputs
+      `(("r-knitr" ,r-knitr)))
+     (home-page "https://github.com/ecpolley/SuperLearner")
+     (synopsis "Super learner prediction")
+     (description
+      "This package implements the super learner prediction method and contains
+ a library of prediction algorithms to be used in the super learner.")
+     (license license:gpl3)))
+ (define-public r-drtmle
+   (package
+     (name "r-drtmle")
+     (version "1.1.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "drtmle" version))
+        (sha256
+         (base32
+          "08a6k0nrg6mqdslwjc71583x52vnax87nbfalk98zczwvrrdwvxa"))))
+     (properties `((upstream-name . "drtmle")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-future-apply" ,r-future-apply)
+        ("r-np" ,r-np)
+        ("r-superlearner" ,r-superlearner)))
+     (native-inputs
+      `(("r-knitr" ,r-knitr)))
+     (home-page "https://github.com/benkeser/drtmle")
+     (synopsis "Doubly-robust nonparametric estimation and inference")
+     (description
+      "This package implements targeted minimum loss-based estimators of
+ counterfactual means and causal effects that are doubly-robust with respect
+ both to consistency and asymptotic normality.")
+     (license license:expat)))
+ (define-public r-dofuture
+   (package
+     (name "r-dofuture")
+     (version "0.12.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "doFuture" version))
+        (sha256
+         (base32
+          "1hqzdlgcrc5l6xjwdylsc9iiysi2wx8k1j1vmw3wryj26057c9y4"))))
+     (properties `((upstream-name . "doFuture")))
+     (build-system r-build-system)
+     (arguments
+      '(#:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'set-HOME
+            (lambda _ (setenv "HOME" "/tmp"))))))
+     (propagated-inputs
+      `(("r-foreach" ,r-foreach)
+        ("r-future" ,r-future)
+        ("r-globals" ,r-globals)
+        ("r-iterators" ,r-iterators)))
+     (native-inputs
+      `(("r-r-rsp" ,r-r-rsp))) ; vignette builder
+     (home-page "https://github.com/HenrikBengtsson/doFuture")
+     (synopsis "Foreach parallel adapter using the future API")
+     (description
+      "This package provides a @code{%dopar%} adapter such that any type of
+ futures can be used as backends for the @code{foreach} framework.")
+     (license license:lgpl2.1+)))
+ (define-public r-superheat
+   (package
+     (name "r-superheat")
+     (version "0.1.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "superheat" version))
+        (sha256
+         (base32
+          "01v8s6px1k5fajlm6py3ksr1i853kwwlky1yryzhy3p1cxhwgg83"))))
+     (properties `((upstream-name . "superheat")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-dplyr" ,r-dplyr)
+        ("r-ggdendro" ,r-ggdendro)
+        ("r-ggplot2" ,r-ggplot2)
+        ("r-gtable" ,r-gtable)
+        ("r-magrittr" ,r-magrittr)
+        ("r-plyr" ,r-plyr)
+        ("r-scales" ,r-scales)))
+     (home-page "https://cran.r-project.org/package=superheat")
+     (synopsis "Graphical tool for exploring complex datasets using heatmaps")
+     (description
+      "This package provides a system for generating extendable and
+ customizable heatmaps for exploring complex datasets, including big data and
+ data with multiple data types.")
+     (license license:cc0)))
+ (define-public r-qualv
+   (package
+     (name "r-qualv")
+     (version "0.3-3")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "qualV" version))
+        (sha256
+         (base32
+          "1yyqk223ydcc0125gsn33a4mcdp8bd76fpn8kj9bfz9g78b8dqmx"))))
+     (properties `((upstream-name . "qualV")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-kernsmooth" ,r-kernsmooth)))
+     (home-page "http://qualV.R-Forge.R-Project.org/")
+     (synopsis "Qualitative Validation Methods")
+     (description
+      "This package provides qualitative methods for the validation of dynamic
+ models.  It contains
+ @enumerate
+ @item an orthogonal set of deviance measures for absolute, relative and
+   ordinal scale and
+ @item approaches accounting for time shifts.
+ @end enumerate
+ The first approach transforms time to take time delays and speed differences
+ into account.  The second divides the time series into interval units
+ according to their main features and finds the @dfn{longest common
+ subsequence} (LCS) using a dynamic programming algorithm.")
+     (license license:gpl2+)))
  (define-public r-mosaiccore
    (package
      (name "r-mosaiccore")
@@@ -11745,6 -12110,54 +12110,54 @@@ builders who wish to wrap command line 
  inside R when they might usually leave to execute non-R software.")
      (license license:expat)))
  
+ (define-public r-rslurm
+   (package
+     (name "r-rslurm")
+     (version "0.6.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "rslurm" version))
+        (sha256
+         (base32
+          "0fn2na8prsaxa03x5wi3105gpsxc35qvgmik7wy3nylvx4wdfv9g"))))
+     (properties `((upstream-name . "rslurm")))
+     (build-system r-build-system)
+     (propagated-inputs `(("r-whisker" ,r-whisker)))
+     (native-inputs `(("r-knitr" ,r-knitr)))
+     (home-page "http://cyberhelp.sesync.org/rslurm/")
+     (synopsis "Submit R calculations to a Slurm cluster")
+     (description
+      "This package provides functions that simplify submitting R scripts to a
+ Slurm workload manager, in part by automating the division of embarrassingly
+ parallel calculations across cluster nodes.")
+     (license license:gpl3)))
+ (define-public r-chk
+   (package
+     (name "r-chk")
+     (version "0.7.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "chk" version))
+        (sha256
+         (base32
+          "1fxsxgvd08lkb6amjgs4x48dhqr046mmjngjfgy2ya9cl2shd7ls"))))
+     (properties `((upstream-name . "chk")))
+     (build-system r-build-system)
+     (propagated-inputs
+      `(("r-lifecycle" ,r-lifecycle)
+        ("r-rlang" ,r-rlang)))
+     (native-inputs `(("r-knitr" ,r-knitr)))
+     (home-page "https://github.com/poissonconsulting/chk")
+     (synopsis "Check user-supplied function arguments")
+     (description
+      "This is a package for developers to check user-supplied function
+ arguments.  It is designed to be simple, fast and customizable.  Error
+ messages follow the tidyverse style guide.")
+     (license license:expat)))
  (define-public r-weights
    (package
      (name "r-weights")
@@@ -24295,8 -24708,9 +24708,8 @@@ techniques to average Bayesian predicti
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "TZ" "UTC+1")
               (setenv "TZDIR"
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))
 -             #t)))))
 +                     (search-input-directory inputs
 +                                             "share/zoneinfo")))))))
      (native-inputs
       `(("tzdata" ,tzdata-for-tests)
         ("pandoc" ,pandoc)
@@@ -12,7 -12,6 +12,7 @@@
  ;;; Copyright © 2020 André Batista <nandre@riseup.net>
  ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
  ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
  ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
  ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
@@@ -43,6 -42,7 +43,7 @@@
    #:use-module (guix packages)
    #:use-module (guix utils)
    #:use-module (gnu packages)
+   #:use-module (gnu packages admin)
    #:use-module (gnu packages cmake)
    #:use-module (gnu packages compression)
    #:use-module (gnu packages crates-graphics)
@@@ -55,6 -55,7 +56,7 @@@
    #:use-module (gnu packages glib)
    #:use-module (gnu packages image)
    #:use-module (gnu packages jemalloc)
+   #:use-module (gnu packages linux)
    #:use-module (gnu packages llvm)
    #:use-module (gnu packages multiprecision)
    #:use-module (gnu packages nettle)
@@@ -5824,6 -5825,57 +5826,57 @@@ functions} for a collection of hashabl
      (description "This package provides a safe FnOnce boxing for Rust.")
      (license license:expat)))
  
+ (define-public rust-boxxy-0.11
+   (package
+     (name "rust-boxxy")
+     (version "0.11.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "boxxy" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "10p8i30ri9rhrmlbdxp9s4k4fgsjq6q6b1x2ncchli1ad6psylms"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-base64" ,rust-base64-0.10)
+         ("rust-bufstream" ,rust-bufstream-0.1)
+         ("rust-caps" ,rust-caps-0.3)
+         ("rust-cfg-if" ,rust-cfg-if-0.1)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-errno" ,rust-errno-0.2)
+         ("rust-error-chain" ,rust-error-chain-0.12)
+         ("rust-futures" ,rust-futures-0.1)
+         ("rust-http" ,rust-http-0.1)
+         ("rust-hyper" ,rust-hyper-0.12)
+         ("rust-hyper-rustls" ,rust-hyper-rustls-0.17)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-libflate" ,rust-libflate-0.1)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-nix" ,rust-nix-0.15)
+         ("rust-pledge" ,rust-pledge-0.3)
+         ("rust-regex" ,rust-regex-1)
+         ("rust-rustls" ,rust-rustls-0.16)
+         ("rust-rustyline" ,rust-rustyline-5)
+         ("rust-sha2" ,rust-sha2-0.8)
+         ("rust-tar" ,rust-tar-0.4)
+         ("rust-tokio-core" ,rust-tokio-core-0.1)
+         ("rust-url" ,rust-url-2)
+         ("rust-webpki" ,rust-webpki-0.21))
+        #:cargo-development-inputs
+        (("rust-ctrlc" ,rust-ctrlc-3)
+         ("rust-elf" ,rust-elf-0.0.10)
+         ("rust-env-logger" ,rust-env-logger-0.6))))
+     (home-page "https://github.com/kpcyrd/boxxy-rs")
+     (synopsis "Linkable sandbox explorer")
+     (description
+      "This library provides an interactive shell that can be linked into a
+ program to verify sandboxing measures are adequate.")
+     (license license:lgpl3)))
  (define-public rust-bresenham-0.1
    (package
      (name "rust-bresenham")
@@@ -6138,6 -6190,31 +6191,31 @@@ system calls.  Second, exposing the int
  with data in place, which avoids another copy.")
      (license license:gpl3)))
  
+ (define-public rust-bufstream-0.1
+   (package
+     (name "rust-bufstream")
+     (version "0.1.4")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "bufstream" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1j7f52rv73hd1crzrrfb9dr50ccmi3hb1ybd6s5dyg6jmllqkqs0"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-futures" ,rust-futures-0.1)
+         ("rust-tokio-io" ,rust-tokio-io-0.1))))
+     (home-page "https://github.com/alexcrichton/bufstream")
+     (synopsis "I/O streams with separate read/write buffers")
+     (description
+      "This package provides buffered I/O for streams where each read/write
+ half is separately buffered.")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-bugreport-0.4
    (package
      (name "rust-bugreport")
@@@ -9590,6 -9667,30 +9668,30 @@@ It supports signed and private (encrypt
          ("rust-sha2" ,rust-sha2-0.8)
          ("rust-time" ,rust-time-0.1))))))
  
+ (define-public rust-cookie-factory-0.3
+   (package
+     (name "rust-cookie-factory")
+     (version "0.3.2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "cookie-factory" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0sqjmw85ckqhppff6gjwmvjpkii35441a51xx7cv0ih3jy2fjv9r"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:tests? #f
+        #:cargo-development-inputs (("rust-maplit" ,rust-maplit-1))))
+     (home-page "https://github.com/rust-bakery/cookie-factory")
+     (synopsis "Combinator-based serialization library")
+     (description
+      "This package provides a serialization library with a combinator design
+ similar to the nom parser combinators library.")
+     (license license:expat)))
  (define-public rust-cookie-store-0.7
    (package
      (name "rust-cookie-store")
@@@ -11085,6 -11186,27 +11187,27 @@@ number ``crunching``."
  common cryptographic algorithms.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-rusticata-macros-3
+   (package
+     (name "rust-rusticata-macros")
+     (version "3.2.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "rusticata-macros" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1b91k644rqblbam6rfhhmgcxs0zddldi2h0w93aapv1kqq9fbgpv"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs (("rust-nom" ,rust-nom-6))))
+     (home-page "https://github.com/rusticata/rusticata-macros")
+     (synopsis "Helper macros for Rusticata")
+     (description "Helper macros for Rusticata")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-crypto-mac-0.11
    (package
      (name "rust-crypto-mac")
@@@ -11854,6 -11976,7 +11977,6 @@@ attributes."
      (build-system cargo-build-system)
      (arguments
       `(#:tests? #f  ; Cannot compile cxx-test-suite.
 -       #:rust ,rust-1.48    ; or newer
         #:cargo-inputs
         (("rust-cc" ,rust-cc-1)
          ("rust-cxxbridge-flags" ,rust-cxxbridge-flags-1)
            "0shmkgv3cnh06ws1p555znj1hh23phynaz73rgnz95gradsdwnwg"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.48    ; or newer
 -       #:cargo-inputs
 +     `(#:cargo-inputs
         (("rust-cc" ,rust-cc-1)
          ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
          ("rust-lazy-static" ,rust-lazy-static-1)
@@@ -11973,7 -12097,8 +12096,7 @@@ crate into a Cargo build."
            "08v366jxd2vc8jc2cbvrga0866pwfcaq6hl8yylfx0vhs2n53j53"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.48    ; or newer
 -       #:cargo-inputs
 +     `(#:cargo-inputs
         (("rust-cc" ,rust-cc-1)
          ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
          ("rust-proc-macro2" ,rust-proc-macro2-1)
@@@ -12078,7 -12203,8 +12201,7 @@@ crate (implementation detail)."
            "0gkwvihw74dh8p3fz3552wnxanrpwmwfy38ylz2z8knjq0y8y4v3"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.48    ; or newer
 -       #:cargo-inputs
 +     `(#:cargo-inputs
         (("rust-clang-ast" ,rust-clang-ast-0.1)
          ("rust-flate2" ,rust-flate2-1)
          ("rust-memmap" ,rust-memmap-0.7)
@@@ -13221,6 -13347,33 +13344,33 @@@ procedural macros"
  procedural macros.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-dhcp4r-0.2
+   (package
+     (name "rust-dhcp4r")
+     (version "0.2.2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "dhcp4r" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0paq13i9iz5545f5aw8ijxflw20fvb3k8s4m3inr5q19q5rirpbc"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-enum-primitive-derive" ,rust-enum-primitive-derive-0.2)
+         ("rust-nom" ,rust-nom-6)
+         ("rust-num-traits" ,rust-num-traits-0.2)
+         ("rust-time" ,rust-time-0.2))))
+     (home-page "https://github.com/krolaw/dhcp4r")
+     (synopsis "IPv4 DHCP library with working server example.")
+     (description
+      "This package provides a library for IPv4 DHCP including a working server
+ example.")
+     (license license:bsd-3)))
  (define-public rust-dialoguer-0.6
    (package
      (name "rust-dialoguer")
@@@ -14615,6 -14768,28 +14765,28 @@@ signing, and verification in pure Rust.
  @code{Right} is a general purpose sum type with two cases.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-elf-0.0.10
+   (package
+     (name "rust-elf")
+     (version "0.0.10")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "elf" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1xcpf7jdmrl7rdmd6009grahvgp3k695h5x4cadrpr70vcaxwha8"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs (("rust-byteorder" ,rust-byteorder-0.5))))
+     (home-page "https://github.com/cole14/rust-elf/")
+     (synopsis "Library for parsing ELF files")
+     (description
+      "This package provides a pure-Rust library for parsing ELF files.")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-emacs-0.11
    (package
      (name "rust-emacs")
@@@ -15107,6 -15282,32 +15279,32 @@@ accessor functions on enums."
  instances for enum.")
      (license license:expat)))
  
+ (define-public rust-enum-primitive-derive-0.2
+   (package
+     (name "rust-enum-primitive-derive")
+     (version "0.2.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "enum-primitive-derive" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0h1k2izdl5lf2na8xnj7rgwjm8gawxc2p1w8j6ahifvyka7jhljz"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-num-traits" ,rust-num-traits-0.2)
+         ("rust-quote" ,rust-quote-1)
+         ("rust-syn" ,rust-syn-1))))
+     (home-page "https://gitlab.com/cardoe/enum-primitive-derive")
+     (synopsis "Reimplementation of enum_primitive using a #[derive] macro")
+     (description
+      "This package provides a custom derive using procedural macros to
+ implement enum_primitive.")
+     (license license:expat)))
  (define-public rust-enum-to-u8-slice-derive-0.1
    (package
      (name "rust-enum-to-u8-slice-derive")
@@@ -20471,10 -20672,10 +20669,10 @@@ hexadecimal representation."
         (sha256
          (base32 "1ajkw40qzn2ygnqjj9w584f6l31wi318258n84pn2hax8la2i8nn"))))))
  
- (define-public rust-hex-literal-0.2
+ (define-public rust-hex-literal-0.3
    (package
      (name "rust-hex-literal")
-     (version "0.2.1")
+     (version "0.3.3")
      (source
       (origin
         (method url-fetch)
          (string-append name "-" version ".tar.gz"))
         (sha256
          (base32
-          "1q36f0qq31ggh4ipcwb7a5g6jmci2010vn2v3qpaz4csxhhf47cn"))))
+          "0nzljsyz9rwhh4vi0xs9ya4l5g0ka754wgpy97r1j3v42c75kr11"))))
      (build-system cargo-build-system)
-     (arguments
-      `(#:cargo-inputs
-        (("rust-hex-literal-impl" ,rust-hex-literal-impl-0.2)
-         ("rust-proc-macro-hack" ,rust-proc-macro-hack-0.5))))
      (home-page "https://github.com/RustCrypto/utils")
      (synopsis
       "Convert hexadecimal string to byte array at compile time")
  compile time.")
      (license (list license:asl2.0 license:expat))))
  
+ (define-public rust-hex-literal-0.2
+   (package
+     (inherit rust-hex-literal-0.3)
+     (name "rust-hex-literal")
+     (version "0.2.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "hex-literal" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1q36f0qq31ggh4ipcwb7a5g6jmci2010vn2v3qpaz4csxhhf47cn"))))
+     (arguments
+      `(#:cargo-inputs
+        (("rust-hex-literal-impl" ,rust-hex-literal-impl-0.2)
+         ("rust-proc-macro-hack" ,rust-proc-macro-hack-0.5))))))
  (define-public rust-hex-literal-0.1
    (package
      (inherit rust-hex-literal-0.2)
@@@ -25316,10 -25532,10 +25529,10 @@@ image together with its neighboring pix
          ("rust-flate2" ,rust-flate2-1)
          ("rust-image" ,rust-image-0.20)
          ("rust-itoa" ,rust-itoa-0.4)
 -        ("rust-linked-hash-map" ,rust-linked-hash-map-0.4)
 +        ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
          ("rust-log" ,rust-log-0.4)
          ("rust-lzw" ,rust-lzw-0.10)
 -        ("rust-nom" ,rust-nom-5)
 +        ("rust-nom" ,rust-nom-6)
          ("rust-pom" ,rust-pom-3)
          ("rust-rayon" ,rust-rayon-1)
          ("rust-time" ,rust-time-0.2))))
@@@ -26662,6 -26878,38 +26875,38 @@@ based on Rustls and Ring."
         (("rust-sema" ,rust-sema-0.1)
          ("rust-winit" ,rust-winit-0.19)))))) ; 0.17?
  
+ (define-public rust-tls-parser-0.10
+   (package
+     (name "rust-tls-parser")
+     (version "0.10.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "tls-parser" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1spgykvrxlzb059zzz1hzinc4vvkpixw9nd6p94vw3rimar5m68n"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:tests? #f ;; requires assets not included in crates.io tarball
+        #:cargo-inputs
+        (("rust-cookie-factory" ,rust-cookie-factory-0.3)
+         ("rust-enum-primitive" ,rust-enum-primitive-0.1)
+         ("rust-nom" ,rust-nom-6)
+         ("rust-nom-derive" ,rust-nom-derive-0.7)
+         ("rust-phf" ,rust-phf-0.8)
+         ("rust-phf-codegen" ,rust-phf-codegen-0.8)
+         ("rust-rusticata-macros" ,rust-rusticata-macros-3))
+        #:cargo-development-inputs
+        (("rust-hex-literal" ,rust-hex-literal-0.3)
+         ("rust-pretty-assertions" ,rust-pretty-assertions-0.6))))
+     (home-page "https://github.com/rusticata/tls-parser")
+     (synopsis "Parser for the TLS protocol")
+     (description "This package provides a Rust parser for the TLS protocol.")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-twox-hash-1
    (package
      (name "rust-twox-hash")
@@@ -28993,6 -29241,34 +29238,34 @@@ combinators library."
        ;; This is an ancient version and all inputs are optional.
       `(#:skip-build? #t))))
  
+ (define-public rust-nom-derive-0.7
+   (package
+     (name "rust-nom-derive")
+     (version "0.7.2")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "nom-derive" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1xwbbkfhr8zrlcknlj75l50rp2b267qm9sd8vphx6gwzyg24n2zz"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-proc-macro2" ,rust-proc-macro2-1)
+         ("rust-quote" ,rust-quote-1)
+         ("rust-syn" ,rust-syn-1))
+        #:cargo-development-inputs
+        (("rust-nom" ,rust-nom-6)
+         ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
+         ("rust-trybuild" ,rust-trybuild-1))))
+     (home-page "https://github.com/rust-bakery/nom-derive")
+     (synopsis "Custom derive nom parsers from struct")
+     (description "This package derives custom nom parsers from structs.")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-noop-proc-macro-0.3
    (package
      (name "rust-noop-proc-macro")
@@@ -31914,6 -32190,32 +32187,32 @@@ in pure Rust."
          ("rust-sha-1" ,rust-sha-1-0.8)
          ("rust-sha2" ,rust-sha2-0.8))))))
  
+ (define-public rust-pcap-sys-0.1
+   (package
+     (name "rust-pcap-sys")
+     (version "0.1.3")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pcap-sys" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "18w9c8i5zjnazay86219w4789482ya617z35cw433h12wbgjaiqi"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-libc" ,rust-libc-0.2)
+         ("rust-pkg-config" ,rust-pkg-config-0.3)
+         ("rust-winapi" ,rust-winapi-0.3))))
+     (inputs `(("libpcap" ,libpcap)))
+     (home-page "https://github.com/jmmk/rustcap")
+     (synopsis "Low-level bindings to libpcap")
+     (description "This package provides low-level Rust bindings to the libpcap
+ library.")
+     (license license:expat)))
  (define-public rust-pcre2-0.2
    (package
      (name "rust-pcre2")
@@@ -32959,6 -33261,30 +33258,30 @@@ used in Cargo build scripts."
      (license (list license:asl2.0
                     license:expat))))
  
+ (define-public rust-pktparse-0.5
+   (package
+     (name "rust-pktparse")
+     (version "0.5.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pktparse" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "17a78c29l070mlwjdr3bdph785c9v5rps0if3v0s21w4nwaybhck"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-nom" ,rust-nom-5)
+         ("rust-serde" ,rust-serde-1))))
+     (home-page "https://github.com/bestouff/pktparse-rs")
+     (synopsis "Collection of packet parsers")
+     (description "This package provides a collection of parsers for various
+ network packet formats.")
+     (license license:lgpl3)))
  (define-public rust-plain-0.2
    (package
      (name "rust-plain")
@@@ -33732,7 -34058,8 +34055,7 @@@ UDP."
            "1hnid1d78zrr8ph12lpvp5b2cpx2fsqqgqs2yn1q23c6g7jix1y7"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.46    ; or later
 -       #:tests? #f          ; tests require postgres server.
 +     `(#:tests? #f          ; tests require postgres server.
         #:cargo-inputs
         (("rust-bytes" ,rust-bytes-1)
          ("rust-fallible-iterator" ,rust-fallible-iterator-0.2)
@@@ -34180,27 -34507,26 +34503,26 @@@ functions."
  particularly useful for printing structured recursive data like trees.")
      (license license:expat)))
  
- (define-public rust-pretty-assertions-0.6
+ (define-public rust-pretty-assertions-0.7
    (package
      (name "rust-pretty-assertions")
-     (version "0.6.1")
+     (version "0.7.2")
      (source
-       (origin
-         (method url-fetch)
-         (uri (crate-uri "pretty_assertions" version))
-         (file-name
-          (string-append name "-" version ".tar.gz"))
-         (sha256
-          (base32
-           "09yl14gnmpygiqrdlsa64lcl4w6ydjl9m8jri6kgam0v9rjf309z"))))
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pretty_assertions" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "12yris0ni87wvzhj23a5nnz7amskvahhnpikx5snhdyg09y0xaqw"))))
      (build-system cargo-build-system)
      (arguments
-      `(#:skip-build? #t
-        #:cargo-inputs
-        (("rust-ctor" ,rust-ctor-0.1)
-         ("rust-output-vt100" ,rust-output-vt100-0.1)
-         ("rust-ansi-term" ,rust-ansi-term-0.11)
-         ("rust-difference" ,rust-difference-2))))
+      `(#:cargo-inputs
+        (("rust-ansi-term" ,rust-ansi-term-0.12)
+         ("rust-ctor" ,rust-ctor-0.1)
+         ("rust-diff" ,rust-diff-0.1)
+         ("rust-output-vt100" ,rust-output-vt100-0.1))))
      (home-page "https://github.com/colin-kiegel/rust-pretty-assertions")
      (synopsis "Drop-in replacements for assert_eq! and assert_ne!")
      (description
  replacements, adding colorful diffs.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-pretty-assertions-0.6
+   (package
+     (inherit rust-pretty-assertions-0.7)
+     (name "rust-pretty-assertions")
+     (version "0.6.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pretty_assertions" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "09yl14gnmpygiqrdlsa64lcl4w6ydjl9m8jri6kgam0v9rjf309z"))))
+     (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-ctor" ,rust-ctor-0.1)
+         ("rust-output-vt100" ,rust-output-vt100-0.1)
+         ("rust-ansi-term" ,rust-ansi-term-0.11)
+         ("rust-difference" ,rust-difference-2))))))
  (define-public rust-pretty-assertions-0.4
    (package
      (inherit rust-pretty-assertions-0.6)
@@@ -37068,6 -37416,27 +37412,27 @@@ owned memory."
  functionality.")
      (license license:expat)))
  
+ (define-public rust-reduce-0.1
+   (package
+     (name "rust-reduce")
+     (version "0.1.4")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "reduce" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1mrmicr43hx3s9556zbzg0lys4nmsw0vwznd52imxhcanr3xrlhn"))))
+     (build-system cargo-build-system)
+     (home-page "https://github.com/dtolnay/reduce")
+     (synopsis "Fold an iterator without an initial value")
+     (description
+      "This package provides a way to fold an iterator without a separate
+ initial value.")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-ref-cast-1
    (package
      (name "rust-ref-cast")
@@@ -38828,7 -39197,8 +39193,7 @@@ password hashing function."
            "10k58hf367626d4akl7ifyk5qwqphfs5x6z1yay22pkyc6w7q4h1"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.46    ; or later
 -       #:tests? #f          ; not all test files included.
 +     `(#:tests? #f          ; not all test files included.
         #:cargo-inputs
         (("rust-arbitrary" ,rust-arbitrary-1)
          ("rust-arrayvec" ,rust-arrayvec-0.5)
@@@ -40410,6 -40780,36 +40775,36 @@@ sub-processes using a fork-like interfa
          ("rust-rustyline-derive" ,rust-rustyline-derive-0.3)
          ("rust-tempfile" ,rust-tempfile-3))))))
  
+ (define-public rust-rustyline-5
+   (package
+     (inherit rust-rustyline-6)
+     (name "rust-rustyline")
+     (version "5.0.6")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "rustyline" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "0dd6hwm3rqj8d17gf38ffs1lh3b8dqw45j5kxnvazmm80abv2g52"))))
+     (arguments
+      `(#:cargo-inputs
+        (("rust-cfg-if" ,rust-cfg-if-0.1)
+         ("rust-dirs" ,rust-dirs-2)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-memchr" ,rust-memchr-2)
+         ("rust-nix" ,rust-nix-0.14)
+         ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+         ("rust-unicode-width" ,rust-unicode-width-0.1)
+         ("rust-utf8parse" ,rust-utf8parse-0.1)
+         ("rust-winapi" ,rust-winapi-0.3))
+        #:cargo-development-inputs
+        (("rust-assert-matches" ,rust-assert-matches-1)
+         ("rust-env-logger" ,rust-env-logger-0.7)
+         ("rust-rustyline-derive" ,rust-rustyline-derive-0.2)
+         ("rust-tempdir" ,rust-tempdir-0.3))))))
  (define-public rust-rustyline-derive-0.3
    (package
      (name "rust-rustyline-derive")
      (description "This package provides Rustyline macros implementation in Rust.")
      (license license:expat)))
  
+ (define-public rust-rustyline-derive-0.2
+   (package
+     (inherit rust-rustyline-derive-0.3)
+     (name "rust-rustyline-derive")
+     (version "0.2.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "rustyline-derive" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1n3iw9kaq70dw1rvvma0gjwydbj0f2mvvqvrva69f5cl6yv1dnd0"))))))
  (define-public rust-ryu-1
    (package
      (name "rust-ryu")
@@@ -41246,6 -41661,28 +41656,28 @@@ Pwrite traits from the scroll crate."
  proven statistical guarantees.")
      (license license:expat)))
  
+ (define-public rust-seccomp-sys-0.1
+   (package
+     (name "rust-seccomp-sys")
+     (version "0.1.3")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "seccomp-sys" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1rkbiq1vd5d3cc4w5ql05pj1vbjqfi7zir02szwfm2khl15zgg75"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
+     (inputs `(("libseccomp" ,libseccomp)))
+     (home-page "https://github.com/polachok/seccomp-sys")
+     (synopsis "Low-level bindings to libseccomp")
+     (description "This package provides low-level bindings to libseccomp.")
+     (license license:lgpl2.1)))
  (define-public rust-section-testing-0.0
    (package
      (name "rust-section-testing")
@@@ -44642,7 -45079,8 +45074,7 @@@ algorithm.  Includes streaming compress
            "18ny6m1gnf6cwp5ax0b5hr36w6yg16z7faj76b31aq2jghhgqgcy"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.46    ; or later
 -       #:cargo-inputs
 +     `(#:cargo-inputs
         (("rust-libc" ,rust-libc-0.2)
          ("rust-winapi" ,rust-winapi-0.3))))
      (home-page "https://github.com/rust-lang/socket2")
@@@ -45903,6 -46341,24 +46335,24 @@@ struct."
  easier in Rust.")
      (license license:expat)))
  
+ (define-public rust-strum-0.19
+   (package
+     (inherit rust-strum-0.20)
+     (name "rust-strum")
+     (version "0.19.5")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "strum" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1d8i5xwkc2z7z02ibln80z1bmpjhpi9k5ckpljwj0mrvgrm2i6mq"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:tests? #f
+        #:cargo-inputs
+        (("rust-strum-macros" ,rust-strum-macros-0.19))))))
  (define-public rust-strum-0.18
    (package
      (inherit rust-strum-0.20)
       "This crate provides helpful macros for working with enums and strings.")
      (license license:expat)))
  
+ (define-public rust-strum-macros-0.19
+   (package
+     (inherit rust-strum-macros-0.20)
+     (name "rust-strum-macros")
+     (version "0.19.4")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "strum_macros" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1mgqs5x3g0d3bmr8dhalgqrzh29dwc90a06fpy0cnich52zb06z6"))))
+     (arguments
+      `(#:cargo-inputs
+        (("rust-heck" ,rust-heck-0.3)
+         ("rust-proc-macro2" ,rust-proc-macro2-1)
+         ("rust-quote" ,rust-quote-1)
+         ("rust-syn" ,rust-syn-1))
+        #:cargo-development-inputs
+        (("rust-strum" ,rust-strum-0.19))))))
  (define-public rust-strum-macros-0.18
    (package
      (inherit rust-strum-macros-0.20)
@@@ -46843,6 -47321,33 +47315,33 @@@ system or application with the relevan
  no_std compatible by default, only relying on alloc.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-syscallz-0.15
+   (package
+     (name "rust-syscallz")
+     (version "0.15.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "syscallz" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0z5yfgb6086gdvbrm8lm0i745j6d8qw653xxy3mlrzdcjk3j1skz"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-log" ,rust-log-0.4)
+         ("rust-pkg-config" ,rust-pkg-config-0.3)
+         ("rust-seccomp-sys" ,rust-seccomp-sys-0.1)
+         ("rust-strum" ,rust-strum-0.19)
+         ("rust-strum-macros" ,rust-strum-macros-0.19))))
+     (inputs `(("libseccomp" ,libseccomp)))
+     (home-page "https://github.com/kpcyrd/syscallz-rs")
+     (synopsis "Simple seccomp library for rust")
+     (description "Simple seccomp library for rust")
+     (license (list license:expat license:asl2.0))))
  (define-public rust-sysctl-0.4
    (package
      (name "rust-sysctl")
@@@ -50016,7 -50521,8 +50515,7 @@@ OpenSSL."
            "12rb390i3af7zb0z2idhaf6l2m6snypwdiwjw84rmyz4qy1i6ard"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.46
 -       #:tests? #f                      ;require postgresql
 +     `(#:tests? #f                      ;require postgresql
         #:cargo-inputs
         (("rust-async-trait" ,rust-async-trait-0.1)
          ("rust-byteorder" ,rust-byteorder-1)
@@@ -55785,10 -56291,14 +56284,14 @@@ command-line, uniformly on all platform
        (origin
          (method url-fetch)
          (uri (crate-uri "winapi-i686-pc-windows-gnu" version))
-         (file-name (string-append name "-" version ".crate"))
+         (file-name (string-append name "-" version ".tar.gz"))
          (sha256
           (base32
-           "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc"))))
+           "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (for-each delete-file (find-files "." "\\.a$"))))))
      (build-system cargo-build-system)
      (home-page "https://github.com/retep998/winapi-rs")
      (synopsis "Import libraries for the i686-pc-windows-gnu target")
@@@ -55829,10 -56339,14 +56332,14 @@@ winapi."
        (origin
          (method url-fetch)
          (uri (crate-uri "winapi-x86_64-pc-windows-gnu" version))
-         (file-name (string-append name "-" version ".crate"))
+         (file-name (string-append name "-" version ".tar.gz"))
          (sha256
           (base32
-           "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki"))))
+           "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (for-each delete-file (find-files "." "\\.a$"))))))
      (build-system cargo-build-system)
      (home-page "https://github.com/retep998/winapi-rs")
      (synopsis "Import libraries for the x86_64-pc-windows-gnu target")
@@@ -55982,7 -56496,8 +56489,8 @@@ trust these primitives."
          (base32
           "0sdxcyvda4v1v6a0k1j2v1400z3ng323k9a56gxvkq51x21dn801"))))
      (arguments
-      `(#:cargo-inputs
+      `(#:skip-build? #t
+        #:cargo-inputs
         (("rust-chrono" ,rust-chrono-0.4)
          ("rust-serde" ,rust-serde-1)
          ("rust-winapi" ,rust-winapi-0.3))
@@@ -56973,6 -57488,27 +57481,27 @@@ formatters with per-field documentatio
       "This crate provides async pipes, channels, mutexes, and more.")
      (license (list license:expat license:asl2.0))))
  
+ (define-public rust-pledge-0.3
+   (package
+     (name "rust-pledge")
+     (version "0.3.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "pledge" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1rgbnvl97ks25aanxm680687df6li6y8h3f5mvdw3806rwz8xcg2"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs (("rust-libc" ,rust-libc-0.2))))
+     (home-page "https://github.com/i80and/pledge-rs")
+     (synopsis "Rust binding to OpenBSD's pledge(2) interface")
+     (description
+      "This package provides Rust bindings to OpenBSD's pledge(2) interface.")
+     (license license:expat)))
  (define-public rust-ptree-0.3
    (package
      (name "rust-ptree")
diff --combined gnu/packages/crypto.scm
@@@ -21,6 -21,7 +21,7 @@@
  ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
  ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
  ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+ ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
    #:use-module (gnu packages boost)
    #:use-module (gnu packages check)
    #:use-module (gnu packages compression)
+   #:use-module (gnu packages cpp)
    #:use-module (gnu packages crates-io)
    #:use-module (gnu packages cryptsetup)
+   #:use-module (gnu packages curl)
    #:use-module (gnu packages documentation)
    #:use-module (gnu packages gettext)
    #:use-module (gnu packages gnupg)
@@@ -58,6 -61,7 +61,7 @@@
    #:use-module (gnu packages libbsd)
    #:use-module (gnu packages libffi)
    #:use-module (gnu packages linux)
+   #:use-module (gnu packages logging)
    #:use-module (gnu packages lsof)
    #:use-module (gnu packages man)
    #:use-module (gnu packages multiprecision)
@@@ -81,7 -85,6 +85,7 @@@
    #:use-module (guix packages)
    #:use-module (guix download)
    #:use-module (guix git-download)
 +  #:use-module (guix gexp)
    #:use-module (guix build-system cargo)
    #:use-module (guix build-system cmake)
    #:use-module (guix build-system copy)
@@@ -835,7 -838,7 +839,7 @@@ BLAKE."
  (define-public rhash
    (package
      (name "rhash")
 -    (version "1.3.9")
 +    (version "1.4.2")
      (source
       (origin
         (method url-fetch)
         (file-name (string-append "rhash-" version ".tar.gz"))
         (sha256
          (base32
 -         "1xn9fqa6rlnhsbgami45g82dlw9i1skg2sri3ydiinwak5ph1ca2"))))
 +         "0qpc1fq7gdxxl11zya1gqhl9628jjk3x60q9sna43w0yz7sh03b0"))))
      (build-system gnu-build-system)
      (arguments
 -     `(#:configure-flags
 -       (list (string-append "--prefix=" (assoc-ref %outputs "out"))
 -             ,@(let ((target (%current-target-system)))
 -                 (if target
 -                     `((string-append "--target=" ,target)
 -                       (string-append "--cc="
 -                                      (assoc-ref %build-inputs "cross-gcc")
 -                                      "/bin/" ,target "-gcc"))
 -                     '())))
 -       #:make-flags
 -       ;; The binaries in /bin need some help finding librhash.so.0.
 -       (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
 -       #:test-target "test"             ; ‘make check’ just checks the sources
 -       #:phases
 -       (modify-phases %standard-phases
 -         (replace 'configure
 -           ;; ./configure is not GNU autotools' and doesn't gracefully handle
 -           ;; unrecognized options, so we must call it manually.
 -           (lambda* (#:key configure-flags #:allow-other-keys)
 -             (apply invoke "./configure" configure-flags)))
 -         (add-before 'check 'patch-/bin/sh
 -           (lambda _
 -             (substitute* "Makefile"
 -               (("/bin/sh") (which "sh")))
 -             #t))
 -         (add-after 'install 'install-library-extras
 -           (lambda* (#:key make-flags #:allow-other-keys)
 -             (apply invoke
 -                    "make" "-C" "librhash"
 -                    "install-lib-headers" "install-so-link"
 -                    make-flags))))))
 +     (list #:configure-flags
 +           #~(list (string-append "--prefix=" #$output)
 +                   #$@(let ((target (%current-target-system)))
 +                        (if target
 +                            #~((string-append "--target=" #$target)
 +                               (string-append "--cc="
 +                                              (assoc-ref %build-inputs "cross-gcc")
 +                                              "/bin/" #$target "-gcc"))
 +                            #~())))
 +           #:make-flags
 +           ;; The binaries in /bin need some help finding librhash.so.0.
 +           #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
 +           #:test-target "test"         ; ‘make check’ just checks the sources
 +           #:phases
 +           #~(modify-phases %standard-phases
 +              (delete 'configure)
 +              (add-before 'build 'configure
 +                ;; ./configure is not GNU autotools' and doesn't gracefully handle
 +                ;; unrecognized options, so we must call it manually.
 +                (lambda* (#:key configure-flags #:allow-other-keys)
 +                  (apply invoke "./configure" configure-flags)))
 +              (add-before 'check 'patch-/bin/sh
 +                (lambda _
 +                  (substitute* "Makefile"
 +                    (("/bin/sh") (which "sh")))))
 +              (add-after 'install 'install-library-extras
 +                (lambda* (#:key make-flags #:allow-other-keys)
 +                  (apply invoke
 +                         "make" "-C" "librhash"
 +                         "install-lib-headers" "install-so-link"
 +                         make-flags))))))
      (home-page "https://sourceforge.net/projects/rhash/")
      (synopsis "Utility for computing hash sums")
      (description "RHash is a console utility for calculation and verification
@@@ -1386,3 -1389,76 +1390,76 @@@ them out.  The process will degrade gra
  encryption password can safely commit changes to the repository's
  non-encrypted files.")
      (license license:expat)))
+ (define-public cryfs
+   (package
+     (name "cryfs")
+     (version "0.11.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "https://github.com/cryfs/cryfs/releases/download/"
+              version "/cryfs-" version ".tar.xz"))
+        (sha256
+         (base32 "0dxphbj5sssm82rkkdb71algrcki16qlpzlvrjyvvm6b7x7zi0sm"))))
+     (build-system cmake-build-system)
+     (arguments
+      '(#:modules ((guix build cmake-build-system)
+                   (guix build utils)
+                   (srfi srfi-1))
+        #:configure-flags
+         ;; Note: This also disables checking for security issues.
+        `("-DCRYFS_UPDATE_CHECKS=OFF"
+          ;; This helps us use some dependencies from Guix instead of conan.
+          ;; crypto++ is still bundled: https://github.com/cryfs/cryfs/issues/369
+          ;; Googletest is also since I wasn't sure how to unbundle that.
+          ,(string-append "-DDEPENDENCY_CONFIG=" (getcwd)
+                          "/cmake-utils/DependenciesFromLocalSystem.cmake"))
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'fix-configure
+            (lambda* (#:key tests? #:allow-other-keys)
+              ;; Remove junk directory that breaks the build
+              (chdir "..") (delete-file-recursively ".circleci")
+              ;; Install documentation with Guix defaults.
+              (substitute* "doc/CMakeLists.txt"
+                (("CONFIGURATIONS Release")
+                 "CONFIGURATIONS Release RelWithDebInfo"))
+              (when tests?
+                (substitute* "CMakeLists.txt"
+                  (("option.BUILD_TESTING .build test cases. OFF.")
+                   "option(BUILD_TESTING \"build test cases\" ON)")))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (let ((tests (find-files "." "-test$")))
+                  ;; XXX: Disable failing tests. Unfortunately there are a
+                    ;; few. Some only fail in the build environment due to
+                    ;; FUSE not being available.
+                    (for-each invoke
+                              (lset-difference string-contains
+                                               tests
+                                               '("cpp-utils-test"
+                                                 "cryfs-cli-test"
+                                                 "blobstore-test"
+                                                 "fspp-test")))))
+              #t)))))
+     (native-inputs
+      `(("python" ,python-wrapper)
+        ("pkg-config" ,pkg-config)))
+     (inputs
+      `(("boost" ,boost)
+        ("curl" ,curl)
+        ("fuse" ,fuse)
+        ("range-v3" ,range-v3)
+        ("spdlog" ,spdlog)))
+     (home-page "https://www.cryfs.org/")
+     (synopsis "Encrypted FUSE filesystem for the cloud")
+     (description "CryFS encrypts your files, so you can safely store them anywhere.
+ It works well together with cloud services like Dropbox, iCloud, OneDrive and
+ others.  CryFS creates an encrypted userspace filesystem that can be mounted
+ via FUSE without root permissions.  It is similar to EncFS, but provides
+ additional security and privacy measures such as hiding file sizes and directory
+ structure.  However CryFS is not considered stable yet by the developers.")
+     (license license:lgpl3+)))
@@@ -728,8 -728,6 +728,8 @@@ Language."
                (sha256
                 (base32
                  "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
 +              (patches (search-patches "mariadb-CVE-2021-27928.patch"
 +                                       "mariadb-cmake-compat.patch"))
                (modules '((guix build utils)))
                (snippet
                 '(begin
                              (append (find-files "extra/wolfssl")
                                      (find-files "zlib")))
                    #t))))
 -    (replacement mariadb/fixed)
      (build-system cmake-build-system)
      (outputs '("out" "lib" "dev"))
      (arguments
  as a drop-in replacement of MySQL.")
      (license license:gpl2)))
  
 -(define mariadb/fixed
 -  (package
 -    (inherit mariadb)
 -    (source (origin
 -              (inherit (package-source mariadb))
 -              (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
 -
  (define-public mariadb-connector-c
    (package
      (name "mariadb-connector-c")
@@@ -1039,14 -1045,15 +1039,14 @@@ and high-availability (HA)."
  (define-public postgresql-13
    (package
      (name "postgresql")
 -    (replacement postgresql-13.3)
 -    (version "13.1")
 +    (version "13.4")
      (source (origin
                (method url-fetch)
                (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                    version "/postgresql-" version ".tar.bz2"))
                (sha256
                 (base32
 -                "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
 +                "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za"))
                (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
      (build-system gnu-build-system)
      (arguments
                                        "src/bin/psql/command.c")
                           (("/bin/sh") (which "sh")))
                         #t))
 +         (add-before 'configure 'set-socket-dir
 +           (lambda _
 +             (substitute* '("src/include/pg_config_manual.h")
 +               (("DEFAULT_PGSOCKET_DIR[^\n]*")
 +                "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))
 +             #t))
           (add-after 'build 'build-contrib
             (lambda _
               (invoke "make" "-C" "contrib")))
@@@ -1093,6 -1094,20 +1093,6 @@@ TIMESTAMP.  It also supports storage o
  pictures, sounds, or video.")
      (license (license:x11-style "file://COPYRIGHT"))))
  
 -(define-public postgresql-13.3
 -  (package
 -    (inherit postgresql-13)
 -    (name "postgresql")
 -    (version "13.3")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "https://ftp.postgresql.org/pub/source/v"
 -                                  version "/postgresql-" version ".tar.bz2"))
 -              (sha256
 -               (base32
 -                "18dliq7h2l8irffhyyhdmfwx3si515q6gds3cxdjb9n7m17lbn9w"))
 -              (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
 -
  (define-public postgresql-11
    (package
      (inherit postgresql-13)
@@@ -2936,18 -2951,20 +2936,20 @@@ Database API 2.0T."
  (define-public python-sqlalchemy
    (package
      (name "python-sqlalchemy")
-     (version "1.3.20")
+     (version "1.4.23")
      (source
       (origin
        (method url-fetch)
        (uri (pypi-uri "SQLAlchemy" version))
        (sha256
-        (base32 "18b9am7bsqc4nj3d2h5r93i002apczxfvpfpcqbd6f0385zmrwnj"))))
+        (base32 "10vm8hm8w4yfsab076ak8r4vp5v1jqdi71cky6dhha7mh5l29zvn"))))
      (build-system python-build-system)
      (native-inputs
       `(("python-cython" ,python-cython) ; for C extensions
         ("python-pytest" ,python-pytest)
         ("python-mock"   ,python-mock))) ; for tests
+     (propagated-inputs
+      `(("python-greenlet" ,python-greenlet)))
      (arguments
       `(#:phases
         (modify-phases %standard-phases
@@@ -3082,13 -3099,13 +3084,13 @@@ this library provides functions to faci
  (define-public python-alembic
    (package
      (name "python-alembic")
-     (version "1.4.3")
+     (version "1.7.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "alembic" version))
         (sha256
-         (base32 "0if2dgb088clk738p26bwk50735h6jpd2kacdgc5capv2hiz6d2k"))))
+         (base32 "1ys0a44gh544xpbzz6r5xvz3msim74f9qklyfnw0bhn9vk9n9adf"))))
      (build-system python-build-system)
      (arguments
       '(#:phases (modify-phases %standard-phases
         ("python-pytest-cov" ,python-pytest-cov)))
      (propagated-inputs
       `(("python-dateutil" ,python-dateutil)
+        ("python-importlib-resources" ,python-importlib-resources) ;Python < 3.9
         ("python-sqlalchemy" ,python-sqlalchemy)
         ("python-mako" ,python-mako)
         ("python-editor" ,python-editor)))
  SQLAlchemy Database Toolkit for Python.")
      (license license:expat)))
  
- (define-public python2-alembic
-   (package-with-python2 python-alembic))
  (define-public python-pickleshare
    (package
      (name "python-pickleshare")
@@@ -3154,7 -3169,7 +3154,7 @@@ PickleShare."
  (define-public python-apsw
    (package
      (name "python-apsw")
 -    (version "3.31.1-r1")
 +    (version "3.36.0-r1")
      (source
        (origin
          (method url-fetch)
                              "/download/" version "/apsw-" version ".zip"))
          (sha256
            (base32
 -           "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
 +           "0w8q73147hv77dlpqrx6h1gx03acc8xqhvdpfp6vkffdm0wmqd8p"))))
      (build-system python-build-system)
      (native-inputs
       `(("unzip" ,unzip)))
@@@ -3301,20 -3316,31 +3301,31 @@@ designed to be easy and intuitive to us
  (define-public python-sadisplay
    (package
      (name "python-sadisplay")
-     (version "0.4.8")
+     (version "0.4.9")
      (source
        (origin
          (method url-fetch)
          (uri (pypi-uri "sadisplay" version))
        (sha256
          (base32
-           "01d9lxhmgpb68gy8rd6zj6fcwp84n2qq210n1qsk3qbsir79bzh4"))))
+           "15jxwgla3q4xsp6rw8inqaiy1kdzc8l2cixj8amqcf0ji47icrxg"))))
      (build-system python-build-system)
+     (arguments
+      '(#:phases (modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (if tests?
+                           (begin
+                             (setenv "PYTHONPATH"
+                                     (string-append ".:" (or (getenv "PYTHONPATH")
+                                                            "")))
+                             (invoke "pytest" "-vv"))
+                           (format #t "test suite not run~%")))))))
      (propagated-inputs
        `(("python-sqlalchemy" ,python-sqlalchemy)))
      (native-inputs
       ;; For tests.
-       `(("python-nose" ,python-nose)))
+       `(("python-pytest" ,python-pytest)))
      (home-page "https://bitbucket.org/estin/sadisplay")
      (synopsis "SQLAlchemy schema displayer")
      (description "This package provides a program to build Entity
@@@ -3609,13 -3635,13 +3620,13 @@@ provides support for parsing, splittin
  (define-public python-sql
    (package
      (name "python-sql")
-     (version "1.0.0")
+     (version "1.3.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "python-sql" version))
         (sha256
-         (base32 "05ni936y0ia9xmryl7mlhbj9i80nnvq1bi4zxhb96rv7yvpb3fqb"))))
+         (base32 "0xnimfzlxj1ddrb5xj3s4gaii278a0gpxrvwmdmrdxgjfdi3lq4x"))))
      (build-system python-build-system)
      (home-page "https://python-sql.tryton.org/")
      (synopsis "Library to write SQL queries in a pythonic way")
diff --combined gnu/packages/django.scm
@@@ -7,7 -7,6 +7,7 @@@
  ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
  ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
  ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -34,6 -33,7 +34,7 @@@
    #:use-module (gnu packages base)
    #:use-module (gnu packages databases)
    #:use-module (gnu packages check)
+   #:use-module (gnu packages finance)
    #:use-module (gnu packages geo)
    #:use-module (gnu packages openldap)
    #:use-module (gnu packages python)
@@@ -64,7 -64,8 +65,7 @@@
               ;; The test-suite tests timezone-dependent functions, thus tzdata
               ;; needs to be available.
               (setenv "TZDIR"
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))
 +                     (search-input-directory inputs "share/zoneinfo"))
  
               ;; Disable test for incorrect timezone: it only raises the
               ;; expected error when /usr/share/zoneinfo exists, even though
               (substitute* "tests/settings_tests/tests.py"
                 ((".*def test_incorrect_timezone.*" all)
                  (string-append "    @unittest.skipIf(True, 'Disabled by Guix')\n"
 -                               all)))
 -
 -             ;; Preserve the PYTHONPATH created by Guix when running the tests.
 -             (substitute* "tests/admin_scripts/tests.py"
 -               (("python_path = \\[")
 -                (string-append "python_path = ['"
 -                               (string-join
 -                                (string-split (getenv "PYTHONPATH") #\:)
 -                                "','")
 -                               "', ")))
 -
 -             #t))
 +                               all)))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (if tests?
                   (with-directory-excursion "tests"
 -                   (setenv "PYTHONPATH"
 -                           (string-append "..:" (getenv "PYTHONPATH")))
 +                   ;; Tests expect PYTHONPATH to contain the root directory.
 +                   (setenv "PYTHONPATH" "..")
                     (invoke "python" "runtests.py"
                             ;; By default tests run in parallel, which may cause
                             ;; various race conditions.  Run sequentially for
@@@ -183,6 -195,42 +184,42 @@@ to the @dfn{don't repeat yourself} (DRY
  commands, additional database fields and admin extensions.")
      (license license:expat)))
  
+ (define-public python-django-localflavor
+   (package
+     (name "python-django-localflavor")
+     (version "3.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "django-localflavor" version))
+        (sha256
+         (base32 "0i1s0ijfd9rv2cp5x174jcyjpwn7fyg7s1wpbvlwm96bpdvs6bxc"))))
+     (build-system python-build-system)
+     (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+              (when tests?
+                (add-installed-pythonpath inputs outputs)
+                (setenv "PYTHONPATH"
+                        (string-append ".:"
+                                       (getenv "PYTHONPATH")))
+                (invoke "invoke" "test")))))))
+     (native-inputs
+      `(("python-coverage" ,python-coverage)
+        ("python-invoke" ,python-invoke)
+        ("python-pytest-django" ,python-pytest-django)
+        ("which" ,which)))
+     (propagated-inputs
+      `(("python-django" ,python-django)
+        ("python-stdnum" ,python-stdnum)))
+     (home-page "https://django-localflavor.readthedocs.io/en/latest/")
+     (synopsis "Country-specific Django helpers")
+     (description "Django-LocalFlavor is a collection of assorted pieces of code
+ that are useful for particular countries or cultures.")
+     (license license:bsd-3)))
  (define-public python-django-simple-math-captcha
    (package
      (name "python-django-simple-math-captcha")
@@@ -324,26 -372,31 +361,26 @@@ size and quality."
           (replace 'check
             (lambda* (#:key tests? inputs outputs #:allow-other-keys)
               (if tests?
 -                 (begin
 -                   (add-installed-pythonpath inputs outputs)
 -                   (setenv "PYTHONPATH"
 -                           (string-append ".:" ;for pytest_django_test
 -                                          (getenv "PYTHONPATH")))
 -                   (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
 -                   (setenv "DJANGO_SETTINGS_MODULE"
 -                           "pytest_django_test.settings_sqlite_file")
 -                   (invoke "pytest" "-vv" "-k"
 -                           ;; FIXME: these tests fail to locate Django templates ...
 -                           (string-append "not test_django_not_loaded_without_settings"
 -                                          " and not test_settings"
 -                                          ;; ... and this does not discover
 -                                          ;; 'pytest_django_test'.
 -                                          " and not test_urls_cache_is_cleared")))
 -                 (format #t "test suite not run~%"))
 -             #t)))))
 +               (begin
 +                 (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
 +                 (setenv "DJANGO_SETTINGS_MODULE"
 +                         "pytest_django_test.settings_sqlite_file")
 +                 (invoke "python" "-m" "pytest" "-vv" "-k"
 +                         ;; FIXME: these tests fail to locate Django templates ...
 +                         (string-append "not test_django_not_loaded_without_settings"
 +                                        " and not test_settings"
 +                                        ;; ... and this does not discover
 +                                        ;; 'pytest_django_test'.
 +                                        " and not test_urls_cache_is_cleared")))
 +               (format #t "test suite not run~%")))))))
      (native-inputs
       `(("python-django" ,python-django)
         ("python-setuptools-scm" ,python-setuptools-scm)
         ;; For tests.
         ("python-pytest-xdist" ,python-pytest-xdist-next)))
      (propagated-inputs
 -     `(("python-pytest" ,python-pytest-6)))
 -    (home-page "https://pytest-django.readthedocs.io/")
 +     `(("python-pytest" ,python-pytest)))
 +    (home-page "https://pytest-django.readthedocs.org/")
      (synopsis "Django plugin for py.test")
      (description "Pytest-django is a plugin for py.test that provides a set of
  useful tools for testing Django applications and projects.")
@@@ -704,6 -757,9 +741,6 @@@ project aims to bulk update given objec
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH"
 -                     (string-append "./build/lib:"
 -                                    (getenv "PYTHONPATH")))
               (invoke "coverage" "run" "--source" "contact_form"
                       "runtests.py"))))))
      (native-inputs
@@@ -762,9 -818,14 +799,9 @@@ entries, photos, book chapters, or anyt
                  (which "env")))))
           (replace 'check
             (lambda*(#:key tests? #:allow-other-keys)
 -             (or
 -              (not tests?)
 -              (begin
 -                (setenv "PYTHONPATH"
 -                        (string-append (getcwd) ":"
 -                                       (getenv "PYTHONPATH")))
 -                (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
 -                (invoke "django-admin" "test" "tests"))))))))
 +             (when tests?
 +               (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
 +               (invoke "django-admin" "test" "tests")))))))
      (native-inputs
       `(("python-django" ,python-django)))
      (propagated-inputs
@@@ -891,8 -952,10 +928,8 @@@ using Python multiprocessing."
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH" (string-append "./test_project:"
 -                                                          "./build/lib:.:"
 -                                                          (getenv "PYTHONPATH")))
 -                      (invoke "django-admin.py" "test" "--settings=settings"))))))
 +                      (invoke "python" "django-admin.py"
 +                              "test" "--settings=settings"))))))
      (native-inputs
       `(("python-django" ,python-django)))
      (home-page "https://github.com/jazzband/django-sortedm2m")
@@@ -918,8 -981,10 +955,8 @@@ the order of added relations."
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH" (string-append ".:"
 -                                                          (getenv "PYTHONPATH")))
                        (setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
 -                      (invoke "django-admin.py" "test" "-v2"))))))
 +                      (invoke "python" "django-admin.py" "test" "-v2"))))))
      (native-inputs
       `(("python-django" ,python-django)))
      (home-page "https://github.com/django-compressor/django-appconf")
@@@ -951,7 -1016,9 +988,7 @@@ name is purely coincidental."
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./tests/test_project:./build/lib:"
 -                                             (getenv "PYTHONPATH")))
 +                      (setenv "PYTHONPATH" "./tests/test_project")
                        (setenv "DJANGO_SETTINGS_MODULE" "project.settings")
                        (invoke "pytest" "-vv"))))))
      (native-inputs
@@@ -1268,11 -1335,15 +1305,11 @@@ to ElasticSearch."
                        ;; Do not depend on compatibility package for old
                        ;; Python versions.
                        (substitute* "requirements.txt"
 -                        (("enum-compat") ""))
 -                      #t))
 +                        (("enum-compat") ""))))
                    (replace 'check
                      (lambda* (#:key tests? #:allow-other-keys)
                        (if tests?
                            (begin
 -                            (setenv "PYTHONPATH"
 -                                    (string-append "./build/lib:.:"
 -                                                   (getenv "PYTHONPATH")))
                              (setenv "DJANGO_SETTINGS_MODULE"
                                      "test_project.settings")
                              (invoke "pytest" "-vv" "--doctest-modules"
diff --combined gnu/packages/docbook.scm
@@@ -1,12 -1,12 +1,13 @@@
  ;;; GNU Guix --- Functional package management for GNU
 -;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2014, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
  ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
  ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
  ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
 +;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+ ;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
  
  (define-module (gnu packages docbook)
    #:use-module (gnu packages)
+   #:use-module (gnu packages bash)
    #:use-module (gnu packages compression)
    #:use-module (gnu packages imagemagick)
    #:use-module (gnu packages inkscape)
    #:use-module (gnu packages tex)
+   #:use-module (gnu packages texinfo)
    #:use-module (gnu packages perl)
    #:use-module (gnu packages python)
    #:use-module (gnu packages base)
 +  #:use-module (gnu packages web-browsers)
    #:use-module (gnu packages xml)
-   #:use-module (guix licenses)
+   #:use-module ((guix licenses) #:prefix license:)
    #:use-module (guix packages)
    #:use-module (guix download)
    #:use-module ((guix build utils) #:select (alist-replace))
@@@ -81,7 -82,7 +84,7 @@@
       "DocBook is general purpose XML and SGML document type particularly well
  suited to books and papers about computer hardware and software (though it is
  by no means limited to these applications.)  This package provides XML DTDs.")
-     (license (x11-style "" "See file headers."))))
+     (license (license:x11-style "" "See file headers."))))
  
  (define-public docbook-xml
    (package
  (define-public docbook-xsl
    (package
      (name "docbook-xsl")
 -    (version "1.79.1")
 +    (version "1.79.2")
      (source (origin
                (method url-fetch)
 -              (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/"
 -                                  version "/docbook-xsl-" version ".tar.bz2"))
 -              (patches (search-patches "docbook-xsl-nonrecursive-string-subst.patch"))
 +              (uri (string-append "https://github.com/docbook/xslt10-stylesheets"
 +                                  "/releases/download/release%2F" version
 +                                  "/docbook-xsl-" version ".tar.bz2"))
 +              (patches (search-patches "docbook-xsl-support-old-url.patch"
 +                                       "docbook-xsl-nonrecursive-string-subst.patch"))
                (sha256
                 (base32
 -                "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"))
 +                "0wd33z41kdsybyx3ay21w6bdlmgpd9kyn3mr5y520lsf8km28r9i"))
                (modules '((guix build utils)))
                (snippet
                 '(begin
                    #t))))
      (build-system trivial-build-system)
      (arguments
 -     `(#:builder (let ((name-version (string-append ,name "-" ,version)))
 +     `(#:builder (begin
                     (use-modules (guix build utils))
  
 +                   (define name-version
 +                     (string-append ,name "-" ,version))
 +
                     (let* ((bzip2  (assoc-ref %build-inputs "bzip2"))
                            (xz     (assoc-ref %build-inputs "xz"))
                            (tar    (assoc-ref %build-inputs "tar"))
      (synopsis "DocBook XSL style sheets for document authoring")
      (description
       "This package provides XSL style sheets for DocBook.")
-     (license (x11-style "" "See 'COPYING' file."))))
+     (license (license:x11-style "" "See 'COPYING' file."))))
  
  (define-public docbook-dsssl
    (package
      (home-page "https://docbook.org/")
      (synopsis "DSSSL style sheets for DocBook")
      (description "This package provides DSSSL style sheets for DocBook.")
-     (license (non-copyleft "file://README"))))
+     (license (license:non-copyleft "file://README"))))
  
  ;;; Private variable, used as the 'doc' output of the docbook-dsssl package.
  (define docbook-dsssl-doc
      (home-page "https://docbook.org/")
      (synopsis "DocBook DSSSL style sheets documentation")
      (description "Documentation for the DocBook DSSSL style sheets.")
-     (license (non-copyleft "file://doc/LEGALNOTICE.htm"))))
+     (license (license:non-copyleft "file://doc/LEGALNOTICE.htm"))))
  
  (define-public docbook-sgml
    (package
      (home-page "https://docbook.org")
      (synopsis "DocBook SGML style sheets for document authoring")
      (description "This package provides SGML style sheets for DocBook.")
-     (license (x11-style "" "See file headers."))))
+     (license (license:x11-style "" "See file headers."))))
  
  (define-public docbook-sgml-3.1
    (package
      (synopsis "ISO 8879 character entities")
      (description "ISO 8879 character entities that are typically used in
  the in DocBook SGML DTDs.")
-     (license (x11-style "" "See file headers."))))
+     (license (license:x11-style "" "See file headers."))))
  
  (define-public dblatex
    (package
      (name "dblatex")
 -    (version "0.3.11")
 +    (version "0.3.12")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://sourceforge/dblatex/dblatex/"
 -                                  "dblatex-" version "/dblatex-"
 +                                  "dblatex-" version "/dblatex3-"
                                    version ".tar.bz2"))
                (sha256
                 (base32
 -                "0rp1bc2lgisigscq1i7zxfd2qdaxxxld6khbcxss4pq7fpi9fzkv"))))
 +                "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n"))))
      (build-system python-build-system)
      ;; TODO: Add xfig/transfig for fig2dev utility
      (inputs
 -     `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
 +     `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                          texlive-latex-anysize
                                          texlive-latex-appendix
 +                                        texlive-latex-bookmark
                                          texlive-latex-changebar
                                          texlive-latex-colortbl
 -                                        texlive-latex-eepic
 -                                        texlive-latex-eso-pic
                                          texlive-latex-fancybox
                                          texlive-latex-fancyhdr
                                          texlive-latex-fancyvrb
                                          texlive-latex-float
                                          texlive-latex-footmisc
 -                                        texlive-latex-hyperref
 +                                        texlive-hyperref
                                          texlive-latex-jknapltx
                                          texlive-latex-listings
                                          texlive-latex-multirow
 -                                        texlive-latex-oberdiek
                                          texlive-latex-overpic
                                          texlive-latex-pdfpages
 +                                        texlive-latex-refcount
                                          texlive-latex-subfigure
                                          texlive-latex-titlesec
 -                                        texlive-latex-url
 -                                        texlive-latex-wasysym
 +                                        texlive-wasysym
  
 -                                        texlive-fonts-ec
                                          texlive-fonts-rsfs
 -                                        texlive-fonts-stmaryrd
 +                                        texlive-stmaryrd
  
 -                                        texlive-generic-ifxetex)))
 +                                        texlive-generic-iftex)))
         ("imagemagick" ,imagemagick)     ;for convert
         ("inkscape" ,inkscape)           ;for svg conversion
         ("docbook" ,docbook-xml)
         ("libxslt" ,libxslt)))           ;for xsltproc
      (arguments
 -     `(#:python ,python-2               ;'print' syntax
 -       ;; Using setuptools causes an invalid "package_base" path in
 +     `(;; Using setuptools causes an invalid "package_base" path in
         ;; out/bin/.dblatex-real due to a missing leading '/'.  This is caused
         ;; by dblatex's setup.py stripping the root path when creating the
         ;; script.  (dblatex's setup.py still uses distutils and thus has to
@@@ -466,7 -466,7 +469,7 @@@ to DVI, PostScript or PDF by translatin
  process.  MathML 2.0 markups are supported too.  It started as a clone of
  DB2LaTeX.")
      ;; lib/contrib/which is under an X11 license
-     (license gpl2+)))
+     (license license:gpl2+)))
  
  ;; This is a variant of the 'dblatex' package that is not updated often.  It
  ;; is intended to be used as a native-input at build-time only, e.g. by
       (inputs (alist-replace "imagemagick" `(,imagemagick/stable)
                              (package-inputs dblatex))))))
  
-     (license gpl2+)))
 +(define-public docbook-utils
 +  (package
 +    (name "docbook-utils")
 +    (version "0.6.14")
 +    (source (origin
 +              (method url-fetch)
 +              ;; The original sources are not accessible anymore.
 +              (uri (string-append "http://deb.debian.org/debian/pool/main/"
 +                                  "d/docbook-utils/docbook-utils_"
 +                                  version ".orig.tar.gz"))
 +              (sha256
 +               (base32
 +                "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))))
 +    (build-system gnu-build-system)
 +    (arguments
 +     `(#:phases (modify-phases %standard-phases
 +                  (add-after 'unpack 'patch-build-system
 +                    (lambda _
 +                      (substitute* (find-files "." "\\.in$")
 +                        ;; Do not hard-code SGML_CATALOG_FILES.
 +                        ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
 +                        ;; Use OpenSP and OpenJade.
 +                        (("\\bjade\\b")
 +                         "openjade")
 +                        (("\\bnsgmls\\b")
 +                         "onsgmls"))
 +                      #t))
 +                  (add-after 'unpack 'patch-jw.in
 +                    ;; Do not override the SGML_CATALOG_FILES environment
 +                    ;; variable.
 +                    (lambda _
 +                      (substitute* "bin/jw.in"
 +                        ((".*SGML_CATALOG_FILES=`find.*")
 +                         "")
 +                        (("SGML_CATALOG_FILES=`echo.*")
 +                         ":\n")
 +                        (("SGML_CATALOG_FILES=\"\"")
 +                         ":")
 +                        (("\\bwhich\\b")
 +                         "command -v"))
 +                      #t))
 +                  (add-after 'unpack 'patch-txt-backend
 +                    (lambda _
 +                      ;; Locate lynx, links or w3m from the PATH, not from
 +                      ;; /usr/bin.
 +                      (substitute* "backends/txt"
 +                        (("CONVERT=/usr/bin/")
 +                         "CONVERT=")
 +                        (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command)
 +                         (string-append "command -v " command " > /dev/null")))
 +                      #t)))))
 +    ;; Propagated for convenience.  All these tools are used at run time to
 +    ;; provide the complete functionality of the docbook-utils commands.
 +    (propagated-inputs
 +     `(("texlive-jadetex" ,texlive-jadetex)
 +       ("docbook-sgml" ,docbook-sgml-3.1)
 +       ("docbook-dsssl" ,docbook-dsssl)
 +       ("openjade" ,openjade)
 +       ("opensp" ,opensp)
 +       ("lynx" ,lynx)
 +       ("perl-sgmls" ,perl-sgmls)))
 +    (home-page "https://packages.debian.org/sid/docbook-utils")
 +    (synopsis "DocBook converter to other formats")
 +    (description "The docbook-utils package is a collection of utilities
 +intended to ease the use of SGML and XML.
 +@table @command
 +@item jw
 +Convert a SGML DocBook file to other formats such as Hyper Text Markup
 +Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable
 +Document Format (PDF), TeX, Texinfo or plain text (txt).  It can be used
 +more conveniently via the following wrappers:
 +@itemx docbook2dvi Convert a SGML DocBook file to the DVI format.
 +@itemx docbook2html Convert a SGML DocBook file to an HTML document.
 +@itemx docbook2man Convert a SGML DocBook file a man page.
 +@itemx docbook2pdf Convert a SGML DocBook file to a PDF document.
 +@itemx docbook2ps Convert a SGML DocBook file to a PS document.
 +@itemx docbook2rtf Convert a SGML DocBook file to a RTF document.
 +@itemx docbook2tex Convert a SGML DocBook file to a TeX document.
 +@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document.
 +@itemx docbook2txt Convert a SGML DocBook file to a plain text document.
 +@item sgmldiff
 +Detect the differences in markup between two SGML files.
 +@end table")
++    (license license:gpl2+)))
++
+ (define-public docbook2x
+   (package
+     (name "docbook2x")
+     (version "0.8.8")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "mirror://sourceforge/docbook2x/docbook2x/"
+                                   version "/docbook2X-" version ".tar.gz"))
+               (sha256
+                (base32
+                 "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+     (build-system gnu-build-system)
+     (inputs
+      `(("bash-minimal" ,bash-minimal)
+        ("docbook-xml" ,docbook-xml)
+        ("perl" ,perl)
+        ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
+        ("perl-xml-parser" ,perl-xml-parser)
+        ("perl-xml-sax" ,perl-xml-sax)
+        ("perl-xml-sax-base" ,perl-xml-sax-base)
+        ("texinfo" ,texinfo)
+        ("xsltproc" ,libxslt)))
+     (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+          (add-after 'configure 'patch-sources
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              ;; Fix failed substitution in config.pl
+              (substitute* "perl/config.pl"
+                (("\\$\\{prefix\\}")
+                 (assoc-ref outputs "out")))
+              ;; Fix a failing test (maybe it worked with old texinfo?)
+              (substitute* "test/complete-manuals/at1.xml"
+                (("<bridgehead>")
+                 "<bridgehead renderas=\"sect2\">"))
+              ;; Patch all the tests use DocBook 4.5
+              (substitute* (find-files "test" "\\.xml$")
+                (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
+                 "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
+                (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
+                 "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
+              ;; Set XML catalogs for tests to pass
+              (setenv "XML_CATALOG_FILES"
+                      (string-append (assoc-ref inputs "docbook-xml")
+                                     "/xml/dtd/docbook/catalog.xml"))))
+          (add-after 'install 'wrap-programs
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (programs
+                      (map (lambda (p)
+                             (string-append out "/bin/" p))
+                           '("db2x_manxml" "db2x_texixml" "db2x_xsltproc"
+                             "docbook2man" "docbook2texi")))
+                     (perl5lib
+                      (map (lambda (i)
+                             (string-append (assoc-ref inputs i)
+                                            "/lib/perl5/site_perl"))
+                           '("perl-xml-namespacesupport"
+                             "perl-xml-parser"
+                             "perl-xml-sax"
+                             "perl-xml-sax-base")))
+                     (xml-catalog-files
+                      (list (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/catalog.xml"))))
+                (map (lambda (program)
+                       (wrap-program program
+                         `("PERL5LIB" ":" prefix
+                           ,perl5lib)
+                         `("XML_CATALOG_FILES" " " prefix
+                           ,xml-catalog-files)))
+                     programs))))
+          (add-after 'install 'create-symlinks
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out")))
+                ;; Create db2x_* symlinks to satisfy some configure scripts
+                ;; which use these names to differentiate from an older
+                ;; docbook2man script provided by docbook-utils.
+                (map (lambda (prog)
+                       (symlink prog (string-append out "/bin/db2x_" prog)))
+                     '("docbook2man" "docbook2texi"))))))))
+     (home-page "http://docbook2x.sourceforge.net")
+     (synopsis "Convert DocBook to man page and Texinfo format")
+     (description
+      "docbook2X is a software package that converts DocBook documents into the
+ traditional Unix man page format and the GNU Texinfo format.  Notable features
+ include table support for man pages, internationalization support, and easy
+ customization of the output using XSLT.")
+     (license license:expat)))
diff --combined gnu/packages/ebook.scm
@@@ -327,7 -327,7 +327,7 @@@ sip-include-dirs = [\"" pyqt "/share/si
                    ;; rather than create ..calibre-real-real-s.  For more
                    ;; information see: https://issues.guix.gnu.org/43249.
                    (find-files "." (lambda (file stat)
 -                                    (not (wrapper? file)))))))
 +                                    (not (wrapped-program? file)))))))
               #t)))))
      (home-page "https://calibre-ebook.com/")
      (synopsis "E-book library management software")
@@@ -477,7 -477,7 +477,7 @@@ following formats
  (define-public cozy
    (package
      (name "cozy")
-     (version "1.0.3")
+     (version "1.1.2")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0m0xiqpb87pwr3fhy0a4qxg67yjhwchcxj3x2anyy0li4inryxag"))))
+         (base32 "0hifzzhhf0ww6iar9gswjfndy3i54s6jc41zaazlx4scc7r6fhs0"))))
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
           (add-after 'unpack 'patch-desktop-file
             (lambda _
               (substitute* "data/com.github.geigi.cozy.desktop"
-                (("Exec=com.github.geigi.cozy") "Exec=cozy"))
-              #t))
+                (("Exec=com.github.geigi.cozy") "Exec=cozy"))))
           (add-after 'install 'patch-executable-name
             (lambda* (#:key outputs #:allow-other-keys)
               (with-directory-excursion
                   (string-append (assoc-ref outputs "out") "/bin")
-                (rename-file "com.github.geigi.cozy" "cozy"))
-              #t))
+                (rename-file "com.github.geigi.cozy" "cozy"))))
           (add-after 'wrap 'wrap-libs
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out               (assoc-ref outputs "out"))
                      (libmagic-path     (string-append
                                          (assoc-ref %build-inputs "file")
                                          "/lib"))
 -                    (python-path     (getenv "PYTHONPATH")))
 +                    (python-path     (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/cozy")
                   `("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
-                  `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib))))
-              #t)))))
 -                 `("PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
++                 `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
      (native-inputs
       `(("desktop-file-utils" ,desktop-file-utils)
         ("gettext" ,gettext-minimal)
         ("gst-plugins-good" ,gst-plugins-good)
         ("gst-plugins-ugly" ,gst-plugins-ugly)
         ("gtk+" ,gtk+)
+        ("libdazzle" ,libdazzle)
         ("libgee" ,libgee)
         ("libhandy" ,libhandy)
         ("python-distro" ,python-distro)
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "CPATH"
 -                     (string-append (assoc-ref inputs "sdl-mixer")
 -                                    "/include/SDL:"
 -                                    (or (getenv "CPATH") "")))
 -             #t)))))
 +                     (string-append
 +                      (search-input-directory inputs "include/SDL")
 +                      ":" (or (getenv "CPATH") ""))))))))
      (inputs
       `(("gtk+" ,gtk+-2)
         ("librsvg" ,librsvg)
@@@ -156,7 -157,8 +156,7 @@@ of categories with some of the activiti
           (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 &"))
 +             (system "Xvfb :1 &")
               (setenv "DISPLAY" ":1")
               ;; The test suite wants to write to /homeless-shelter
               (setenv "HOME" (getcwd))
@@@ -496,7 -498,8 +496,7 @@@ specialized device."
                 #t)))
           (add-after 'install 'create-executable
             (lambda* (#:key outputs inputs #:allow-other-keys)
 -             (let* ((python (string-append (assoc-ref inputs "python")
 -                                           "/bin/python"))
 +             (let* ((python (search-input-file inputs "/bin/python"))
                      (out (assoc-ref outputs "out"))
                      (bin (string-append out "/bin"))
                      (executable (string-append bin "/childsplay")))
@@@ -850,8 -853,8 +850,8 @@@ stored and user can review his performa
                                      (string-prefix? "python-" label)))
                                   inputs)))
                     (qtwebengineprocess
 -                    (string-append (assoc-ref inputs "qtwebengine")
 -                                   "/lib/qt5/libexec/QtWebEngineProcess")))
 +                    (search-input-file inputs
 +                                       "lib/qt5/libexec/QtWebEngineProcess")))
                 ;; The program fails to find the QtWebEngineProcess program, so
                 ;; we set QTWEBENGINEPROCESS_PATH to help it.  PYTHONPATH is
                 ;; wrapped to avoid declaring Python libraries as propagated
                               `("PATH" prefix (,(string-append
                                                  (assoc-ref inputs "mpv")
                                                  "/bin")))
 -                             `("PYTHONPATH" = ,site-packages)))
 +                             `("GUIX_PYTHONPATH" = ,site-packages)))
                           (find-files bin ".")))
               #t)))))
      (native-inputs
@@@ -930,10 -933,9 +930,10 @@@ endless.  For example
         (modify-phases %standard-phases
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
 -             (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
 -                                            "/include/SDL:"
 -                                            (or (getenv "CPATH") "")))))
 +             (setenv "CPATH"
 +                     (string-append
 +                      (search-input-directory inputs "/include/SDL")
 +                      ":" (or (getenv "CPATH") "")))))
           (add-after 'unpack 'fix-andika-font-path
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/t4k_sdl.c"
@@@ -982,10 -984,10 +982,10 @@@ TuxMath and TuxType."
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "CPATH"
 -                     (string-append (assoc-ref inputs "sdl")
 -                                    "/include/SDL:"
 -                                    (or (getenv "CPATH") "")))
 -             #t))
 +                     (string-append
 +                      (search-input-directory inputs "/include/SDL")
 +                      ":"
 +                      (or (getenv "CPATH") "")))))
           (add-after 'install 'install-desktop-file
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
@@@ -1017,6 -1019,66 +1017,66 @@@ factoring numbers and simplifying fract
  floating through space.")
      (license license:gpl3+)))
  
+ (define-public libeb
+   (package
+     (name "libeb")
+     (version "4.4.3")
+     (source
+      (origin
+        (method url-fetch)
+        (uri
+         (string-append "ftp://ftp.sra.co.jp/pub/misc/eb/eb-" version ".tar.bz2"))
+        (sha256
+         (base32
+          "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb"))))
+     (build-system gnu-build-system)
+     (native-inputs ; Required for building docs
+      `(("perl" ,perl)))
+     (inputs
+      `(("zlib" ,zlib)))
+     (synopsis "C library for accessing Japanese CD-ROM books")
+     (description "The EB library is a library for accessing CD-ROM
+ books, which are a common way to distribute electronic dictionaries in
+ Japan.  It supports the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING
+ formats.")
+     ;; FIXME: I cannot find a real home page
+     (home-page "https://sra.co.jp/")
+     (license license:bsd-3)))
+ (define-public qolibri
+   (package
+     (name "qolibri")
+     (version "2.1.4")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url"https://github.com/ludios/qolibri")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "066y7jcq9vg6hnvn7qxckzhd1qkgfzpzhw69nw5psm43qbaca8lg"))))
+     (build-system qt-build-system)
+     (arguments
+      '(#:tests? #f)) ; no test target
+     (native-inputs
+      `(("qttools", qttools)))
+     (inputs
+      `(("libeb" ,libeb)
+        ("qtbase" ,qtbase-5)
+        ("qtmultimedia" ,qtmultimedia)
+        ("qtquickcontrols2" ,qtquickcontrols2)
+        ("qtdeclarative" ,qtdeclarative)
+        ("qtwebchannel" ,qtwebchannel)
+        ("qtwebengine" ,qtwebengine)
+        ("zlib" ,zlib)))
+     (synopsis "EPWING dictionary reader")
+     (description "qolibri is a dictionary viewer for the EPWING dictionary
+ format.  Most monolingual Japanese dictionaries can only be found in the
+ EPWING format.")
+     (home-page "https://github.com/ludios/qolibri")
+     (license license:gpl2)))
  (define-public mdk
    (package
      (name "mdk")
@@@ -1,6 -1,6 +1,6 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
 -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Alex Kost <alezost@gmail.com>
  ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
@@@ -535,7 -535,8 +535,7 @@@ system."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "hypb.el"
                 (("/bin/domainname")
 -                (string-append (assoc-ref inputs "inetutils")
 -                               "/bin/dnsdomainname")))
 +                (search-input-file inputs "bin/dnsdomainname")))
               (substitute* "hyperbole.el"
                 (("\\(hyperb:check-dir-user\\)") ""))))
           (add-after 'install 'install-images
@@@ -743,12 -744,14 +743,12 @@@ on stdout instead of using a socket as 
                   (make-file-writable "libgit.el")
                   (emacs-substitute-variables "libgit.el"
                     ("libgit--module-file"
 -                    (string-append (emacs:elpa-directory out) "/libegit2.so")))
 -                 #t)))
 +                    (string-append (emacs:elpa-directory out) "/libegit2.so"))))))
             (add-before 'install 'prepare-for-install
               (lambda _
 -               (let ((s (string-append "../" ,name "-" ,version "-checkout")))
 +               (let ((s "../source"))
                   (copy-file "libegit2.so" (string-append s "/libegit2.so"))
 -                 (chdir s)
 -                 #t)))
 +                 (chdir s))))
             (replace 'install
               (lambda* (#:key outputs #:allow-other-keys)
                 (let ((install (assoc-ref emacs:%standard-phases 'install)))
@@@ -1453,7 -1456,7 +1453,7 @@@ replacement."
                   ((f1 f2 ...) (dirname f1))
                   (_ "")))
  
 -             (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
 +             (let ((sh (search-input-file inputs "/bin/sh")))
                 (define emacs-prefix? (cut string-prefix? "emacs-" <>))
  
                 (setenv "SHELL" "sh")
@@@ -2117,14 -2120,14 +2117,14 @@@ incrementally confined in Isearch manne
  (define emacs-emms-print-metadata
    (package
      (name "emacs-emms-print-metadata")
-     (version "7.6")
+     (version "7.7")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "https://elpa.gnu.org/packages/"
                             "emms-" version ".tar"))
         (sha256
-         (base32 "03cp6mr0kxy41dg4ri5ymbzpkw7bd8zg7hx0a2rb4axiss5qmx7i"))))
+         (base32 "0n9nx4wgjxkr8nsxcq8svg0x0qkqj7bsd2j0ihy4jzj29xmyxl0h"))))
      (build-system gnu-build-system)
      (arguments
       `(#:make-flags '("emms-print-metadata")
@@@ -2632,7 -2635,7 +2632,7 @@@ as a library for other Emacs packages."
             (lambda* (#:key inputs #:allow-other-keys)
               (emacs-substitute-variables "preview.el"
                 ("preview-gs-command"
 -                (string-append (assoc-ref inputs "ghostscript") "/bin/gs")))
 +                (search-input-file inputs "/bin/gs")))
               (substitute* "preview.el"
                 (("\"dvipng ")
                  (string-append "\"" (assoc-ref inputs "texlive")
       `(("perl" ,perl)))
      (inputs
       `(("ghostscript" ,ghostscript)
 -       ("texlive" ,(texlive-union (list texlive-amsfonts/patched)))))
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts)))))
      (home-page "https://www.gnu.org/software/auctex/")
      (synopsis "Integrated environment for TeX")
      (description
@@@ -2770,6 -2773,34 +2770,34 @@@ the ability to jump forward and backwar
  Emacs buffer.")
      (license license:gpl3+)))
  
+ (define-public emacs-caml
+   (package
+     (name "emacs-caml")
+     (version "4.9")
+     (source
+       (origin
+         (method url-fetch)
+         (uri (string-append "https://elpa.nongnu.org/nongnu/caml-"
+                             version ".tar"))
+         (sha256
+           (base32
+             "00ldvz6r10vwwmk6f3az534p0340ywn7knsg2bmvbvh3q51vyl9i"))))
+     (build-system emacs-build-system)
+     (home-page "https://github.com/ocaml/caml-mode")
+     (synopsis "Caml mode for GNU Emacs")
+     (description
+       "This package provides a major mode for editing OCaml code in Emacs.
+ Some of its major features include:
+ @itemize
+ @item syntax highlighting (font lock);
+ @item automatic indentation;
+ @item querying the type of expressions (using compiler generated annot files);
+ @item running an OCaml REPL within Emacs;
+ @item scanning of declarations and placing them in a menu.
+ @end itemize")
+     (license license:gpl2+)))
  (define-public emacs-caps-lock
    (package
      (name "emacs-caps-lock")
@@@ -3008,7 -3039,8 +3036,7 @@@ into mode hooks and is intended to be u
               (chmod "ggtags.el" #o644)
               (emacs-substitute-variables "ggtags.el"
                 ("ggtags-executable-directory"
 -                (string-append (assoc-ref inputs "global") "/bin")))
 -             #t)))))
 +                (dirname (search-input-file inputs "bin/global")))))))))
      (home-page "https://github.com/leoliu/ggtags")
      (synopsis "Frontend to the GNU Global source code tagging system")
      (description "@code{ggtags} provides a frontend to the GNU Global source
@@@ -3114,7 -3146,7 +3142,7 @@@ directly inside Emacs.  It requires a G
               (with-directory-excursion "texinfo"
                 (substitute* "Makefile"
                   (("\\/usr\\/bin\\/gzip")
 -                  (string-append (assoc-ref inputs "gzip") "/bin/gzip")))
 +                  (search-input-file inputs "/bin/gzip")))
                 (invoke "make"
                         "clean"
                         "info"
@@@ -4911,7 -4943,7 +4939,7 @@@ configuration, cache, and other data."
  (define-public emacs-string-inflection
    (package
      (name "emacs-string-inflection")
-     (version "1.0.14")
+     (version "1.0.15")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "0g4lm384380q03pdspqzv8rb2gppb77m354r0xzw71340w8xh3hd"))))
+                 "194pd3g9ws72n3wy1b2pxgj3w20p1v8gn47gqg89mym9ps5hfjyv"))))
      (build-system emacs-build-system)
      (native-inputs
       `(("ert-runner" ,emacs-ert-runner)))
@@@ -5616,7 -5648,8 +5644,7 @@@ for Flow files."
           (add-after 'unpack 'specify-python-location
             ;; Hard-code python3 executable location in the library.
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((python3 (string-append (assoc-ref inputs "python")
 -                                           "/bin/python3")))
 +             (let ((python3 (search-input-file inputs "/bin/python3")))
                 (substitute* '("flycheck-grammalecte.el" "grammalecte.el")
                   (("\"python3") (string-append "\"" python3)))
                 (substitute* '("conjugueur.py" "flycheck_grammalecte.py")
               (make-file-writable "grammalecte.el")
               (emacs-substitute-variables "grammalecte.el"
                 ("grammalecte-python-package-directory"
 -                (string-append (assoc-ref inputs "grammalecte")
 -                               "/lib/python"
 -                               ,(version-major+minor (package-version python))
 -                               "/site-packages/grammalecte")))))
 +                (search-input-directory
 +                 inputs
 +                 (string-append "lib/python"
 +                                ,(version-major+minor (package-version python))
 +                                "/site-packages/grammalecte"))))))
           (add-after 'unpack 'do-not-phone-home
             ;; Do not check for Grammalecte updates, ever.
             (lambda _
@@@ -5983,14 -6015,14 +6011,14 @@@ src blocks."
  (define-public emacs-debbugs
    (package
      (name "emacs-debbugs")
-     (version "0.28")
+     (version "0.29")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "https://elpa.gnu.org/packages/debbugs-"
                             version ".tar"))
         (sha256
-         (base32 "1qks38hpg3drhxzw66n5yxfq0v6fj9ya7d9dc6x0xwfp6r2x0li0"))))
+         (base32 "1bn21d9dr9pb3vdak3v07x056xafym89kdpxavjf4avy6bry6s4d"))))
      (build-system emacs-build-system)
      (arguments '(#:include '("\\.el$" "\\.wsdl$" "\\.info$")))
      (propagated-inputs
@@@ -6249,7 -6281,7 +6277,7 @@@ languages."
  (define-public emacs-irony-mode
    (package
      (name "emacs-irony-mode")
-     (version "1.4.0")
+     (version "1.5.0")
      (home-page "https://github.com/Sarcasm/irony-mode")
      (source (origin
                (method git-fetch)
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "0n2nfcq58md1p2xdhq1smh8v7lsyj0ci7ma5xyd6bkg5rvhsh10i"))))
+                 "1ilvfqn7hzrjjy2zrv08dbdnmgksdgsmrdcvx05s8704430ag0pb"))))
      (build-system emacs-build-system)
      (inputs `(("server" ,emacs-irony-mode-server)))
      (arguments `(#:phases
@@@ -8287,7 -8319,7 +8315,7 @@@ list of candidates."
  (define-public emacs-consult-notmuch
    (package
      (name "emacs-consult-notmuch")
-     (version "0.4")
+     (version "0.5")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0x2lz2df1rjq3vdxvqqnxqxh257hq5iyx1w3yc85w7lmnb59gbvy"))))
+         (base32 "04ha4mysxvfz6yzbkgrl1mcwic1lwr1xx6gdy5rl6hn1wwnwam4p"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-consult" ,emacs-consult)
-        ("notmuch" ,notmuch)))
+        ("emacs-notmuch" ,emacs-notmuch)))
      (home-page "https://codeberg.org/jao/consult-notmuch")
      (synopsis "Search and preview Notmuch emails using Consult")
      (description
@@@ -9479,11 -9511,15 +9507,13 @@@ queries using counsel."
                 (make-file-writable "counsel-notmuch.el")
                 (emacs-substitute-variables "counsel-notmuch.el"
                   ("counsel-notmuch-path"
 -                  (string-append (assoc-ref inputs "notmuch")
 -                                 "/bin/notmuch")))
 -               #t)))))
 +                  (search-input-file inputs "/bin/notmuch"))))))))
        (inputs
         `(("emacs-counsel" ,emacs-counsel)
           ("notmuch" ,notmuch)
           ("emacs-s" ,emacs-s)))
+       (propagated-inputs
+        `(("emacs-notmuch" ,emacs-notmuch)))
        (home-page "https://github.com/fuxialexander/counsel-notmuch")
        (synopsis "Search emails in Notmuch asynchronously with Ivy")
        (description
@@@ -9903,7 -9939,7 +9933,7 @@@ features
  (define-public emacs-typescript-mode
    (package
      (name "emacs-typescript-mode")
-     (version "0.3")
+     (version "0.4")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "002f1xfhq43fjaqliwrgxspryfahpa82va5dw3p8kwil2xwvc6mh"))))
+                 "186bpvqxx87kp3857mq0mzn1ddsvzmpijix810k6bdz8522x7zdw"))))
      (build-system emacs-build-system)
      (home-page "https://github.com/ananthakumaran/typescript.el")
      (synopsis "Emacs major mode for editing Typescript code")
@@@ -12467,14 -12503,14 +12497,14 @@@ extensibility."
        (source (origin
                  (method git-fetch)
                  (uri (git-reference
-                       (url "https://git.sr.ht/~zge/autocrypt")
+                       (url "https://git.sr.ht/~pkal/autocrypt")
                        (commit commit)))
                  (file-name (git-file-name name version))
                  (sha256
                   (base32
                    "0b06xnjkgwjpxl96mdi674pmvdaiwncifi1a30wxhl1dwr7kr084"))))
        (build-system emacs-build-system)
-       (home-page "https://git.sr.ht/~zge/autocrypt")
+       (home-page "https://git.sr.ht/~pkal/autocrypt")
        (synopsis "Autocrypt implementation for Emacs")
        (description "@code{emacs-autocrypt} is an implementation of
  Autocrypt (@url{https://autocrypt.org/}) for various Emacs MUAs.  Autocrypt is
@@@ -12859,7 -12895,7 +12889,7 @@@ type an abbreviation and automatically 
  (define-public emacs-yasnippet-snippets
    (package
      (name "emacs-yasnippet-snippets")
-     (version "0.24")
+     (version "1.0")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0ak0drxlg3m2v4ya5chpgl82rcl7ic2nmnybhpw1qk51mcmv643y"))))
+         (base32 "0m78jxhjyf4212ig2ncxr6bhhd6yx4c3nc8x4ylamzq21x4fl21r"))))
      (build-system emacs-build-system)
      (arguments
       `(#:include (cons* "^snippets\\/" %default-include)))
@@@ -13249,7 -13285,8 +13279,7 @@@ highlights quasi-quoted expressions."
                      (bin (string-append out "/bin"))
                      (lisp (string-append out "/share/emacs/site-lisp/emacspeak"))
                      (info (string-append out "/share/info"))
 -                    (emacs (string-append (assoc-ref inputs "emacs")
 -                                          "/bin/emacs")))
 +                    (emacs (search-input-file inputs "/bin/emacs")))
                 ;; According to etc/install.org, the Emacspeak directory should
                 ;; be copied to its installation destination.
                 (for-each
@@@ -13747,6 -13784,28 +13777,28 @@@ containing words from the Rime project.
  shuangpin, wubi and cangjie.")
      (license license:gpl2+)))
  
+ (define-public emacs-pinyinlib
+   (package
+     (name "emacs-pinyinlib")
+     (version "0.1.1")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/cute-jumper/pinyinlib.el")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1nwj4c3y0kdlkf3jqd2dnibaiazrq6qcj533xk2qw4wmx072yij0"))))
+     (build-system emacs-build-system)
+     (home-page "https://github.com/cute-jumper/pinyinlib.el")
+     (synopsis "Convert first letter of Pinyin to Chinese characters")
+     (description
+      "This Emacs library provides functionality for converting the first
+ letter of Pinyin to Simplified/Traditional Chinese characters.")
+     (license license:gpl3+)))
  (define-public emacs-reverse-im
    (package
      (name "emacs-reverse-im")
@@@ -13975,10 -14034,10 +14027,10 @@@ It should enable you to implement low-l
                     (format #t "#!~a ~@
                       ~a +SI:localuser:$USER ~@
                       exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
 -                           (string-append (assoc-ref inputs "bash") "/bin/sh")
 -                           (string-append (assoc-ref inputs "xhost") "/bin/xhost")
 -                           (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
 -                           (string-append (assoc-ref inputs "emacs") "/bin/emacs")
 +                           (search-input-file inputs "/bin/sh")
 +                           (search-input-file inputs "/bin/xhost")
 +                           (search-input-file inputs "/bin/dbus-launch")
 +                           (search-input-file inputs "/bin/emacs")
                             '(cond
                               ((file-exists-p "~/.exwm")
                                (load-file "~/.exwm"))
@@@ -14091,10 -14150,10 +14143,10 @@@ other operations."
                     (format #t "#!~a ~@
                       ~a +SI:localuser:$USER ~@
                       exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
 -                           (string-append (assoc-ref inputs "bash") "/bin/sh")
 -                           (string-append (assoc-ref inputs "xhost") "/bin/xhost")
 -                           (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
 -                           (string-append (assoc-ref inputs "emacs") "/bin/emacs")
 +                           (search-input-file inputs "/bin/sh")
 +                           (search-input-file inputs "/bin/xhost")
 +                           (search-input-file inputs "/bin/dbus-launch")
 +                           (search-input-file inputs "/bin/emacs")
                             '(require 'exwmx-loader))))
                 (chmod exwm-executable #o555)
                 #t))))))
@@@ -15632,14 -15691,14 +15684,14 @@@ let users kill or mark things easily."
  (define-public emacs-csv-mode
    (package
      (name "emacs-csv-mode")
-     (version "1.15")
+     (version "1.16")
      (source
       (origin
         (method url-fetch)
         (uri (string-append "https://elpa.gnu.org/packages/"
                             "csv-mode-" version ".tar"))
         (sha256
-         (base32 "0pigqhqg5mfza6jdskcr9yvrzdxnd68iyp3vyb8p8wskdacmbiyx"))))
+         (base32 "1i43b2p31xhrf97xbdi35y550ysp69fasa5gcrhg6iyxw176807p"))))
      (build-system emacs-build-system)
      (home-page "https://elpa.gnu.org/packages/csv-mode.html")
      (synopsis "Major mode for editing comma/char separated values")
@@@ -15873,7 -15932,7 +15925,7 @@@ Features
  (define-public emacs-evil-matchit
    (package
      (name "emacs-evil-matchit")
-     (version "2.3.13")
+     (version "2.4.0")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "1j1p4z6ps58nbsh55l9h30gxbkrzwzkjpq7zl50q6yfc84z7byzk"))))
+         (base32 "1ls58wdjhs4q18bj3izflj0bb5fwafyr520y1j9kj29clqn73kxh"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-evil" ,emacs-evil)))
@@@ -18761,10 -18820,10 +18813,10 @@@ notes."
      (license license:gpl3+)))
  
  (define-public emacs-org-reveal
-   (let ((commit "84039bb499290926511b04749882ecb5eda45a0c"))
+   (let ((commit "fe9148b670d144124d9697fcf5d0528f19025104"))
      (package
        (name "emacs-org-reveal")
-       (version (git-version "20200607" "1" commit))
+       (version (git-version "20210902" "1" commit))
        (source (origin
                  (method git-fetch)
                  (uri (git-reference
                  (file-name (git-file-name name version))
                  (sha256
                   (base32
-                   "1fx3xmnkpfljrdmy0dsyq79k93ky57gcqm1ad9qbzykk7qjvmmi8"))))
+                   "034gkbc03z9jzj7ad34mmqgmvj4f14ap7iixh3zx4wp2ipw5xb7c"))))
        (build-system emacs-build-system)
        (home-page "https://github.com/yjwen/org-reveal")
        (synopsis "Org and Reveal.js powered HTML presentation tool")
@@@ -23538,7 -23597,7 +23590,7 @@@ the standard @code{Dockerfile} file for
  (define-public emacs-lsp-mode
    (package
      (name "emacs-lsp-mode")
-     (version "7.0.1")
+     (version "8.0.0")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "1z8zm7qr21hvhl6rnbznv2l9drh1pp5y4zkjrx5ac4x77b8i4aaz"))))
+         (base32 "1a6jc9sxf9b8fj9h8xlv5k546bkzsy8j5nj19cfama389z0bzcsl"))))
      (build-system emacs-build-system)
+     (arguments
+      `(#:emacs ,emacs  ;need libxml support
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'move-clients-libraries
+            ;; Move all clients libraries at top-level, as is done, e.g., in
+            ;; MELPA.
+            (lambda _
+              (for-each (lambda (f)
+                          (install-file f "."))
+                        (find-files "clients/" "\\.el$")))))))
      (propagated-inputs
       `(("emacs-dash" ,emacs-dash)
         ("emacs-f" ,emacs-f)
@@@ -23568,7 -23638,7 +23631,7 @@@ Projectile."
  (define-public emacs-lsp-treemacs
    (package
      (name "emacs-lsp-treemacs")
-     (version "0.3")
+     (version "0.4")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "1z9cb7i546pbzvxii6lsj31jq8m70xrzscphl5z71vh93sydyhkb"))))
+         (base32 "05ivqa5900139jzjhwc3nggwznhm8564dz4ydcxym2ddd63571k0"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-lsp-mode" ,emacs-lsp-mode)
@@@ -23592,7 -23662,7 +23655,7 @@@ and implementation of treeview control
  (define-public emacs-dap-mode
    (package
      (name "emacs-dap-mode")
-     (version "0.6")
+     (version "0.7")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "1d4hdydfk86d4slibigyhwng8wx3vzyap8hp5iv0h7wr6868m4iv"))))
+         (base32 "1zczmcv8562lachkvcwy6njn7zkgny08iznpmrx821wr8mh52wnn"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-bui" ,emacs-bui)
@@@ -23703,7 -23773,7 +23766,7 @@@ processes for Emacs"
                 (chmod "src/elisp/treemacs-customization.el" #o644)
                 (emacs-substitute-variables "src/elisp/treemacs-customization.el"
                   ("treemacs-python-executable"
 -                  (string-append (assoc-ref inputs "python") "/bin/python3")))
 +                  (search-input-file inputs "/bin/python3")))
                 (chmod "src/elisp/treemacs-async.el" #o644)
                 (substitute* "src/elisp/treemacs-async.el"
                   (("src/scripts") (string-append "share/" ,name "/scripts"))))
@@@ -23830,7 -23900,7 +23893,7 @@@ files in Elisp."
  (define-public emacs-lsp-ui
    (package
      (name "emacs-lsp-ui")
-     (version "7.0.1")
+     (version "8.0.0")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "09dmhhxmfjnzdc5kygwsjf8nwqlnq9rbgrca679s2wy93miqj7vc"))))
+                 "00yirx6qzlb8fv8rd53zaw93nw72z3br40rb16scdqj1v20qsp47"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-dash" ,emacs-dash)
@@@ -23880,7 -23950,7 +23943,7 @@@ and code peeking."
  (define-public emacs-lsp-ivy
    (package
      (name "emacs-lsp-ivy")
-     (version "0.4")
+     (version "0.5")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "08dpn0vcfdwwysijwdpnnj91m69yw0q464i0wmp51zpj3dyd4kb1"))))
+         (base32 "0nb9ypa8hyx7i38rbywh8hn2i5f9l2l567hvdr9767fk279yr97n"))))
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-dash" ,emacs-dash)
@@@ -23944,7 -24014,7 +24007,7 @@@ workspaces with a LSP-compliant server 
      (build-system emacs-build-system)
      (propagated-inputs
       `(("emacs-helm" ,emacs-helm)
-        ("notmuch" ,notmuch)))
+        ("emacs-notmuch" ,emacs-notmuch)))
      (synopsis "Search emails with Emacs Notmuch and Helm")
      (description
       "This package can be used to search emails in Emacs, searching result
@@@ -23967,7 -24037,7 +24030,7 @@@ real search."
                  "0pmikf1djkr07067nkgmdcxyn7l7ibswx6qlnai8v1v51f9h1g9q"))))
      (build-system emacs-build-system)
      (propagated-inputs
-      `(("notmuch" ,notmuch)))
+      `(("emacs-notmuch" ,emacs-notmuch)))
      (home-page "https://git.sr.ht/~tarsius/notmuch-maildir")
      (synopsis "Visualize maildirs as a tree")
      (description
@@@ -26592,7 -26662,7 +26655,7 @@@ other @code{helm-type-file} sources suc
  (define-public emacs-telega-server
    (package
      (name "emacs-telega-server")
-     (version "0.7.025")
+     (version "0.7.030")
      (source
       (origin
         (method git-fetch)
               (url "https://github.com/zevlg/telega.el")
               (commit (string-append "v" version))))
         (sha256
-         (base32 "1fdvghwpmja94d65p02j7wa09lwjs3ah1kfb1v17b6l9qd5g80nc"))
+         (base32 "1g29v5fgkqx43wsvh1npx0g3hj00n37lxgvxjvy85fs4h9226gl9"))
         (file-name (git-file-name "emacs-telega" version))
         (patches
          (search-patches "emacs-telega-path-placeholder.patch"
                          "emacs-telega-test-env.patch"))))
      (build-system gnu-build-system)
      (arguments
-      `(#:phases
+      `(#:make-flags
+        (list (string-append "CC=" ,(cc-for-target))
+              (string-append "INSTALL_PREFIX="
+                             (assoc-ref %outputs "out") "/bin"))
+        #:phases
         (modify-phases %standard-phases
           (add-before 'configure 'enter-subdirectory
             (lambda _ (chdir "server") #t))
           (replace 'configure
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
-                (substitute* "Makefile"
-                  (("CC=cc") ,(string-append "CC=" (cc-for-target)))
-                  (("^(INSTALL_PREFIX=).*$" _all prefix)
-                   (string-append prefix out "/bin\n")))
                 (substitute* "run_tests.py"
                   (("^(TELEGA_SERVER = ).*$" _all prefix)
                    (string-append prefix
@@@ -26651,19 -26720,20 +26713,20 @@@ service, and connect it with Emacs via 
                      emacs-minimal
                      ;; Require wide-int support for 32-bit platform.
                      emacs-wide-int)
+        #:include (cons "^etc\\/" %default-include)
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-sources
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Hard-code paths to `ffplay` and `ffmpeg`.
 -             (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
 -                    (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg"))
 -                    (ffplay-bin (string-append ffmpeg "/bin/ffplay")))
 +             (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay"))
 +                    (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg")))
                 (substitute* '("telega-ffplay.el" "telega-vvnote.el")
                   (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
                     all func cmd)
 -                  (string-append func " \"" (assoc-ref inputs "ffmpeg")
 -                                 "/bin/" cmd))
 +                  (string-append func " \""
 +                                 (search-input-file
 +                                  inputs (string-append "/bin/" cmd))))
                   (("\\(executable-find \"ffplay\"\\)")
                    (string-append "(and (file-executable-p \"" ffplay-bin "\")"
                                   "\"" ffplay-bin "\")"))
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (substitute* "telega-server.el"
                 (("@TELEGA_SERVER_BIN@")
 -                (string-append (assoc-ref inputs "emacs-telega-server")
 -                               "/bin/telega-server")))
 +                (search-input-file inputs "/bin/telega-server")))
               (substitute* "telega-util.el"
                 (("@TELEGA_SHARE@")
-                 (string-append (assoc-ref outputs "out")
-                                "/share/emacs-telega")))))
-          (add-after 'install 'install-share-files
-            (lambda* (#:key outputs #:allow-other-keys)
-              (define install-plan
-                '("langs" "sounds" "emojis.alist"
-                  "verified.svg" "telega-logo.svg"))
-              (define prefix (string-append (assoc-ref outputs "out")
-                                                 "/share/emacs-telega"))
-              (with-directory-excursion "etc"
-                (for-each (lambda (file)
-                            (if (file-is-directory? file)
-                                (let ((dest (string-append prefix "/" file)))
-                                  (copy-recursively file dest))
-                                (install-file file prefix)))
-                          install-plan))
-              #t)))))
+                 (string-append (elpa-directory (assoc-ref outputs "out"))
+                                "/etc"))))))))
      (inputs
       `(("emacs-telega-server" ,emacs-telega-server)
         ("ffmpeg" ,ffmpeg)))
@@@ -26990,8 -27045,9 +27037,8 @@@ REPL appropriate to the current major m
               (make-file-writable "rime.el")
               (emacs-substitute-variables "rime.el"
                 ("rime-share-data-dir"
 -                (string-append (assoc-ref inputs "rime-data")
 -                               "/share/rime-data")))
 -             #t))
 +                (search-input-directory inputs
 +                                        "share/rime-data")))))
           (add-before 'install 'build-emacs-module
             (lambda _
               (invoke "make" "lib"))))))
@@@ -27990,7 -28046,9 +28037,7 @@@ emoji."
               (make-file-writable "exiftool.el")
               (emacs-substitute-variables "exiftool.el"
                 ("exiftool-executable"
 -                (string-append (assoc-ref inputs "perl-image-exiftool")
 -                               "/bin/exiftool")))
 -             #t)))))
 +                (search-input-file inputs "/bin/exiftool"))))))))
      (inputs
       `(("perl-image-exiftool" ,perl-image-exiftool)))
      (home-page "https://git.systemreboot.net/exiftool.el/about/")
@@@ -28223,6 -28281,15 +28270,15 @@@ snippets for Emacs."
      (arguments
       `(#:phases
         (modify-phases %standard-phases
+          ;; Move the extensions source files to the top level, which is included in
+          ;; the EMACSLOADPATH.
+          (add-after 'unpack 'move-source-files
+            (lambda _
+              (let ((el-files (find-files "./extensions" ".*\\.el$")))
+                (for-each (lambda (f)
+                            (rename-file f (basename f)))
+                          el-files))
+              #t))
           (add-after 'install 'install-image
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
@@@ -28504,7 -28571,7 +28560,7 @@@ rather excellent completion provided b
      (source (origin
                (method git-fetch)
                (uri (git-reference
-                     (url "https://git.sr.ht/~zge/bang")
+                     (url "https://git.sr.ht/~pkal/shell-command-plus")
                      (commit version)))
                (file-name (git-file-name name version))
                (sha256
@@@ -335,10 -335,12 +335,10 @@@ utilities."
               (substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in"
                              "utils/attrib/lepton-attrib.scm")
                 (("@LIBGTK@")
 -                (string-append (assoc-ref inputs "gtk")
 -                               "/lib/libgtk-3.so")))
 +                (search-input-file inputs "/lib/libgtk-3.so")))
               (substitute* '("libleptongui/scheme/schematic/ffi/gobject.scm.in")
                 (("@LIBGOBJECT@")
 -                (string-append (assoc-ref inputs "glib")
 -                               "/lib/libgobject-2.0.so")))
 +                (search-input-file inputs "/lib/libgobject-2.0.so")))
               (substitute* "liblepton/scheme/lepton/ffi.scm.in"
                 (("@LIBLEPTON@")
                  (string-append (assoc-ref outputs "out")
                                 "/lib/libleptonattrib.so")))
               (substitute* "liblepton/scheme/lepton/log.scm.in"
                 (("@LIBGLIB@")
 -                (string-append (assoc-ref inputs "glib")
 -                               "/lib/libglib-2.0.so")))
 +                (search-input-file inputs "/lib/libglib-2.0.so")))
  
               ;; For finding libraries when running tests before installation.
               (setenv "LIBLEPTONGUI"
@@@ -434,8 -437,7 +434,8 @@@ features."))
               ;; fix of the mesa package we wrap the pcb executable such that
               ;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
               (let* ((out (assoc-ref outputs "out"))
 -                    (path (string-append (assoc-ref inputs "udev") "/lib")))
 +                    (path (dirname
 +                           (search-input-file inputs "/lib/libudev.so"))))
                 (wrap-program (string-append out "/bin/pcb")
                   `("LD_LIBRARY_PATH" ":" prefix (,path))))
               #t))
@@@ -524,7 -526,7 +524,7 @@@ featuring various improvements and bug 
       ;; FIXME: with texlive-tiny citation references are rendered as question
       ;; marks.  During the build warnings like these are printed:
       ;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
 -     `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
 +     `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts)))
         ("ghostscript" ,ghostscript)))
      (arguments
       `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
@@@ -929,16 -931,6 +929,16 @@@ Emacs)."
                  (string-append "NGSPICE_DLL_FILE=\""
                                 (assoc-ref inputs "libngspice")
                                 "/lib/libngspice.so\"")))))
 +         (add-after 'unpack 'fix-python-detection
 +           (lambda _
 +             (substitute* "CMakeModules/FindPythonLibs.cmake"
 +               (("_PYTHON3_VERSIONS 3\\.8 3\\.7")
 +                "_PYTHON3_VERSIONS 3.9 3.8 3.7"))))
 +         (add-after 'unpack 'add-missing-include
 +           (lambda _
 +             (substitute* "common/lib_tree_model.cpp"
 +               (("#include <eda_pattern_match.h>" all)
 +                (string-append "#include <algorithm>\n" all)))))
           (add-after 'install 'install-translations
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (copy-recursively (assoc-ref inputs "kicad-i18n")
                             ,(version-major+minor
                               (package-version python))
                             "/site-packages:"
 -                           (getenv "PYTHONPATH"))))
 +                           (getenv "GUIX_PYTHONPATH"))))
                 (wrap-program file
 -                 `("PYTHONPATH" ":" prefix (,path))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,path))
                   `("PATH" ":" prefix
                     (,(string-append python "/bin:")))))
               #t)))))
@@@ -1213,9 -1205,9 +1213,9 @@@ the 'showing the effect of'-style of op
                             ,(version-major+minor
                               (package-version python))
                             "/site-packages:"
 -                           (getenv "PYTHONPATH"))))
 +                           (getenv "GUIX_PYTHONPATH"))))
                 (wrap-program file
 -                 `("PYTHONPATH" ":" prefix (,path))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,path))
                   `("PATH" ":" prefix
                     (,(string-append python "/bin:")))))
               #t)))))
@@@ -1975,14 -1967,19 +1975,14 @@@ parallel computing platforms.  It also 
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "freehdl/freehdl-config"
                 (("pkg-config")
 -                (string-append (assoc-ref inputs "pkg-config")
 -                               "/bin/pkg-config"))
 +                (search-input-file inputs "/bin/pkg-config"))
                 (("cat")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/cat")))
 -             #t))
 +                (search-input-file inputs "/bin/cat")))))
           (add-after 'patch-pkg-config 'setenv
             (lambda* (#:key inputs #:allow-other-keys)
 -             (setenv "CXX" (string-append (assoc-ref inputs "gcc")
 -                                          "/bin/g++"))
 -             (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
 -                                                     "/bin/libtool"))
 -             #t))
 +             (setenv "CXX" (search-input-file inputs "/bin/g++"))
 +             (setenv "SYSTEM_LIBTOOL"
 +                     (search-input-file inputs "/bin/libtool"))))
           (add-after 'setenv 'patch-gvhdl
             (lambda _
               (substitute* "v2cc/gvhdl.in"
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "freehdl/freehdl-gennodes.in"
                 (("guile")
 -                (string-append (assoc-ref inputs "guile") "/bin/guile"))
 +                (search-input-file inputs "/bin/guile"))
                 (("\\(debug") ";(debug")
                 (("\\(@ ") "(apply-emit")
                 (("\\(@@ ") "(apply-mini-format"))
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (mkdir-p "build")
               (chdir "build")
 -             (let ((lrelease (string-append (assoc-ref inputs "qttools")
 -                                            "/bin/lrelease"))
 +             (let ((lrelease (search-input-file inputs "/bin/lrelease"))
                     (out (assoc-ref outputs "out")))
                 (invoke "qmake"
                         (string-append "QMAKE_LRELEASE=" lrelease)
@@@ -2417,7 -2415,7 +2417,7 @@@ comments."))
         ("libtheora" ,libtheora)
         ("libtiff" ,libtiff)
         ("libxi" ,libxi)
-        ("libxmlplusplus" ,libxmlplusplus)
+        ("libxml++" ,libxml++)
         ("libxmu" ,libxmu)
         ("lz4" ,lz4)
         ("netcdf" ,netcdf)
@@@ -2766,7 -2764,9 +2766,7 @@@ GUI."
                  "06qgry1pal2vampmbmc1lzlhf1qnjkd8py781r5h020v981n6y5s"))))
      (build-system gnu-build-system)
      ;; The GUI, which we elide, requires tcl and tk.
 -    (native-inputs `(;; Requires bison 3.6+ but we currently only have 3.5.
 -                     ;; Bison 3.6 will be available in the next core update.
 -                     ("bison-3.6" ,bison-3.6)
 +    (native-inputs `(("bison" ,bison)
                       ("clisp" ,clisp)
                       ("dejagnu" ,dejagnu)
                       ("flex" ,flex)
diff --combined gnu/packages/games.scm
@@@ -5,7 -5,7 +5,7 @@@
  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
  ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
  ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
 -;;; Copyright © 2014, 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2014, 2015, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2014, 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
  ;;; Copyright © 2014, 2015, 2019 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
@@@ -42,7 -42,7 +42,7 @@@
  ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
  ;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
  ;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
 -;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
 +;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
  ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
  ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@@ -722,7 -722,8 +722,7 @@@ possible, while battling many vicious a
                      (bin (string-append out "/bin"))
                      (doc (string-append out "/share/doc/bsd-games-" ,version))
                      (man (string-append out "/share/man"))
 -                    (word-list (string-append (assoc-ref inputs "miscfiles")
 -                                              "/share/web2"))
 +                    (word-list (search-input-file inputs "/share/web2"))
                      (static-data (string-append out "/share/games/bsd-games"))
                      ;; Not a "./" because of substitute* in 'patch-install
                      ;; below.  The .// allow us not to mess with the games'
@@@ -1202,9 -1203,10 +1202,9 @@@ characters and lines resulting in a rai
               ;; Set correct environment for SDL.
               (lambda* (#:key inputs #:allow-other-keys)
                 (setenv "CPATH"
 -                       (string-append (assoc-ref inputs "sdl")
 -                                      "/include/SDL:"
 -                                      (or (getenv "CPATH") "")))
 -               #t))
 +                       (string-append
 +                        (search-input-directory inputs "include/SDL")
 +                        ":" (or (getenv "CPATH") "")))))
             (add-before 'build 'fix-settings-directory
               ;; Hide foobillardplus settings directory in $HOME.
               (lambda _
@@@ -1598,7 -1600,8 +1598,7 @@@ shadow mimic them to reach blocks you c
               ;; Look for xdg-open in the store.
               (substitute* "src/core/web.c"
                 (("/usr(/bin/xdg-open)" _ bin)
 -                (string-append (assoc-ref inputs "xdg-utils") bin)))
 -             #t))
 +                (search-input-file inputs bin)))))
           (add-after 'unpack 'unbundle-fonts
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Replace bundled Roboto fonts with links to the store.
@@@ -1904,9 -1907,10 +1904,9 @@@ Chess).  It is similar to standard ches
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "CPATH"
 -                     (string-append (assoc-ref inputs "sdl-union")
 -                                    "/include/SDL:"
 -                                    (or (getenv "CPATH") "")))
 -             #t)))))
 +                     (string-append
 +                      (search-input-directory inputs "include/SDL")
 +                      ":" (or (getenv "CPATH") ""))))))))
      (inputs
       `(("sdl-union" ,(sdl-union (list sdl sdl-mixer)))))
      (home-page "http://lgames.sourceforge.net/LTris/")
@@@ -2117,9 -2121,10 +2117,9 @@@ Every puzzle has a complete solution, a
          (add-after 'set-paths 'set-sdl'paths
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CPATH"
 -                    (string-append (assoc-ref inputs "sdl-union")
 -                                   "/include/SDL:"
 -                                   (or (getenv "CPATH") "")))
 -            #t)))))
 +                    (string-append
 +                     (search-input-file inputs "/include/SDL")
 +                     ":" (or (getenv "CPATH") ""))))))))
     (inputs
      `(("fluidsynth" ,fluidsynth)
        ("glu" ,glu)
@@@ -2280,9 -2285,9 +2280,9 @@@ utilizing the art assets from the @code
                   (lambda (p)
                     (format p "\
  #!~a
 -export PYTHONPATH=~a/LIB:~a
 +export GUIX_PYTHONPATH=~a/LIB:~a
  exec -a \"~a\" ~a \"$@\"\n"
 -                           (which "bash") data (getenv "PYTHONPATH")
 +                           (which "bash") data (getenv "GUIX_PYTHONPATH")
                             (which "python3")
                             (string-append lib "/main.py"))))
                 (chmod roguebox-adventures #o555))
@@@ -2356,9 -2361,9 +2356,9 @@@ can be explored and changed freely."
                     (lambda (p)
                       (format p
                               "#!~a~@
 -                              export PYTHONPATH=~a:~a~@
 +                              export GUIX_PYTHONPATH=~a:~a~@
                                exec -a \"~a\" ~a \"$@\"~%"
 -                             (which "bash") data (getenv "PYTHONPATH")
 +                             (which "bash") data (getenv "GUIX_PYTHONPATH")
                               (which "python3")
                               (string-append data "/run_game.py"))))
                   (chmod executable #o555))
             (lambda* (#:key outputs inputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (data (string-append out "/share/seahorse-adventures"))
 -                    (vera (string-append (assoc-ref inputs "font-bitstream-vera")
 -                                         "/share/fonts/truetype/Vera.ttf")))
 +                    (vera (search-input-file
 +                           inputs "/share/fonts/truetype/Vera.ttf")))
                 (let ((themes-dir (string-append data "/data/themes/")))
                   (for-each
                    (lambda (theme)
@@@ -2959,9 -2964,9 +2959,9 @@@ properly."
                    (add-after 'set-paths 'set-sdl-paths
                      (lambda* (#:key inputs #:allow-other-keys)
                        (setenv "CPATH"
 -                              (string-append (assoc-ref inputs "sdl-union")
 -                                             "/include/SDL:"
 -                                             (or (getenv "CPATH") "")))))
 +                              (string-append
 +                               (search-input-file inputs "include/SDL")
 +                               ":" (or (getenv "CPATH") "")))))
                    (add-after 'patch-source-shebangs 'patch-makefile
                      (lambda* (#:key outputs #:allow-other-keys)
                        ;; Replace /usr with package output directory.
@@@ -3388,16 -3393,14 +3388,16 @@@ exec ~a/bin/freedink -refdir ~a/share/d
           "1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
      (build-system gnu-build-system)
      (arguments
 -     `(#:phases
 +     `(#:configure-flags '("CFLAGS=-fcommon")
 +       #:phases
         (modify-phases %standard-phases
           ;; Fixes https://issues.guix.gnu.org/47195.
           (add-after 'unpack 'patch-aplay-path
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "xboard.conf"
                 (("aplay -q")
 -                (string-append (assoc-ref inputs "alsa-utils") "/bin/aplay -q")))))
 +                (string-append (search-input-file inputs "/bin/aplay")
 +                               " -q")))))
           ;; Fixes https://issues.guix.gnu.org/45236.
           (add-after 'unpack 'patch-default-engine
             (lambda* (#:key inputs #:allow-other-keys)
@@@ -3702,12 -3705,9 +3702,12 @@@ Widgets, and allows users to create mor
      (build-system cmake-build-system)
      (arguments
       `(#:tests? #f            ; TODO The test running fails to run some tests.
 -       #:modules ((srfi srfi-1)
 -                  (guix build cmake-build-system)
 -                  (guix build utils))
 +       #:imported-modules ,(cons '(guix build python-build-system)
 +                                 %cmake-build-system-modules)
 +       #:modules ((guix build cmake-build-system)
 +                  ((guix build python-build-system) #:select (guix-pythonpath))
 +                  (guix build utils)
 +                  (srfi srfi-1))
         #:configure-flags
         (list
          (string-append "-DOPENALSOFT_INCLUDE_DIR="
           (delete 'check)
           (add-after 'install 'check
             (lambda* (#:key inputs outputs tests? #:allow-other-keys)
 -             (define python-version
 -               (let* ((version     (last (string-split
 -                                          (assoc-ref inputs "python")
 -                                          #\-)))
 -                      (components  (string-split version #\.))
 -                      (major+minor (take components 2)))
 -                 (string-join major+minor ".")))
 -
               (when tests?
 -               ;; Set PYTHONPATH so that python finds the installed modules.
 -               (setenv "PYTHONPATH"
 -                       (string-append (getenv "PYTHONPATH") ":"
 -                                      (assoc-ref outputs "out")
 -                                      "/lib/python"
 -                                      python-version
 -                                      "/site-packages"))
 +               (add-installed-pythonpath inputs outputs)
                 ;; The tests require an X server.
                 (system "Xvfb :1 &")
                 (setenv "DISPLAY" ":1")
                 (setenv "XDG_RUNTIME_DIR" "/tmp")
                 ;; Run tests
                 (chdir ,(string-append "../" name "-" version))
 -               (invoke "python3" "run_tests.py" "-a"))
 -             #t)))))
 +               (invoke "python3" "run_tests.py" "-a")))))))
      (inputs
       `(("sdl2" ,sdl2)
         ("sdl2-image" ,sdl2-image)
@@@ -4679,8 -4694,8 +4679,8 @@@ players."
            (replace 'configure
            (lambda* (#:key outputs inputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
 -                  (dejavu (string-append (assoc-ref inputs "font-dejavu")
 -                                         "/share/fonts/truetype/DejaVuSans.ttf")))
 +                  (dejavu (search-input-file
 +                           inputs "/share/fonts/truetype/DejaVuSans.ttf")))
                (substitute* "Makefile"
                  (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
                ;; The patch above registers a free font for use by the binary,
@@@ -4772,9 -4787,10 +4772,9 @@@ http://lavachat.symlynx.com/unix/"
             (add-after 'set-paths 'set-sdl-paths
               (lambda* (#:key inputs #:allow-other-keys)
                 (setenv "CPATH"
 -                       (string-append (assoc-ref inputs "sdl-union")
 -                                      "/include/SDL2:"
 -                                      (or (getenv "CPATH") "")))
 -               #t))
 +                       (string-append
 +                        (search-input-file inputs "/include/SDL2")
 +                        ":" (or (getenv "CPATH") "")))))
             (add-after 'install 'copy-data
               (lambda* (#:key outputs #:allow-other-keys)
                 (let ((out (assoc-ref outputs "out")))
@@@ -5755,7 -5771,7 +5755,7 @@@ throwing people around in pseudo-random
               (let* ((data (assoc-ref inputs "hyperrogue-data"))
                      (out (assoc-ref outputs "out"))
                      (sounds (string-append out "/share/hyperrogue/sounds"))
 -                    (unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
 +                    (unzip (search-input-file inputs "/bin/unzip")))
                 ;; Extract media license information into sounds directory.
                 (invoke unzip "-j" data
                         (string-append
@@@ -6121,10 -6137,11 +6121,10 @@@ over 100 user-created campaigns."
           (replace 'configure
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (setenv "CPLUS_INCLUDE_PATH"
 -                     (string-append (assoc-ref inputs "sdl-union")
 -                                    "/include/SDL:"
 -                                    (assoc-ref inputs "python")
 -                                    "/include/python2.7:"
 -                                    (or (getenv "CPLUS_INCLUDE_PATH") "")))
 +                     (string-append
 +                      (search-input-directory inputs "include/SDL") ":"
 +                      (search-input-directory inputs "include/python2.7")
 +                      ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
               (substitute* "src/main/main.cpp"
                 (("#include <SDL.h>" line)
                  (string-append line "
@@@ -6215,7 -6232,7 +6215,7 @@@ small robot living in the nano world, r
                    #t))))
      (build-system cmake-build-system)
      (arguments
-      `(#:tests? #f                      ; no tests included
+      `(#:test-target "run_tests"
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-paths
                                 (assoc-ref outputs "out")
                                 "/share/teeworlds/data"
                                 "\"")))
+              #t))
+          (add-after 'unpack 'replace-font
+            (lambda* (#:key inputs #:allow-other-keys)
+              (delete-file "datasrc/fonts/DejaVuSans.ttf")
+              (symlink (string-append (assoc-ref inputs "font-dejavu")
+                                      "/share/fonts/truetype/DejaVuSans.ttf")
+                       "datasrc/fonts/DejaVuSans.ttf")
               #t)))))
      (inputs
       `(("freetype" ,freetype)
+        ("font-dejavu" ,font-dejavu)
         ("glu" ,glu)
         ("json-parser" ,json-parser)
         ("mesa" ,mesa)
         ("openssl" ,openssl)
         ("zlib" ,zlib)))
      (native-inputs
-      `(("python" ,python-wrapper)
+      `(("googletest" ,googletest)
+        ("python" ,python-wrapper)
         ("pkg-config" ,pkg-config)))
      (home-page "https://www.teeworlds.com")
      (synopsis "2D retro multiplayer shooter game")
@@@ -6853,9 -6879,9 +6862,9 @@@ Crowther & Woods, its original authors
                    (add-after 'set-paths 'set-sdl-paths
                      (lambda* (#:key inputs #:allow-other-keys)
                        (setenv "CPATH"
 -                              (string-append (assoc-ref inputs "sdl-union")
 -                                             "/include/SDL2:"
 -                                             (or (getenv "CPATH") "")))))
 +                              (string-append
 +                               (search-input-directory inputs "/include/SDL2")
 +                               ":" (or (getenv "CPATH") "")))))
                    (delete 'check)
                    ;; premake doesn't provide install target
                    (replace 'install
@@@ -7078,7 -7104,7 +7087,7 @@@ some graphical niceities, and numerous 
      (native-inputs
       `(("pkg-config" ,pkg-config)))
      (inputs
 -     `(("curl" ,curl-minimal)
 +     `(("curl" ,curl)
         ("libvorbis" ,libvorbis)
         ("mesa" ,mesa)
         ("openal" ,openal)
@@@ -7180,7 -7206,7 +7189,7 @@@ elements to achieve a simple goal in th
  (define-public pioneer
    (package
      (name "pioneer")
-     (version "20210203")
+     (version "20210723")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "1zyi1xyghj99hz8fa6dywpscj6flp04fspnlgxbivf3rgmnxflg7"))))
+                 "1hj99jxb9n3r0bkq87p1c24862xa1xyzjyfdyyx88ckszxb05qf3"))))
      (build-system cmake-build-system)
      (native-inputs
       `(("pkg-config" ,pkg-config)))
@@@ -7468,8 -7494,6 +7477,8 @@@ online."
                 (base32
                  "1iy8rx7kjvi1zjiw4zh77szzmd1sgpqajvbhprh1sj93fhbxcdfl"))))
      (build-system gnu-build-system)
 +    (arguments
 +     `(#:configure-flags (list "CFLAGS=-fcommon")))
      (inputs `(("sdl2-net" ,sdl2-net)
                ("sdl2-mixer" , sdl2-mixer)
                ("sdl2" ,sdl2)))
@@@ -7509,8 -7533,7 +7518,8 @@@ affect gameplay)."
        `(("automake" ,automake)
          ("autoreconf" ,autoconf))))
      (arguments
 -     `(#:phases
 +     `(#:configure-flags '("CFLAGS=-fcommon")
 +       #:phases
         (modify-phases %standard-phases
           (replace 'bootstrap
             ;; The bundled autogen.sh script unconditionally runs ./configure.
@@@ -8497,9 -8520,10 +8506,9 @@@ download and unpack them separately."
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "CPATH"
 -                     (string-append (assoc-ref inputs "sdl")
 -                                    "/include/SDL:"
 -                                    (or (getenv "CPATH") "")))
 -             #t))
 +                     (string-append
 +                      (search-input-file inputs "/include/SDL")
 +                      ":" (or (getenv "CPATH") "")))))
           (add-after 'unpack 'fix-compilation-errors
             (lambda _
               (substitute* "mrt/base_file.h"
@@@ -8646,9 -8670,10 +8655,9 @@@ affected by the gravity of the planets.
           (add-after 'set-paths 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "CPATH"
 -                     (string-append (assoc-ref inputs "sdl")
 -                                    "/include/SDL:"
 -                                    (or (getenv "CPATH") "")))
 -             #t)))))
 +                     (string-append
 +                      (search-input-file inputs "/include/SDL")
 +                      ":" (or (getenv "CPATH") ""))))))))
      (inputs
       `(("fontconfig" ,fontconfig)
         ("freeglut" ,freeglut)
@@@ -8764,9 -8789,10 +8773,9 @@@ where the player draws runes in real ti
                     (add-before 'build 'fix-env
                       (lambda* (#:key inputs #:allow-other-keys)
                         (setenv "CPATH"
 -                               (string-append (assoc-ref inputs "sdl2-union")
 -                                              "/include/SDL2:"
 -                                              (or (getenv "CPATH") "")))
 -                       #t)))))
 +                               (string-append
 +                                (search-input-file inputs "/include/SDL2")
 +                                ":" (or (getenv "CPATH") ""))))))))
      (inputs
       `(("sdl2-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
         ("zlib" ,zlib)))
@@@ -8957,8 -8983,10 +8966,8 @@@ action RPGs."
             ;; parameters.
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
 -                    (bash (string-append (assoc-ref inputs "bash")
 -                                         "/bin/bash"))
 -                    (flare (string-append (assoc-ref inputs "flare-engine")
 -                                          "/bin/flare"))
 +                    (bash (search-input-file inputs "/bin/bash"))
 +                    (flare (search-input-file inputs "/bin/flare"))
                      (script (string-append out "/bin/flare-game")))
                 (mkdir-p (dirname script))
                 (call-with-output-file script
@@@ -10426,7 -10454,7 +10435,7 @@@ This package is part of the KDE games m
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
                 (wrap-program (string-append out "/bin/kajongg")
 -                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
                 #t))))))
      (native-inputs
       `(("extra-cmake-modules" ,extra-cmake-modules)
@@@ -11867,7 -11895,8 +11876,7 @@@ and chess engines."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "chessx.pro"
                 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
 -                (string-append (assoc-ref inputs "qttools") "/bin/lrelease")))
 -             #t))
 +                (search-input-file inputs "/bin/lrelease")))))
           (add-after 'fix-paths 'make-qt-deterministic
             (lambda _
               (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
@@@ -12203,7 -12232,8 +12212,7 @@@ game.")  ;thanks to Debian for descript
                 (("/opt/gsasl")
                  (assoc-ref inputs "gsasl"))
                 (("\\$\\$\\{PREFIX\\}/include/libircclient")
 -                (string-append (assoc-ref inputs "libircclient")
 -                               "/include/libircclient"))
 +                (search-input-directory inputs "/include/libircclient"))
                 (("LIB_DIRS =")
                  (string-append "LIB_DIRS = "
                                 (assoc-ref inputs "boost") "/lib")))
@@@ -12449,3 -12479,35 +12458,35 @@@ wreckage.  You're stranded on a desert 
  do so you need to explore the island, find food, build a shelter and try to
  get attention, so you get found.")
        (license license:cc-by4.0))))
+ (define-public fheroes2
+   (package
+     (name "fheroes2")
+     (version "0.9.7")
+     (build-system cmake-build-system)
+     (arguments
+      `(#:tests? #f                      ; no tests
+        #:make-flags '("FHEROES2_STRICT_COMPILATION=1"
+                       "RELEASE=1")))
+     (native-inputs
+      `(("gettext" ,gettext-minimal)))
+     (inputs
+      `(("libpng" ,libpng)
+        ("sdl" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+        ("zlib" ,zlib)))
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ihhub/fheroes2")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "0v3zh8a8yxfikcr5vkmy36c57l4nmwisz13mjavn5f7yrirf86fn"))))
+     (home-page "https://ihhub.github.io/fheroes2/")
+     (synopsis "Turn-based strategy game engine")
+     (description "@code{fheroes2} is an implementation of Heroes of Might and
+ Magic II (aka HOMM2) game engine.  It requires assets and game resources to
+ play; it will look for them at @file{~/.local/share/fheroes2} folder.")
+     (license license:gpl2)))
diff --combined gnu/packages/geo.scm
@@@ -237,6 -237,15 +237,6 @@@ topology functions."
                 (("@pkgdatadir@/org.gnome.Maps")
                  (string-append  (assoc-ref outputs "out") "/bin/gnome-maps")))
               #t))
 -         (add-after 'unpack 'fix-broken-tests
 -           (lambda _
 -             ;; For some reason setting LC_ALL=C and LANG=C as done in the
 -             ;; build system does not prevent these gratuitous commas from
 -             ;; being inserted.
 -             (substitute* "tests/utilsTest.js"
 -               (("1001 m") "1,001 m")
 -               (("1000 ft") "1,000 ft")
 -               (("5282 ft") "5,282 ft"))))
           (add-after 'install 'wrap
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out"))
@@@ -479,12 -488,14 +479,12 @@@ coverages using a SpatiaLite DBMS."
         '("--enable-rttopo=yes")
         #:phases
         (modify-phases %standard-phases
 -         ;; 3 tests are failing, ignore them:
 +         ;; 1 test is failing, ignore it:
           (add-after 'unpack 'ignore-broken-tests
             (lambda _
               (substitute* '("test/Makefile.in")
 -               (("\tcheck_sql_stmt.* (check_sql_.*)" all tiny) (string-append "\t" tiny))
 -               (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
 -               (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
 -             #t)))))
 +               (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
 +                "check_wms$(EXEEXT) ")))))))
      (synopsis "Extend SQLite to support Spatial SQL capabilities")
      (description
       "SpatiaLite is a library intended to extend the SQLite core to support
@@@ -1217,7 -1228,6 +1217,7 @@@ map display.  Downloads map data from 
                       (url "https://github.com/opengribs/XyGrib")
                       (commit (string-append "v" version))))
                (file-name (git-file-name name version))
 +              (patches (search-patches "xygrib-fix-finding-data.patch"))
                (sha256
                 (base32
                  "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
                    #t))))
      (build-system cmake-build-system)
      (arguments
 -     `(#:phases
 +     `(#:configure-flags (list "-DGNU_PACKAGE=ON")
 +
 +       #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-directories
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((jpeg (assoc-ref inputs "openjpeg"))
                     (font (assoc-ref inputs "font-liberation")))
                 (substitute* "CMakeLists.txt"
 -                 ;; Find libjpeg.
 -                 (("/usr") jpeg)
 -                 ;; Fix install locations.
 -                 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
 -                 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
                   ;; Skip looking for the static library.
                   (("\"libnova.a\"") ""))
                 ;; Don't use the bundled font-liberation.
                    (string-append "\"" font "/share/fonts/truetype/\"")))
                 (substitute* "src/util/Util.h"
                   (("pathData\\(\\)\\+\"data/fonts/\"")
 -                  (string-append "\"" font "/share/fonts/\""))))
 -             #t)))
 +                  (string-append "\"" font "/share/fonts/\"")))))))
         #:tests? #f)) ; no tests
      (native-inputs
       `(("qttools" ,qttools)))
         ("proj.4" ,proj.4)
         ("qtbase" ,qtbase-5)
         ("zlib" ,zlib)))
 +    (native-search-paths
 +     (list (search-path-specification
 +            (variable "XDG_DATA_DIRS")
 +            (files '("share")))))
      (synopsis "Weather Forecast Visualization")
      (description
       "XyGrib is a Grib file reader and visualizes meteorological data providing
@@@ -1397,7 -1407,7 +1397,7 @@@ to the OSM opening hours specification.
  (define-public josm
    (package
      (name "josm")
-     (version "18118")
+     (version "18193")
      (source (origin
                (method svn-fetch)
                (uri (svn-reference
                       (recursive? #f)))
                (sha256
                 (base32
-                 "0109ddpxilm7f57n1kl4nf4lw0lh7jfmhfwf724nzlcz4k23mrs0"))
+                 "162hdck29bkag1d97nisx8v7395pdw00bl7nf0p02hr30fc1fcrh"))
                (file-name (string-append name "-" version "-checkout"))
                (modules '((guix build utils)))
              (snippet
@@@ -1707,7 -1717,22 +1707,7 @@@ using the dataset of topographical info
               ;; of QMapShack, but they are not applied by default, for
               ;; some reason...
               (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
 -             (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
 -             #t))
 -         (add-after 'install 'wrap
 -           ;; The program fails to find the QtWebEngineProcess program,
 -           ;; so we set QTWEBENGINEPROCESS_PATH to help it.
 -           (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
 -                   (qtwebengineprocess (string-append
 -                                        (assoc-ref inputs "qtwebengine")
 -                                        "/lib/qt5/libexec/QtWebEngineProcess")))
 -               (for-each (lambda (program)
 -                           (wrap-program program
 -                             `("QTWEBENGINEPROCESS_PATH" =
 -                               (,qtwebengineprocess))))
 -                         (find-files bin ".*")))
 -             #t)))))
 +             (invoke "patch" "-p1" "-i" "FindQuaZip5.patch"))))))
      (synopsis "GPS mapping application")
      (description
       "QMapShack can be used to plan your next outdoor trip or to visualize and
@@@ -1865,8 -1890,7 +1865,8 @@@ exchanged form one Spatial DBMS and th
       `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
                             "-DENABLE_SNDFILE=ON"
                             "-DBUNDLE_TCDATA=ON"
 -                           "-DBUNDLE_GSHHS=CRUDE")
 +                           "-DBUNDLE_GSHHS=CRUDE"
 +                           "-DCMAKE_C_FLAGS=-fcommon")
         #:tests? #f ; No tests defined
         #:phases
         (modify-phases %standard-phases
@@@ -1952,7 -1976,8 +1952,7 @@@ track your position right from your lap
           (modify-phases %standard-phases
             (replace 'configure
               (lambda* (#:key inputs outputs #:allow-other-keys)
 -               (let ((shell (string-append (assoc-ref inputs "bash")
 -                                           "/bin/bash")))
 +               (let ((shell (search-input-file inputs "/bin/bash")))
                   (setenv "SHELL" shell)
                   (setenv "CONFIG_SHELL" shell)
                   (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
@@@ -2125,7 -2150,8 +2125,7 @@@ growing set of geoscientific methods."
           (replace 'check
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "HOME" "/tmp")
 -             (system (string-append (assoc-ref inputs "xorg-server")
 -                                    "/bin/Xvfb :1 &"))
 +             (system "Xvfb :1 &")
               (setenv "DISPLAY" ":1")
               (setenv "TRAVIS" "true")
               (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
                               "PyCoreAdittions"
                               "PyQgsAnnotation"
                               "PyQgsAppStartup"
 +                             "PyQgsAuthBasicMethod"
                               "PyQgsAuthenticationSystem"
                               "PyQgsAuxiliaryStorage"
                               "PyQgsDBManagerGpkg"
diff --combined gnu/packages/gnome.scm
@@@ -60,8 -60,6 +60,8 @@@
  ;;; Copyright © 2020, 2021 Sébastien Lerique <sl@eauchat.org>
  ;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
  ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
 +;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 +;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
    #:use-module (gnu packages lirc)
    #:use-module (gnu packages lua)
    #:use-module (gnu packages mail)
 +  #:use-module (gnu packages man)
    #:use-module (gnu packages mp3)
    #:use-module (gnu packages multiprecision)
    #:use-module (gnu packages music)
@@@ -962,7 -959,7 +962,7 @@@ cloud integration is offered through GN
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
                   `("GST_PLUGIN_SYSTEM_PATH" = (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
                   `("GRL_PLUGIN_PATH" = (,(getenv "GRL_PLUGIN_PATH")))
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))))
               #t)))))
      (native-inputs
       `(("desktop-file-utils" ,desktop-file-utils)
@@@ -1126,15 -1123,21 +1126,15 @@@ freedesktop.org desktop notification sp
                  "1x8yvjy0yg17qyhmqws8xh2k8dvzrhpwqz7j1cfwzalrb1i9c5g8"))))
      (build-system meson-build-system)
      (arguments
 -     `(#:meson ,meson-0.55
 -       #:phases
 +     `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "util/mm-common-prepare.in"
 -              (("ln") (string-append (assoc-ref inputs "coreutils")
 -                                     "/bin/ln"))
 -              (("cp") (string-append (assoc-ref inputs "coreutils")
 -                                     "/bin/cp"))
 -              (("sed") (string-append (assoc-ref inputs "sed")
 -                                      "/bin/sed"))
 -              (("cat") (string-append (assoc-ref inputs "coreutils")
 -                                      "/bin/cat")))
 -             #t)))))
 +               (("ln") (search-input-file inputs "/bin/ln"))
 +               (("cp") (search-input-file inputs "/bin/cp"))
 +               (("sed") (search-input-file inputs "/bin/sed"))
 +               (("cat") (search-input-file inputs "/bin/cat"))))))))
      (native-inputs
       `(("coreutils" ,coreutils)
         ("gettext" ,gettext-minimal)
@@@ -1426,6 -1429,8 +1426,6 @@@ and implementation of UPnP A/V profiles
                 (base32
                  "1mlw1qgj8nkd9ll6b6h54r1gfdy3zp8a8xqz7qfyfaj85jjgbph7"))))
      (build-system meson-build-system)
 -    (arguments
 -     `(#:meson ,meson-next))
      (native-inputs
       `(("glib:bin" ,glib "bin")
         ("pkg-config" ,pkg-config)))
@@@ -1800,7 -1805,7 +1800,7 @@@ either on a local, or remote machine vi
  (define-public gnome-commander
    (package
      (name "gnome-commander")
-     (version "1.10.3")
+     (version "1.12.2")
      (source
       (origin
         (method url-fetch)
                             (version-major+minor version)  "/"
                             "gnome-commander-" version ".tar.xz"))
         (sha256
-         (base32 "0bis36awb73vhkncq8yr0qlnyaxynqkvmyqbg57ijqwd0m8hh4zg"))))
+         (base32 "0f7l2pkyh3r1qk4hhavl7387l3bq5my3snpdppiavcpnji28dpa5"))))
      (build-system glib-or-gtk-build-system)
      (native-inputs
       `(("desktop-file-utils" ,desktop-file-utils)
 -       ("gcc" ,gcc-8) ;required for -Wcast-function-type
         ("gettext" ,gettext-minimal)
         ("glib:bin" ,glib "bin")
         ("gobject-introspection" ,gobject-introspection)
@@@ -1949,15 -1955,13 +1949,15 @@@ formats like PNG, SVG, PDF and EPS."
      (arguments
       '(#:phases
         (modify-phases %standard-phases
 +         (add-before 'check 'set-home-for-tests
 +           (lambda _
 +             (setenv "HOME" "/tmp")))
           (add-before 'check 'disable-failing-tests
             (lambda _
               ;; The PicasaWeb API tests fail with gnome-online-accounts@3.24.2.
               ;; They have been removed in libgdata 0.17.6, so just do the same.
               (substitute* "gdata/tests/Makefile"
 -               (("picasaweb\\$\\(EXEEXT\\) ") ""))
 -             #t)))))
 +               (("picasaweb\\$\\(EXEEXT\\) ") "")))))))
      (native-inputs
       `(("glib:bin" ,glib "bin")
         ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
@@@ -2185,11 -2189,10 +2185,11 @@@ offline sources, providing a centralize
               ;; Tests require a running X server and locales.
               (system "Xvfb :1 &")
               (setenv "DISPLAY" ":1")
 +             (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache")
 +             (setenv "XDG_CONFIG_HOME" "/tmp")
               (setenv "GUIX_LOCPATH"
 -                     (string-append (assoc-ref inputs "glibc-locales")
 -                                    "/lib/locale"))
 -             #t)))))
 +                     (search-input-directory inputs
 +                                             "lib/locale")))))))
      (native-inputs
       `(("glib:bin" ,glib "bin") ; for gdbus-codegen
         ("glibc-locales" ,glibc-locales) ; for tests
@@@ -2575,30 -2578,24 +2575,30 @@@ forgotten when the session ends."
  (define-public evince
    (package
      (name "evince")
 -    (version "3.36.5")
 +    (version "40.2")
      (source (origin
 -             (method url-fetch)
 -             (uri (string-append "mirror://gnome/sources/evince/"
 -                                 (version-major+minor version) "/"
 -                                 "evince-" version ".tar.xz"))
 -             (sha256
 -              (base32
 -               "0z79jl0j9xq9wgwkfr0d1w1qrdy4447y8shs407n5srr0vixc3bg"))))
 -    (build-system glib-or-gtk-build-system)
 +              (method url-fetch)
 +              (uri "mirror://gnome/sources/evince/40/evince-40.2.tar.xz")
 +              (sha256
 +               (base32
 +                "0xrwls1bhvny8vvd7mfjy9p26zjch0pd6x6j9jn9g2ka6xwyrxqg"))))
 +    (build-system meson-build-system)
      (arguments
 -     `(#:configure-flags '("--disable-nautilus" "--enable-introspection")
 +     `(#:glib-or-gtk? #t
 +       #:build-type "release"
 +       #:configure-flags
 +       '("-Dnautilus=false"
 +         "-Dintrospection=true"
 +         ;; XXX: Generating the documentation fails because the
 +         ;; libevdocument.devhelp document cannot be created. This seems to be
 +         ;; caused by a problem during the XSL transformation.
 +         "-Dgtk_doc=false")
         #:phases
         (modify-phases %standard-phases
 -         (add-before 'install 'skip-gtk-update-icon-cache
 +         (add-after 'unpack 'skip-gtk-update-icon-cache
             ;; Don't create 'icon-theme.cache'.
             (lambda _
 -             (substitute* "data/Makefile"
 +             (substitute* "meson_post_install.py"
                 (("gtk-update-icon-cache") "true"))
               #t)))))
      (inputs
         ("dconf" ,dconf)
         ("libcanberra" ,libcanberra)
         ("libsecret" ,libsecret)
 -
 -       ;; For tests.
 -       ("dogtail" ,python2-dogtail)))
 +       ("libhandy" ,libhandy)))
      (native-inputs
       `(("itstool" ,itstool)
         ("intltool" ,intltool)
@@@ -2676,7 -2675,7 +2676,7 @@@ on the GNOME Desktop with a single simp
       `(("glib" ,glib)
         ("gnome-backgrounds" ,gnome-backgrounds)))
      (native-inputs
 -     `(("intltool" ,intltool)
 +     `(("gettext" ,gettext-minimal)
         ("glib" ,glib "bin")                       ; glib-compile-schemas, etc.
         ("gobject-introspection" ,gobject-introspection)
         ("pkg-config" ,pkg-config)))
@@@ -2757,7 -2756,7 +2757,7 @@@ and how they are displayed (View)."
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                 #t))))))
      (native-inputs
@@@ -2859,15 -2858,15 +2859,15 @@@ GNOME and KDE desktops to the icon name
  (define-public adwaita-icon-theme
    (package (inherit gnome-icon-theme)
      (name "adwaita-icon-theme")
 -    (version "3.34.3")
 +    (version "40.1.1")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/" name "/"
 -                                  (version-major+minor version) "/"
 +                                  (version-major version) "/"
                                    name "-" version ".tar.xz"))
                (sha256
                 (base32
 -                "025rj1fskw1y448hiar4a9icyzpyr242nlh9xhsmyp8jb71dihp7"))))
 +                "1xpqa1rgmixlp953938d08xvf7kv36h747ysial8g65dsrp46v0b"))))
      (native-inputs
       `(("gtk-encode-symbolic-svg" ,gtk+ "bin")))))
  
@@@ -3090,7 -3089,7 +3090,7 @@@ some form of information without gettin
  (define-public libpeas
    (package
      (name "libpeas")
 -    (version "1.28.0")
 +    (version "1.30.0")
      (source
       (origin
        (method url-fetch)
                            name "-" version ".tar.xz"))
        (sha256
         (base32
 -        "05cb7drn6arc4gi02wgsvzibigi2riz5gnfnmlb0zmbfnj9ikna2"))))
 +        "18xrk1c1ixlhkmykcfiafrl2am470ws687xqvjlq40zwkcp5dx8b"))))
      (build-system meson-build-system)
      (arguments
       '(#:phases
               (let ((xorg-server (assoc-ref inputs "xorg-server"))
                     (disp ":1"))
                 (setenv "DISPLAY" disp)
 +               (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache")
 +               (setenv "XDG_CONFIG_HOME" "/tmp")
                 ;; Tests require a running X server.
                 (system (format #f "~a/bin/Xvfb ~a &" xorg-server disp))
                 #t))))))
@@@ -3179,7 -3176,7 +3179,7 @@@ API add-ons to make GTK+ widgets OpenGL
  (define-public glade3
    (package
      (name "glade")
 -    (version "3.36.0")
 +    (version "3.38.2")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/" name "/"
                                    name "-" version ".tar.xz"))
                (sha256
                 (base32
 -                "023gx8rj51njn8fsb6ma5kz1irjpxi4js0n8rwy22inc4ysldd8r"))))
 -    (build-system glib-or-gtk-build-system)
 +                "1dxsiz9ahqkxg2a1dw9sbd8jg59y5pdz4c1gvnbmql48gmj8gz4q"))
 +              (patches (search-patches
 +                        "glade-gls-set-script-name.patch"
 +                        "glade-test-widget-null-icon.patch"))))
 +    (build-system meson-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
 +         (add-after 'unpack 'skip-gtk-update-icon-cache
 +           ;; Don't create 'icon-theme.cache'.
 +           (lambda _
 +             (substitute* "meson_post_install.py"
 +               (("gtk-update-icon-cache") "true"))))
 +         ;; XXX: Remove it once this issue is fixed:
 +         ;; https://issues.guix.gnu.org/50105.
 +         (add-after 'unpack 'fix-tests
 +           (lambda _
 +             (substitute* "tests/meson.build"
 +               (("\\['modules") "#['modules"))))
           (add-before 'configure 'fix-docbook
             (lambda* (#:key inputs #:allow-other-keys)
 -             (substitute* "man/Makefile.in"
 +             (substitute* "man/meson.build"
                 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
                  (string-append (assoc-ref inputs "docbook-xsl")
                                 "/xml/xsl/docbook-xsl-"
         ("libxslt" ,libxslt) ;for xsltproc
         ("docbook-xml" ,docbook-xml-4.2)
         ("docbook-xsl" ,docbook-xsl)
 -       ("python" ,python-2)
 +       ("glib:bin" ,glib "bin")
 +       ("python-pygobject" ,python-pygobject)
 +       ("gobject-introspection" ,gobject-introspection)
 +       ("gjs" ,gjs)
         ("pkg-config" ,pkg-config)
         ("xorg-server" ,xorg-server-for-tests)))
      (home-page "https://glade.gnome.org")
@@@ -3294,70 -3274,104 +3294,70 @@@ XML/CSS rendering engine."
                (sha256
                 (base32
                  "0kbpp9ksl7977xiga37sk1gdw1r039v6zviqznl7alvvg39yp26i"))))
 -    (build-system gnu-build-system)
 -    (arguments
 -     '(#:configure-flags '("--disable-static")))
 -    (native-inputs
 -     `(("pkg-config" ,pkg-config)
 -       ("gettext" ,gettext-minimal)
 -
 -       ;; For tests.
 -       ("perl" ,perl)
 -       ("perl-xml-parser" ,perl-xml-parser)))
 -    (inputs
 -     `(("zlib" ,zlib)
 -       ("bzip2" ,bzip2)))
 -    (propagated-inputs
 -     `(("gdk-pixbuf" ,gdk-pixbuf)
 -       ("glib" ,glib)
 -       ("libxml2" ,libxml2)))
 -    (home-page "https://www.gnome.org/projects/libgsf")
 -    (synopsis "GNOME's Structured File Library")
 -    (description
 -     "Libgsf aims to provide an efficient extensible I/O abstraction for
 -dealing with different structured file formats.")
 -
 -    ;; LGPLv2.1-only.
 -    (license license:lgpl2.1)))
 -
 -(define-public librsvg
 -  (package
 -    (name "librsvg")
 -    (version "2.40.21")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "mirror://gnome/sources/" name "/"
 -                                  (version-major+minor version)  "/"
 -                                  name "-" version ".tar.xz"))
 -              (sha256
 -               (base32
 -                "1fljkag2gr7c4k5mn798lgf9903xslz8h51bgvl89nnay42qjqpp"))))
 -    (build-system gnu-build-system)
 +    (build-system glib-or-gtk-build-system)
 +    (outputs '("out" "bin" "doc"))
      (arguments
       `(#:configure-flags
 -       (list "--disable-static"
 -             "--enable-vala") ; needed for e.g. gnome-mines
 +       (list
 +        "--disable-static"
 +        "--enable-introspection"
 +        (string-append "--with-gir-dir="
 +                       (assoc-ref %outputs "out")
 +                       "/share/gir-"
 +                       ,(version-major
 +                         (package-version gobject-introspection))
 +                       ".0")
 +        (string-append "--with-typelib-dir="
 +                       (assoc-ref %outputs "out")
 +                       "/lib/girepository-"
 +                       ,(version-major
 +                         (package-version gobject-introspection))
 +                       ".0")
 +        (string-append "--with-html-dir="
 +                       (assoc-ref %outputs "doc")
 +                       "/share/gtk-doc/html")
 +        "--with-zlib"
 +        "--with-bz2")
         #:phases
         (modify-phases %standard-phases
 -         (add-before 'configure 'pre-configure
 +         (add-after 'unpack 'patch-docbook-xml
             (lambda* (#:key inputs #:allow-other-keys)
 -             (substitute* "gdk-pixbuf-loader/Makefile.in"
 -               ;; By default the gdk-pixbuf loader is installed under
 -               ;; gdk-pixbuf's prefix.  Work around that.
 -               (("gdk_pixbuf_moduledir = .*$")
 -                (string-append "gdk_pixbuf_moduledir = "
 -                               "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
 -                                "loaders\n"))
 -               ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
 -               (("gdk_pixbuf_cache_file = .*$")
 -                "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))
 -             #t))
 -         (add-before 'check 'remove-failing-tests
 -           (lambda _
 -             (with-directory-excursion "tests/fixtures/reftests"
 -               (for-each delete-file
 -                         '(;; This test fails on i686:
 -                           "svg1.1/masking-path-04-b.svg"
 -                           ;; This test fails on armhf:
 -                           "svg1.1/masking-mask-01-b.svg"
 -                           ;; This test fails on aarch64:
 -                           "bugs/777834-empty-text-children.svg")))
 +             (with-directory-excursion "doc"
 +               (substitute* "gsf-docs.xml"
 +                 (("http://www.oasis-open.org/docbook/xml/4.5/")
 +                  (string-append (assoc-ref inputs "docbook-xml")
 +                                 "/xml/dtd/docbook/"))))
               #t)))))
      (native-inputs
 -     `(("pkg-config" ,pkg-config)
 -       ("vala" ,vala)
 -       ("glib" ,glib "bin")                               ; glib-mkenums, etc.
 -       ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
 +     `(("docbook-xml" ,docbook-xml)
 +       ("gettext" ,gettext-minimal)
 +       ("gobject-introspection" ,gobject-introspection)
 +       ("perl" ,perl)
 +       ("perl-xml-parser" ,perl-xml-parser)
 +       ("pkg-config" ,pkg-config)
 +       ("python" ,python-wrapper)))
      (inputs
 -     `(;; XXX: 1.44 causes some test failures, so we stick with 1.42 for
 -       ;; this ancient version of librsvg.
 -       ("pango" ,pango-1.42)
 -       ("libcroco" ,libcroco)
 -       ("bzip2" ,bzip2)
 -       ("libgsf" ,libgsf)
 -       ("libxml2" ,libxml2)))
 -    (propagated-inputs
 -     ;; librsvg-2.0.pc refers to all of that.
 -     `(("cairo" ,cairo)
 +     `(("bzip2" ,bzip2)
         ("gdk-pixbuf" ,gdk-pixbuf)
 -       ("glib" ,glib)))
 -    (home-page "https://wiki.gnome.org/LibRsvg")
 -    (synopsis "Render SVG files using Cairo")
 -    (description
 -     "Librsvg is a C library to render SVG files using the Cairo 2D graphics
 -library.")
 -    (license license:lgpl2.0+)))
 +       ("zlib" ,zlib)))
 +    (propagated-inputs
 +     `(("glib" ,glib)
 +       ("libxml2" ,libxml2)))
 +    (synopsis "G Structured File Library")
 +    (description "Libgsf aims to provide an efficient extensible I/O abstraction
 +for dealing with different structured file formats.")
 +    (home-page "https://gitlab.gnome.org/GNOME/libgsf")
 +    (license
 +     (list
 +      ;; Library
 +      license:lgpl2.1+
 +      ;; Others
 +      license:lgpl2.0+))))
  
 -(define-public librsvg-next
 +(define-public librsvg
    (package
      (name "librsvg")
 -    (version "2.50.3")
 +    (version "2.50.7")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/librsvg/"
                                    "librsvg-" version ".tar.xz"))
                (sha256
                 (base32
 -                "0n79i4wj9hm0d3bbn4xvknq5ylhqs16pvhaqr1rxspx9wfc8lad4"))
 +                "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz"))
                (modules '((guix build utils)))
                (snippet
 -               '(begin (delete-file-recursively "vendor")
 -                       #t))))
 +               '(begin (delete-file-recursively "vendor")))))
      (build-system cargo-build-system)
      (outputs '("out" "doc"))
      (arguments
                 (substitute* "rsvg-docs.xml"
                   (("http://www.oasis-open.org/docbook/xml/4.3/")
                    (string-append (assoc-ref inputs "docbook-xml")
 -                                 "/xml/dtd/docbook/"))))
 -             #t))
 +                                 "/xml/dtd/docbook/"))))))
           (add-after 'unpack 'prepare-for-build
             (lambda _
               ;; In lieu of #:make-flags
               ;; Something about the build environment resists building
               ;; successfully with the '--locked' flag.
               (substitute* '("Makefile.am" "Makefile.in")
 -               (("--locked") ""))
 -             #t))
 +               (("--locked") ""))))
           (add-before 'configure 'pre-configure
             (lambda _
               (substitute* "gdk-pixbuf-loader/Makefile.in"
                                 "loaders\n"))
                 ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
                 (("gdk_pixbuf_cache_file = .*$")
 -                "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))
 -             #t))
 +                "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))))
           (add-after 'configure 'gnu-configure
 -           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
 -             ((assoc-ref gnu:%standard-phases 'configure)
 -              #:native-inputs native-inputs
 -              #:inputs inputs
 -              #:outputs outputs
 -              #:configure-flags
 -              (list "--disable-static"
 -                    "--enable-vala"
 -               (string-append "--with-html-dir="
 -                              (assoc-ref %outputs "doc")
 -                              "/share/gtk-doc/html")))))
 +           (lambda* (#:key outputs #:allow-other-keys #:rest args)
 +             (apply (assoc-ref gnu:%standard-phases 'configure)
 +                    #:configure-flags
 +                    (list "--disable-static"
 +                          "--enable-vala"
 +                          (string-append "--with-html-dir="
 +                                         (assoc-ref outputs "doc")
 +                                         "/share/gtk-doc/html"))
 +                    args)))
           (add-after 'configure 'dont-vendor-self
             (lambda* (#:key vendor-dir #:allow-other-keys)
               ;; Don't keep the whole tarball in the vendor directory
               (delete-file-recursively
 -              (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
 -             #t))
 +              (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
           (replace 'build
             (assoc-ref gnu:%standard-phases 'build))
           (add-before 'check 'ignore-failing-tests
                 (("fn multiple_input_files_not_allowed_for_png_output" all)
                  (string-append "#[ignore] " all))
                 (("fn stylesheet_option_error" all)
 -                (string-append "#[ignore] " all)))
 -             #t))
 +                (string-append "#[ignore] " all)))))
           (replace 'check
             (lambda* args
               ((assoc-ref gnu:%standard-phases 'check)
@@@ -4177,7 -4199,7 +4177,7 @@@ engineering."
  (define-public drawing
    (package
      (name "drawing")
-     (version "0.8.2")
+     (version "0.8.3")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0lpszd8276rp5chn84rkvwmnflxc3pqlg4cz53gfxkqdb3gn02zz"))))
+         (base32 "0wz9p47riyy3h8b0sqsb6bx416hc6d1a1wyzlfmsxkrqrkwcjcm8"))))
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
-                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
-                #t))))))
+                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
      (native-inputs
       `(("desktop-file-utils" ,desktop-file-utils)
         ("gettext" ,gettext-minimal)
@@@ -4313,58 -4334,61 +4312,58 @@@ passwords in the GNOME keyring."
  (define-public vala
    (package
      (name "vala")
 -    (version "0.46.5")
 +    (version "0.52.0")
      (source (origin
                (method url-fetch)
 -              (uri (string-append "mirror://gnome/sources/" name "/"
 +              (uri (string-append "mirror://gnome/sources/vala/"
                                    (version-major+minor version) "/"
 -                                  name "-" version ".tar.xz"))
 +                                  "vala-" version ".tar.xz"))
                (sha256
                 (base32
 -                "07fv895sp9wq74b20qig7hic0r4ynrr5pfaqba02r44xb794fy0s"))))
 -    (build-system gnu-build-system)
 +                "12y6p8wdjp01vmfhxg2cgh32xnyqq6ivblvrar9clnj6vc867qhx"))))
 +    (build-system glib-or-gtk-build-system)
      (arguments
 -     '(#:phases
 +     '(#:configure-flags '("--enable-coverage")
 +       #:phases
         (modify-phases %standard-phases
 +         (add-after 'unpack 'patch-docbook-xml
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (with-directory-excursion "doc/manual"
 +               (substitute* '("manual.xml" "version.xml.in")
 +                 (("http://www.oasis-open.org/docbook/xml/4.4/")
 +                  (string-append (assoc-ref inputs "docbook-xml")
 +                                 "/xml/dtd/docbook/"))))
 +             #t))
           (add-before 'check 'pre-check
 -                     (lambda _
 -                       (setenv "CC" "gcc")
 -                       (substitute* "valadoc/tests/testrunner.sh"
 -                         (("export PKG_CONFIG_PATH=" m)
 -                          (string-append m "$PKG_CONFIG_PATH:")))
 -                       ;; For missing '/etc/machine-id'.
 -                       (setenv "DBUS_FATAL_WARNINGS" "0")
 -                       #t)))))
 +           (lambda _
 +             (setenv "CC" "gcc")
 +             (substitute* "valadoc/tests/libvaladoc\
 +/tests-extra-environment.sh"
 +               (("export PKG_CONFIG_PATH=" m)
 +                (string-append m "$PKG_CONFIG_PATH:"))))))))
      (native-inputs
 -     `(("pkg-config" ,pkg-config)
 +     `(("bison" ,bison)
 +       ("dbus" ,dbus)                   ; for dbus tests
 +       ("docbook-xml" ,docbook-xml-4.4)
 +       ("docbook-xsl" ,docbook-xsl)
         ("flex" ,flex)
 -       ("bison" ,bison)
 -       ("xsltproc" ,libxslt)
 -       ("dbus" ,dbus)                                     ; for dbus tests
 -       ("gobject-introspection" ,gobject-introspection))) ; for gir tests
 -    (inputs
 -     `(("graphviz" ,graphviz)))
 +       ("gobject-introspection" ,gobject-introspection) ; for gir tests
 +       ("help2man" ,help2man)
 +       ("perl" ,perl)
 +       ("pkg-config" ,pkg-config)
 +       ("xsltproc" ,libxslt)))
      (propagated-inputs
 -     `(("glib" ,glib))) ; required by libvala-0.40.pc
 +     `(("glib" ,glib)                   ; required by libvala-0.40.pc
 +       ("libgvc" ,graphviz)))
      (home-page "https://wiki.gnome.org/Projects/Vala/")
 -    (synopsis "Compiler for the GObject type system")
 -    (description
 -     "Vala is a programming language that aims to bring modern programming
 -language features to GNOME developers without imposing any additional runtime
 -requirements and without using a different ABI compared to applications and
 -libraries written in C.")
 +    (synopsis "Compiler using the GObject type system")
 +    (description "Vala is a programming language using modern high level
 +abstractions without imposing additional runtime requirements and without using
 +a different ABI compared to applications and libraries written in C.  Vala uses
 +the GObject type system and has additional code generation routines that make
 +targeting the GNOME stack simple.")
      (license license:lgpl2.1+)))
  
 -(define-public vala-0.50
 -  (package
 -    (inherit vala)
 -    (version "0.50.2")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "mirror://gnome/sources/vala/"
 -                                  (version-major+minor version) "/"
 -                                  "vala-" version ".tar.xz"))
 -              (sha256
 -               (base32
 -                "1nnf0x6vk0a9p2y6z7jwjfvmlxh3qhj581v381r0y1sxsv35s39c"))))))
 -
  (define-public vte
    (package
      (name "vte")
@@@ -4560,7 -4584,7 +4559,7 @@@ configuration storage systems."
  (define-public json-glib
    (package
      (name "json-glib")
 -    (version "1.4.4")
 +    (version "1.6.2")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/" name "/"
                                    name "-" version ".tar.xz"))
                (sha256
                 (base32
 -                "0ixwyis47v5bkx6h8a1iqlw3638cxcv57ivxv4gw2gaig51my33j"))))
 +                "092g2dyy1hhl0ix9kp33wcab0pg1qicnsv0cj5ms9g9qs336cgd3"))))
      (build-system meson-build-system)
 +    (outputs '("out" "doc"))
 +    (arguments
 +     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
 +       #:configure-flags
 +       (list
 +        "-Ddocs=true"
 +        "-Dman=true")
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-after 'unpack 'patch-docbook
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (with-directory-excursion "doc"
 +               (substitute* (find-files "." "\\.xml$")
 +                 (("http://www.oasis-open.org/docbook/xml/4\\.3/")
 +                  (string-append (assoc-ref inputs "docbook-xml")
 +                                 "/xml/dtd/docbook/")))
 +               (substitute* "meson.build"
 +                 (("http://docbook.sourceforge.net/release/xsl/current/")
 +                  (string-append (assoc-ref inputs "docbook-xsl")
 +                                 "/xml/xsl/docbook-xsl-1.79.2/"))))
 +             #t))
 +         (add-after 'install 'move-docs
 +           (lambda* (#:key outputs #:allow-other-keys)
 +             (let* ((out (assoc-ref outputs "out"))
 +                    (doc (assoc-ref outputs "doc")))
 +               (mkdir-p (string-append doc "/share"))
 +               (rename-file
 +                (string-append out "/share/gtk-doc")
 +                (string-append doc "/share/gtk-doc"))
 +               #t))))))
      (native-inputs
 -     `(("gettext" ,gettext-minimal)
 -       ("glib" ,glib "bin")              ;for glib-mkenums and glib-genmarshal
 +     `(("docbook-xml" ,docbook-xml-4.3)
 +       ("docbook-xsl" ,docbook-xsl)
 +       ("gettext" ,gettext-minimal)
 +       ("glib" ,glib "bin")      ;for glib-mkenums and glib-genmarshal
         ("gobject-introspection" ,gobject-introspection)
 -       ("pkg-config" ,pkg-config)))
 +       ("gtk-doc" ,gtk-doc)
 +       ("pkg-config" ,pkg-config)
 +       ("xsltproc" ,libxslt)))
      (propagated-inputs
 -     `(("glib" ,glib)))                         ;according to json-glib-1.0.pc
 +     `(("glib" ,glib)))                 ;according to json-glib-1.0.pc
      (home-page "https://wiki.gnome.org/Projects/JsonGlib")
 -    (synopsis "Compiler for the GObject type system")
 -    (description
 -     "JSON-GLib is a C library based on GLib providing serialization and
 -deserialization support for the JavaScript Object Notation (JSON) format
 -described by RFC 4627.  It provides parser and generator GObject classes and
 -various wrappers for the complex data types employed by JSON, such as arrays
 -and objects.")
 +    (synopsis "Glib and GObject implementation of JSON")
 +    (description "JSON-GLib is a library providing serialization and
 +described by RFC 4627.  It implements a full JSON parser and generator using
 +GLib and GObject, and integrates JSON with GLib data types.")
      (license license:lgpl2.1+)))
  
  (define-public libxklavier
@@@ -4702,7 -4695,7 +4701,7 @@@ library."
  (define-public glib-networking
    (package
      (name "glib-networking")
 -    (version "2.62.2")
 +    (version "2.68.2")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/glib-networking/"
                                    "glib-networking-" version ".tar.xz"))
                (sha256
                 (base32
 -                "0i2mw75297ql72h47vyvff3hqa0kcmqybblj52fqrarb0kfbhi06"))))
 +                "0kwrsp1xbqf852nqmd5cr7hqw771q0dxkzpzlibdp5zn9q2vqpjk"))
 +              (patches
 +               (search-patches "glib-networking-gnutls-binding.patch"))))
      (build-system meson-build-system)
 -    (arguments
 -     `(#:configure-flags '("-Dlibproxy_support=false")))
      (native-inputs
       `(("pkg-config" ,pkg-config)
 -       ("intltool" ,intltool)))
 +       ("gettext" ,gettext-minimal)))
      (inputs
       `(("glib" ,glib)
         ("gnutls" ,gnutls)
 -       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
 -    (home-page "https://www.gnome.org")
 -    (synopsis "Network-related GIO modules")
 -    (description
 -     "This package contains various network related extensions for the GIO
 -library.")
 -    (license license:lgpl2.0+)))
 +       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
 +       ("libproxy" ,libproxy)))
 +    (home-page "https://wiki.gnome.org/Projects/GLib")
 +    (synopsis "Network extensions for GLib")
 +    (description
 +     "Glib-networking contains the implementations of certain GLib networking
 +features that cannot be implemented directly in GLib itself because of their
 +dependencies.  Currently it contains GnuTLS and OpenSSL-based implementations of
 +GTlsBackend, a libproxy-based implementation of GProxyResolver,
 +GLibproxyResolver, and a GNOME GProxyResolver that uses the proxy information
 +from the GSettings schemas in gsettings-desktop-schemas.")
 +    (license license:lgpl2.1+)))
  
  (define-public rest
    (package
@@@ -4814,10 -4802,49 +4813,10 @@@ libxml to ease remote use of the RESTfu
               (substitute* "tests/hsts-db-test.c"
                 ((".*/hsts-db/subdomains.*") ""))
  
 -             ;; Generate a self-signed certificate that has "localhost" as its
 -             ;; 'dnsName'.  Failing to do that, and starting with GnuTLS
 -             ;; 3.5.12, tests such as "ssl-tests" fail:
 -             ;;
 -             ;; ERROR:ssl-test.c:406:do_tls_interaction_test: Unexpected status 6 Unacceptable TLS certificate (expected 200 OK)
 -             ;;
 -             ;; 'certtool' is interactive so we have to pipe it the answers.
 -             ;; Reported at <https://bugzilla.gnome.org/show_bug.cgi?id=784696>.
 -             (let ((pipe (open-output-pipe "certtool --generate-self-signed \
 - --load-privkey tests/test-key.pem --outfile tests/test-cert.pem")))
 -               (for-each (lambda (line)
 -                           (display line pipe)
 -                           (newline pipe))
 -                         '(""               ;Common name
 -                           ""               ;UID
 -                           "Guix"           ;Organizational unit name
 -                           "GNU"            ;Organization name
 -                           ""               ;Locality name
 -                           ""               ;State or province
 -                           ""               ;Country
 -                           ""               ;subject's domain component (DC)
 -                           ""               ;E-mail
 -                           ""               ;serial number
 -                           "-1"             ;expiration time
 -                           "N"              ;belong to authority?
 -                           "N"              ;web client certificate?
 -                           "N"              ;IPsec IKE?
 -                           "Y"              ;web server certificate?
 -                           "localhost"      ;dnsName of subject
 -                           ""               ;dnsName of subject (end)
 -                           ""               ;URI of subject
 -                           "127.0.0.1"      ;IP address of subject
 -                           ""               ;signing?
 -                           ""               ;encryption (RSA)?
 -                           ""               ;data encryption?
 -                           ""               ;sign OCSP requests?
 -                           ""               ;sign code?
 -                           ""               ;time stamping?
 -                           ""               ;email protection?
 -                           ""               ;URI of the CRL distribution point
 -                           "y"              ;above info OK?
 -                           ))
 -               (close-pipe pipe))
 +             ;; FIXME: ssl-test fails, starting with
 +             ;; glib-networking 2.68.x.
 +             (substitute* "tests/meson.build"
 +               (("[ \t]*\\['ssl', true, \\[\\]\\],") ""))
               #t))
           (add-after 'install 'move-doc
             (lambda* (#:key outputs #:allow-other-keys)
         ("vala" ,vala)
         ("php" ,php)
         ("curl" ,curl)
 -       ("gnutls" ,gnutls)                         ;for 'certtool'
         ("httpd" ,httpd)))
      (propagated-inputs
       ;; libsoup-2.4.pc refers to all of these (except where otherwise noted)
@@@ -5281,7 -5309,9 +5280,7 @@@ permission from user."
           (add-before 'check 'set-locales
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "GUIX_LOCPATH"
 -                     (string-append (assoc-ref inputs "glibc-locales")
 -                                    "/lib/locale"))
 -             #t)))))
 +                     (search-input-directory inputs "lib/locale")))))))
      (native-inputs
       `(("glib:bin" ,glib "bin") ; for glib-mkenums
         ("glibc-locales" ,glibc-locales) ; for tests
@@@ -6226,12 -6256,12 +6225,12 @@@ which can read a large number of file f
                   (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
                   (gst-plugin-path   (getenv "GST_PLUGIN_SYSTEM_PATH"))
                   (grl-plugin-path   (getenv "GRL_PLUGIN_PATH"))
 -                 (python-path       (getenv "PYTHONPATH")))
 +                 (python-path       (getenv "GUIX_PYTHONPATH")))
               (wrap-program (string-append out "/bin/rhythmbox")
                 `("GI_TYPELIB_PATH"        ":" prefix (,gi-typelib-path))
                 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
                 `("GRL_PLUGIN_PATH"        ":" prefix (,grl-plugin-path))
 -               `("PYTHONPATH"             ":" prefix (,python-path))))
 +               `("GUIX_PYTHONPATH"             ":" prefix (,python-path))))
             #t)))))
     (propagated-inputs
      `(("dconf" ,dconf)))
@@@ -6334,7 -6364,7 +6333,7 @@@ supports playlists, song ratings, and a
        ("libexif" ,libexif)
        ("libpeas" ,libpeas)
        ("libjpeg" ,libjpeg-turbo)
 -      ("librsvg" ,librsvg-next)
 +      ("librsvg" ,librsvg)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)))
     (home-page "https://wiki.gnome.org/Apps/EyeOfGnome")
@@@ -6600,7 -6630,7 +6599,7 @@@ almost all of them."
                             ":")))
                 (wrap-program (string-append out "/bin/eolie")
                   `("LD_LIBRARY_PATH" ":" prefix (,path))
 -                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
               #t)))))
      (native-inputs
@@@ -6746,7 -6776,7 +6745,7 @@@ principles are simplicity and standard
              (let ((prog (string-append (assoc-ref outputs "out")
                                         "/bin/d-feet")))
                (wrap-program prog
 -                `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
 +                `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                #t))))))
      (native-inputs
@@@ -6783,17 -6813,10 +6782,17 @@@ of running programs and invoke methods 
         (sha256
          (base32 "1bdpgkzawhqmw52l6zx8czzg1ndfgcf1p44m2bxjdpqkc4afcgqc"))))
      (build-system gnu-build-system)
 +    (arguments
 +     `(#:configure-flags
 +       (list
 +        "--enable-doc")))
      (native-inputs
 -     `(("gettext-minimal" ,gettext-minimal)
 +     `(("ducktype" ,mallard-ducktype)
 +       ("gettext" ,gettext-minimal)
 +       ("intltool" ,intltool)
         ("itstool" ,itstool)
 -       ("xmllint" ,libxml2)))
 +       ("xmllint" ,libxml2)
 +       ("xsltproc" ,libxslt)))
      (synopsis "XSL stylesheets for Yelp")
      (description "Yelp-XSL is a collection of programs and data files to help
  you build, maintain, and distribute documentation.  It provides XSLT stylesheets
@@@ -7111,7 -7134,7 +7110,7 @@@ configuration program to choose applica
  (define-public gjs
    (package
      (name "gjs")
 -    (version "1.58.3")
 +    (version "1.68.2")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnome/sources/" name "/"
                                    name "-" version ".tar.xz"))
                (sha256
                 (base32
 -                "1bkksx362007zs8c31ydygb29spwa5g5kch1ad2grc2sp53wv7ya"))))
 -    (build-system gnu-build-system)
 +                "0c7fclm53v41n5vfndymp35fbh1x218lrk65iqrk1wc2lsnh5zvh"))
 +              (modules '((guix build utils)))
 +              (snippet
 +               '(begin
 +                  (substitute* "installed-tests/scripts/testCommandLine.sh"
 +                    (("Valentín") "")
 +                    (("☭") ""))))))
 +    (build-system meson-build-system)
      (arguments
 -     '(#:phases
 +     '(#:configure-flags '("-Dinstalled_tests=false")
 +       #:phases
         (modify-phases %standard-phases
 -         (add-before
 -          'check 'pre-check
 -          (lambda _
 -            ;; The test suite requires a running X server.
 -            (system "Xvfb :1 &")
 -            (setenv "DISPLAY" ":1")
 -
 -            ;; For the missing /etc/machine-id.
 -            (setenv "DBUS_FATAL_WARNINGS" "0")
 +         (add-before 'check 'pre-check
 +           (lambda _
 +             ;; The test suite requires a running X server.
 +             (system "Xvfb :1 &")
 +             (setenv "DISPLAY" ":1")
  
 -            ;; Our mozjs-38 package does not compile the required Intl API
 -            ;; support for these failing tests.
 -            (substitute* "installed-tests/js/testLocale.js"
 -              ((".*toBeDefined.*") "")
 -              ((".*expect\\(datestr\\).*") ""))
 -            (substitute* "installed-tests/scripts/testCommandLine.sh"
 -              (("Valentín") "")
 -              (("☭") ""))
 -            #t)))))
 +             ;; For the missing /etc/machine-id.
 +             (setenv "DBUS_FATAL_WARNINGS" "0"))))))
      (native-inputs
       `(("glib:bin" ,glib "bin")       ; for glib-compile-resources
         ("pkg-config" ,pkg-config)
       ;; These are all in the Requires.private field of gjs-1.0.pc.
       `(("cairo" ,cairo)
         ("gobject-introspection" ,gobject-introspection)
 -       ("mozjs" ,mozjs-60)))
 +       ("mozjs" ,mozjs-78)))
      (inputs
       `(("gtk+" ,gtk+)
         ("readline" ,readline)))
@@@ -7208,11 -7235,11 +7207,11 @@@ javascript engine and the GObject intro
               (let ((out               (assoc-ref outputs "out"))
                     (gtksourceview     (assoc-ref inputs "gtksourceview"))
                     (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
 -                   (python-path       (getenv "PYTHONPATH")))
 +                   (python-path       (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/gedit")
                   ;; For plugins.
                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
 -                 `("PYTHONPATH" ":" prefix (,python-path))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,python-path))
                   ;; For language-specs.
                   `("XDG_DATA_DIRS" ":" prefix (,(string-append gtksourceview
                                                                 "/share")))))
@@@ -7458,20 -7485,18 +7457,20 @@@ Exchange, Last.fm, IMAP/SMTP, Jabber, S
    (package
      (name "evolution-data-server")
      (version "3.34.2")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "mirror://gnome/sources/" name "/"
 -                                  (version-major+minor version) "/"
 -                                  name "-" version ".tar.xz"))
 -              (patches (search-patches "evolution-data-server-locales.patch"
 -                                       "evolution-data-server-libical-compat.patch"
 -                                       "evolution-data-server-CVE-2020-14928.patch"
 -                                       "evolution-data-server-CVE-2020-16117.patch"))
 -              (sha256
 -               (base32
 -                "16z85y6hhazcrp5ngw47w4x9r0j8zrj7awv5im58hhp0xs19zf1y"))))
 +    (source
 +     (origin
 +       (method url-fetch)
 +       (uri (string-append "mirror://gnome/sources/" name "/"
 +                           (version-major+minor version) "/"
 +                           name "-" version ".tar.xz"))
 +       (patches
 +        (search-patches "evolution-data-server-locales.patch"
 +                        "evolution-data-server-libical-compat.patch"
 +                        "evolution-data-server-CVE-2020-14928.patch"
 +                        "evolution-data-server-CVE-2020-16117.patch"
 +                        "evolution-data-server-printableoptions.patch"))
 +       (sha256
 +        (base32 "16z85y6hhazcrp5ngw47w4x9r0j8zrj7awv5im58hhp0xs19zf1y"))))
      (build-system cmake-build-system)
      (arguments
       '(#:configure-flags
@@@ -7577,12 -7602,12 +7576,12 @@@ Evolution (hence the name), but is now 
           (add-after 'install 'wrap-programs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
 -                   (python-path (getenv "PYTHONPATH"))
 +                   (python-path (getenv "GUIX_PYTHONPATH"))
                     (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
                (for-each
                 (lambda (prog)
                   (wrap-program prog
 -                   `("PYTHONPATH"      ":" prefix (,python-path))
 +                   `("GUIX_PYTHONPATH"      ":" prefix (,python-path))
                     `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
                 (list (string-append out "/bin/caribou-preferences")
                       (string-append out "/libexec/antler-keyboard"))))
@@@ -7747,7 -7772,6 +7746,7 @@@ users."
         ("libgudev" ,libgudev)
         ("libndp" ,libndp)
         ("libnl" ,libnl)
 +       ("libselinux" ,libselinux)
         ("libsoup" ,libsoup)
         ("mobile-broadband-provider-info" ,mobile-broadband-provider-info)
         ("modem-manager" ,modem-manager)
@@@ -7793,8 -7817,10 +7792,8 @@@ services."
         (modify-phases %standard-phases
           (add-after 'configure 'patch-path
             (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
 -             (let* ((ovpn (string-append (assoc-ref inputs "openvpn")
 -                                         "/sbin/openvpn"))
 -                    (modprobe (string-append (assoc-ref inputs "kmod")
 -                                             "/bin/modprobe"))
 +             (let* ((ovpn (search-input-file inputs "/sbin/openvpn"))
 +                    (modprobe (search-input-file inputs "/bin/modprobe"))
                      (pretty-ovpn (string-append "\"" ovpn "\"")))
                 (for-each
                  (lambda (file)
@@@ -7847,8 -7873,10 +7846,8 @@@ to virtual private networks (VPNs) via 
         (modify-phases %standard-phases
           (add-after 'configure 'patch-path
             (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
 -             (let* ((vpnc (string-append (assoc-ref inputs "vpnc")
 -                                         "/sbin/vpnc"))
 -                    (modprobe (string-append (assoc-ref inputs "kmod")
 -                                             "/bin/modprobe"))
 +             (let* ((vpnc (search-input-file inputs "/sbin/vpnc"))
 +                    (modprobe (search-input-file inputs "/bin/modprobe"))
                      (pretty-ovpn (string-append "\"" vpnc "\"")))
                 (substitute* "src/nm-vpnc-service.c"
                      (("\"/usr/local/sbin/vpnc\"") pretty-ovpn)
@@@ -7894,9 -7922,10 +7893,9 @@@ Compatible with Cisco VPN concentrator
         (modify-phases %standard-phases
           (add-after 'configure 'patch-path
             (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
 -             (let* ((openconnect (string-append (assoc-ref inputs "openconnect")
 -                                         "/sbin/openconnect"))
 -                    (modprobe (string-append (assoc-ref inputs "kmod")
 -                                             "/bin/modprobe"))
 +             (let* ((openconnect (search-input-file inputs
 +                                                    "/sbin/openconnect"))
 +                    (modprobe (search-input-file inputs "/bin/modprobe"))
                      (pretty-ovpn (string-append "\"" openconnect "\"")))
                 (substitute* "src/nm-openconnect-service.c"
                   (("\"/usr(/local)?/s?bin/openconnect\"") pretty-ovpn)
@@@ -7999,43 -8028,75 +7998,75 @@@ the available networks and allows user
  (define-public libxml++
    (package
      (name "libxml++")
-     (version "3.0.1")
-     (source (origin
-               (method url-fetch)
-               (uri (string-append "mirror://gnome/sources/" name "/"
-                                   (version-major+minor version) "/"
-                                   name "-" version ".tar.xz"))
-               (sha256
-                (base32
-                 "19kik79fmg61nv0by0a5f9wchrcfjwzvih4v2waw01hqflhqvp0r"))))
+     (version "3.2.0")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/libxmlplusplus/libxmlplusplus")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
      (build-system gnu-build-system)
-     ;; libxml++-3.0.pc refers to all these.
+     (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'fix-documentation
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook"))
+                    (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
+                                           "/xml/xsl/docbook-xsl-"
+                                           ,(package-version docbook-xsl))))
+                (substitute* '("examples/dom_xpath/example.xml"
+                               "docs/manual/libxml++_without_code.xml")
+                  (("http://.*/docbookx\\.dtd")
+                   (string-append xmldoc "/docbookx.dtd")))
+                (setenv "SGML_CATALOG_FILES"
+                        (string-append xmldoc "/catalog.xml"))
+                (substitute* "docs/manual/docbook-customisation.xsl"
+                  (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
+                   (string-append xsldoc "/html/chunk.xsl")))))))))
      (propagated-inputs
-      `(("libxml2" ,libxml2)
-        ("glibmm" ,glibmm-2.64)))
+      ;; libxml++-3.0.pc refers to all these.
+      `(("glibmm" ,glibmm)
+        ("libxml2" ,libxml2)))
      (native-inputs
-      `(("perl" ,perl)
+      `(("autoconf" ,autoconf)
+        ("automake" ,automake)
+        ("doxygen" ,doxygen)
+        ("docbook-xml" ,docbook-xml)
+        ("docbook-xsl" ,docbook-xsl)
+        ("graphviz" ,graphviz) ; for dot
+        ("libtool" ,libtool)
+        ("libxslt" ,libxslt)
+        ("mm-common" ,mm-common)
+        ("perl" ,perl)
         ("pkg-config" ,pkg-config)))
-     (home-page "http://libxmlplusplus.sourceforge.net/")
-     (synopsis "C++ wrapper for XML parser library libxml2")
+     (home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
+     (synopsis "C++ bindings to the libxml2 XML parser library")
      (description
-      "This package provides a C++ wrapper for the XML parser library
- libxml2.")
+      "This package provides a C++ interface to the libxml2 XML parser
+ library.")
      (license license:lgpl2.1+)))
  
+ ;; This is the last release providing the 2.6 API, hence the name.
+ ;; This is needed by tascam-gtk
  (define-public libxml++-2
    (package
      (inherit libxml++)
      (name "libxml++")
      (version "2.40.1")
-     (source (origin
-               (method url-fetch)
-               (uri (string-append "mirror://gnome/sources/" name "/"
-                                   (version-major+minor version) "/"
-                                   name "-" version ".tar.xz"))
-               (sha256
-                (base32
-                 "1sb3akryklvh2v6m6dihdnbpf1lkx441v972q9hlz1sq6bfspm2a"))))))
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/libxmlplusplus/libxmlplusplus")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9"))))))
  
  (define-public gdm
    (package
@@@ -8433,10 -8494,9 +8464,10 @@@ properties, screen resolution, and othe
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
 -       #:disallowed-references ((,glib "bin")
 -                                ,inkscape ,libxslt
 -                                ,ruby-sass)
 +       #:disallowed-references ,(list (gexp-input glib "bin")
 +                                      (gexp-input inkscape)
 +                                      (gexp-input libxslt)
 +                                      (gexp-input ruby-sass))
         #:configure-flags
         (list "-Dsystemd=false"
               ;; Otherwise, the RUNPATH will lack the final path component.
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let ((out              (assoc-ref outputs "out"))
                     (gi-typelib-path  (getenv "GI_TYPELIB_PATH"))
 -                   (python-path      (getenv "PYTHONPATH")))
 +                   (python-path      (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/gnome-shell")
                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
                   ;; FIXME: gnome-shell loads these libraries with unqualified
                 (for-each
                  (lambda (prog)
                    (wrap-program (string-append out "/bin/" prog)
 -                    `("PYTHONPATH"      ":" prefix (,python-path))
 +                    `("GUIX_PYTHONPATH"      ":" prefix (,python-path))
                      `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
                  '("gnome-shell-extension-tool" "gnome-shell-perf-tool"))
                 #t)))
@@@ -8895,7 -8955,7 +8926,7 @@@ is complete it provides a graphical rep
           "0zxlwy55fz7i582hch2wnj8zy1kzikssgaix0l2y41ccp5nzpdy2"))))
      (build-system meson-build-system)
      (native-inputs
 -     `(("intltool" ,intltool)))
 +     `(("gettext" ,gettext-minimal)))
      (home-page "https://gitlab.gnome.org/GNOME/gnome-backgrounds")
      (synopsis "Background images for the GNOME desktop")
      (description
@@@ -9283,7 -9343,7 +9314,7 @@@ specified duration and save it as a GI
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                 #t))))))
      (native-inputs
@@@ -9494,13 -9554,13 +9525,13 @@@ desktop.  It supports multiple calendar
                      (lambda* (#:key inputs outputs #:allow-other-keys)
                        (let ((out               (assoc-ref outputs "out"))
                              (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
 -                            (python-path       (getenv "PYTHONPATH")))
 +                            (python-path       (getenv "GUIX_PYTHONPATH")))
                          (wrap-program (string-append out "/bin/gnome-todo")
                            ;; XXX: gi plugins are broken.
                            ;; See https://bugzilla.gnome.org/show_bug.cgi?id=787212
                            ;; For plugins.
                            `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
 -                          `("PYTHONPATH" ":" prefix (,python-path))))
 +                          `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
                        #t)))))
      (native-inputs
       `(("gettext" ,gettext-minimal)
@@@ -9810,7 -9870,7 +9841,7 @@@ handling the startup notification side.
  (define-public gnome-calculator
    (package
      (name "gnome-calculator")
 -    (version "3.34.1")
 +    (version "3.36.0")
      (source
       (origin
         (method url-fetch)
                             name "-" version ".tar.xz"))
         (sha256
          (base32
 -         "0lbh87255zzggqzai6543qg920y52bl4vs5m5h5087ghzg14hlsd"))))
 +         "1cqd4b25qp1i0p04m669jssg1l5sdapc1mniv9jssvw5r7wk1s52"))))
      (build-system meson-build-system)
      (arguments '(#:glib-or-gtk? #t))
      (native-inputs
@@@ -10134,8 -10194,8 +10165,8 @@@ accessibility infrastructure."
                     (,(getenv "GI_TYPELIB_PATH")))
                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix
                     (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
 -                 `("PYTHONPATH" ":" prefix
 -                   (,(getenv "PYTHONPATH")))))
 +                 `("GUIX_PYTHONPATH" ":" prefix
 +                   (,(getenv "GUIX_PYTHONPATH")))))
               #t)))))
      (native-inputs
       `(("intltool" ,intltool)
@@@ -10193,7 -10253,9 +10224,7 @@@ that support the Assistive Technology S
               ;; Allow Enchant and its Aspell backend to find the en_US
               ;; dictionary.
               (setenv "ASPELL_DICT_DIR"
 -                     (string-append (assoc-ref inputs "aspell-dict-en")
 -                                    "/lib/aspell"))
 -             #t)))))
 +                     (search-input-directory inputs "/lib/aspell")))))))
      (inputs
       `(("iso-codes" ,iso-codes)))
      (native-inputs
@@@ -10467,7 -10529,7 +10498,7 @@@ apply fancy special effects and lets yo
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                 #t))))))
      (native-inputs
@@@ -10730,8 -10792,7 +10761,8 @@@ generic enough to work for everyone."
                (sha256
                 (base32
                  "164vy8h432pjglafn8y2ms4gsvk3kbgc63h5qp0mk5dv4smsp29c"))
 -              (patches (search-patches "evolution-CVE-2020-11879.patch"))))
 +              (patches (search-patches "evolution-CVE-2020-11879.patch"
 +                                       "evolution-printableoptions.patch"))))
      (build-system cmake-build-system)
      (arguments
       `(#:imported-modules (,@%cmake-build-system-modules
@@@ -10916,7 -10977,7 +10947,7 @@@ tabs, and it supports drag and drop re-
  (define-public libhandy
    (package
      (name "libhandy")
 -    (version "1.2.2")
 +    (version "1.2.3")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
 -        (base32 "0345x7gif6yjm95y62lww71lj84wfwsr2p32r3iww8shavb8scyk"))))
 +        (base32 "1ng2607cp4dfl169rj7zi8q5p6fzxy3a4l0glm7mj75yd1a603rz"))))
      (build-system meson-build-system)
      (arguments
       `(#:configure-flags
         '("-Dglade_catalog=enabled"
 -         "-Dgtk_doc=true")
 +         ;; XXX: Generating the documentation fails because the
 +         ;; libhandy.devhelp2 document cannot be created. This seems to be
 +         ;; caused by a problem during the XSL transformation.
 +         "-Dgtk_doc=false")
         #:phases
         (modify-phases %standard-phases
 +         (add-after 'unpack 'patch-docbook-xml
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (for-each
 +              (lambda (file)
 +                (substitute* file
 +                  (("http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd")
 +                   (search-input-file inputs
 +                                      "/xml/dtd/docbook/docbookx.dtd"))))
 +              (find-files "doc" "\\.xml"))))
           (add-before 'check 'pre-check
             (lambda _
               ;; Tests require a running X server.
               #t)))))
      (inputs
       `(("gtk+" ,gtk+)
 -       ("glade" ,glade3)
 -       ("libxml2" ,libxml2)))
 +       ("glade" ,glade3)))
      (native-inputs
       `(("glib:bin" ,glib "bin")
         ("gobject-introspection" ,gobject-introspection) ; for g-ir-scanner
         ("vala" ,vala)
 +       ("libxml2" ,libxml2)
 +       ("libxslt" ,libxslt)
 +       ("docbook-xsl" ,docbook-xsl)
 +       ("docbook-xml" ,docbook-xml-4.3)
         ("gtk-doc" ,gtk-doc/stable)
         ("pkg-config" ,pkg-config)
         ("gettext" ,gettext-minimal)
@@@ -11120,7 -11166,8 +11151,7 @@@ repository and commit your work."
      (inputs
       `(("glib" ,glib)))
      (native-inputs
 -     `(("intltool" ,intltool)
 -       ("pkg-config" ,pkg-config)))
 +     `(("pkg-config" ,pkg-config)))
      (home-page "https://people.gnome.org/~veillard/gamin/")
      (synopsis "File alteration monitor")
      (description
@@@ -11470,8 -11517,6 +11501,8 @@@ to."
       `(("gtk+" ,gtk+)
         ("librsvg" ,librsvg)
         ("libxml2" ,libxml2)))
 +    (arguments
 +     `(#:configure-flags '("CFLAGS=-fcommon")))
      (home-page "https://glabels.org/")
      (synopsis "Program for creating labels and business cards")
      (description
@@@ -11551,7 -11596,7 +11582,7 @@@ and toolbars."
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                 #t))))))
      (native-inputs
@@@ -11613,11 -11658,11 +11644,11 @@@ GTK+.  It integrates well with the GNOM
                                             (package-version python))
                                           "/site-packages")))
                 (wrap-program prog
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                 `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
 -                 `("PATH" prefix (,(string-append (assoc-ref inputs "pandoc")
 -                                                  "/bin"))))
 -               #t))))))
 +                 `("PATH" prefix (,(dirname
 +                                    (search-input-file inputs
 +                                                       "/bin/pandoc")))))))))))
      (inputs
       `(("glib" ,glib)
         ("gobject-introspection" ,gobject-introspection)
@@@ -11675,7 -11720,7 +11706,7 @@@ It uses pandoc as back-end for parsing 
                      (pygo (string-append
                             (assoc-ref inputs "python-pygobject") site))
                      (python-wrap
 -                     `("PYTHONPATH" = (,evdev ,pygo))))
 +                     `("GUIX_PYTHONPATH" = (,evdev ,pygo))))
                 (wrap-program (string-append out "/bin/" "ratbagctl")
                   python-wrap)
                 #t))))))
@@@ -12024,7 -12069,7 +12055,7 @@@ integrated profiler via Sysprof, debugg
  (define-public komikku
    (package
      (name "komikku")
-     (version "0.30.0")
+     (version "0.31.0")
      (source
       (origin
         (method git-fetch)
         (file-name (git-file-name name version))
         (sha256
          (base32
-          "1l6iqxa497fisn64mn2qgia4y6zryfa5pbnd8609flfi9qmgrzn7"))))
+          "0vldcjq24y4xxg8dzlyhfpqxbqn5g160lz1lmmkp7g9im2zrxh52"))))
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
              (let ((prog (string-append (assoc-ref outputs "out")
                                         "/bin/komikku")))
                (wrap-program prog
 -                `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
 +                `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                #t))))))
      (inputs
@@@ -12249,7 -12294,7 +12280,7 @@@ world."
                                            (package-version python))
                                          "/site-packages")))
                (wrap-program prog
 -                `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
 +                `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
                  `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
                #t))))))
      (native-inputs
@@@ -1,6 -1,6 +1,6 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  ;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@@ -338,7 -338,8 +338,7 @@@ in C/C++."
                 (let ((out (assoc-ref outputs "out")))
                   (setenv "SHELL" (which "sh"))
                   (setenv "CONFIG_SHELL" (which "sh"))
 -                 (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
 -                                                   "/bin/autoconf"))
 +                 (setenv "AUTOCONF" (which "autoconf"))
                   (apply invoke "./configure"
                          (cons (string-append "--prefix=" out)
                                configure-flags))))))))
    ;; we take the Debian version instead, because it is easier to work with.
    (package
      (inherit mozjs-38)
 -    (version "60.2.3-2")
 +    (version "60.2.3-4")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                (file-name (git-file-name "mozjs" version))
                (sha256
                 (base32
 -                "091w050rwzrdcbgyi934k2viyccmlqxrp13sm2mql71mabb5dai6"))))
 +                "1xl6avsj9gkgma71p56jzs7nasc767k3n1frnmri5pad4rj94bij"))))
      (arguments
       `(#:tests? #f ; FIXME: all tests pass, but then the check phase fails anyway.
         #:test-target "check-jstests"
                 (chdir "run-configure-from-here")
                 (setenv "SHELL" (which "sh"))
                 (setenv "CONFIG_SHELL" (which "sh"))
 -               (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
 -                                                 "/bin/autoconf"))
 +               (setenv "AUTOCONF" (which "autoconf"))
                 (apply invoke "../js/src/configure"
                        (cons (string-append "--prefix=" out)
                              configure-flags))
  (define-public mozjs-78
    (package
      (inherit mozjs-60)
 -    (version "78.5.0")
 +    (version "78.10.1")
      (source (origin
                (method url-fetch)
                ;; TODO: Switch to IceCat source once available on ftp.gnu.org.
                                    version "esr.source.tar.xz"))
                (sha256
                 (base32
 -                "1442yjmwz69hkfcvh8kkb60jf4c9ms0pac04nc3xw2da13v4zxai"))))
 +                "0gyg2p6i1wmmfghwg13pp6fj8j8xz6c14f6bbnf4pf0f5c3la7y4"))))
      (arguments
       `(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
         #:modules ((guix build cargo-utils)
                 (chdir "run-configure-from-here")
                 (setenv "SHELL" (which "sh"))
                 (setenv "CONFIG_SHELL" (which "sh"))
 -               (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
 -                                                 "/bin/autoconf"))
 +               (setenv "AUTOCONF" (which "autoconf"))
                 (apply invoke "../js/src/configure"
                        (cons (string-append "--prefix=" out)
                              configure-flags))
         ("perl" ,perl)
         ("pkg-config" ,pkg-config)
         ("python" ,python-3)
 -       ("rust" ,rust)
 -       ("cargo" ,rust "cargo")))
 +       ("rust" ,rust-1.41)
 +       ("cargo" ,rust-1.41 "cargo")))
      (inputs
 -     `(("icu4c" ,icu4c-68)
 +     `(("icu4c" ,icu4c)
         ("readline" ,readline)
         ("zlib" ,zlib)))))
  
@@@ -692,8 -695,8 +692,8 @@@ from forcing GEXP-PROMISE.
                        #:system system
                        #:guile-for-build guile)))
  
- (define %icecat-version "78.13.0-guix0-preview1")
- (define %icecat-build-id "20210810000000") ;must be of the form YYYYMMDDhhmmss
+ (define %icecat-version "78.14.0-guix0-preview1")
+ (define %icecat-build-id "20210907000000") ;must be of the form YYYYMMDDhhmmss
  
  ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball
  ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat'
                    "firefox-" upstream-firefox-version ".source.tar.xz"))
              (sha256
               (base32
-               "0v2g5clp9qlsbqfjb6yz614nq8x8c4k1p6m4axyv6g27qbiaky8r"))))
+               "1ymjlg6p23c510m764pqr4sldrvk0c7g490a29js2cqc2nj2h3ma"))))
  
           (upstream-icecat-base-version "78.7.0") ; maybe older than base-version
           ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version))
  
         ("patch" ,(canonical-package patch))
  
 -       ("rust" ,rust-1.41)
 -       ("cargo" ,rust-1.41 "cargo")
 +       ("rust" ,rust)
 +       ("cargo" ,rust "cargo")
         ("rust-cbindgen" ,rust-cbindgen-0.14)
         ("llvm" ,llvm)
         ("clang" ,clang)
@@@ -1456,7 -1459,8 +1456,7 @@@ standards of the IceCat project."
                 (setenv "CC" "gcc")
                 (setenv "MOZ_NOSPAM" "1")
                 (setenv "PYTHON"
 -                       (string-append (assoc-ref inputs "python2")
 -                                      "/bin/python"))
 +                       (search-input-file inputs "/bin/python"))
                 (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
                 (setenv "LDFLAGS" (string-append "-Wl,-rpath="
                                                  (assoc-ref outputs "out")
                (base32
                 "1dahf3y8bm3kh7amf341wnmh82a2r0ksqihc6dwiakh6x86a94cm")))))
         ("autoconf" ,autoconf-2.13)
 -       ("cargo" ,rust-1.41 "cargo")
 +       ("cargo" ,rust "cargo")
         ("clang" ,clang)
         ("llvm" ,llvm)
         ("nasm" ,nasm)
         ("pkg-config" ,pkg-config)
         ("python" ,python)
         ("python2" ,python-2.7)
 -       ("rust" ,rust-1.41)
 +       ("rust" ,rust)
         ("rust-cbindgen" ,rust-cbindgen-0.14)
         ("which" ,which)
         ("yasm" ,yasm)))
diff --combined gnu/packages/golang.scm
@@@ -2,7 -2,7 +2,7 @@@
  ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
  ;;; Copyright © 2016 Andy Wingo <wingo@igalia.com>
 -;;; Copyright © 2016, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2016, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2016, 2017 Petter <petter@mykolab.ch>
  ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
  ;;; Copyright © 2017 Sergei Trofimovich <slyfox@inbox.ru>
@@@ -308,11 -308,6 +308,11 @@@ in the style of communicating sequentia
                     (("/bin/pwd") (which "pwd"))
                     (("/bin/sh") (which "sh")))
  
 +                 ;; Backport fix for go-1.14 with GCC 9+
 +                 ;; https://github.com/golang/go/issues/39157
 +                 (substitute* "cmd/go/note_test.go"
 +                   (("cannot find 'ld'") "cannot find [‘']ld[’']"))
 +
                   ;; Add libgcc to runpath
                   (substitute* "cmd/link/internal/ld/lib.go"
                     (("!rpath.set") "true"))
    (package
      (inherit go-1.14)
      (name "go")
-     (version "1.16.7")
+     (version "1.16.8")
      (source
       (origin
         (method git-fetch)
         (file-name (git-file-name name version))
         (sha256
          (base32
-          "1id6nsavf7gm78bmzsvym135pi2xa0v75ny51xrw93j70clz9w0h"))))
+          "00zv65v09kr2cljxxqypk980r4b4aqjijhbw4ikppn8km68h831n"))))
      (arguments
       (substitute-keyword-arguments (package-arguments go-1.14)
         ((#:tests? _) #t)
               (alist-replace "go" (list gccgo-10) (package-native-inputs go-1.14))
               (package-native-inputs go-1.14))))))
  
+ (define-public go-1.17
+   (package
+     (inherit go-1.16)
+     (name "go")
+     (version "1.17.1")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/golang/go")
+              (commit (string-append "go" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "0wk99lwpzp4qwrksl932lm9vb70nyf4vgb5lxwh7gzjcbhlqj992"))))
+     (outputs '("out" "tests")) ; 'tests' contains distribution tests.
+     (arguments
+      `(#:modules ((ice-9 match)
+                   (guix build gnu-build-system)
+                   (guix build utils))
+        #:phases
+        (modify-phases %standard-phases
+          (replace 'configure
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((output (assoc-ref outputs "out"))
+                    (loader (string-append (assoc-ref inputs "libc")
+                                           ,(glibc-dynamic-linker))))
+                (setenv "GOOS" "linux")
+                (setenv "GO_LDSO" loader)
+                (setenv "GOROOT" (getcwd))
+                (setenv "GOROOT_FINAL" (string-append output "/lib/go"))
+                (setenv "GOGC" "400")
+                (setenv "GOCACHE" "/tmp/go-cache"))))
+          (add-after 'unpack 'patch-source
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((net-base (assoc-ref inputs "net-base"))
+                     (tzdata-path (string-append (assoc-ref inputs "tzdata")
+                                                 "/share/zoneinfo")))
+                ;; XXX: Remove when #49729 is merged?
+                (for-each make-file-writable (find-files "src"))
+                ;; Having the patch in the 'patches' field of <origin> breaks
+                ;; the 'TestServeContent' test due to the fact that
+                ;; timestamps are reset.  Thus, apply it from here.
+                (invoke "patch" "-p1" "--force" "-i"
+                        (assoc-ref inputs "go-skip-gc-test.patch"))
+                (invoke "patch" "-p1" "--force" "-i"
+                        (assoc-ref inputs "go-fix-script-tests.patch"))
+                (substitute* "src/os/os_test.go"
+                  (("/usr/bin") (getcwd))
+                  (("/bin/sh") (which "sh")))
+                (substitute* "src/cmd/go/testdata/script/cgo_path_space.txt"
+                  (("/bin/sh") (which "sh")))
+                ;; fix shebang for testar script
+                ;; note the target script is generated at build time.
+                (substitute* "misc/cgo/testcarchive/carchive_test.go"
+                  (("/usr/bin/env bash") (which "bash")))
+                (substitute* "src/net/lookup_unix.go"
+                  (("/etc/protocols")
+                   (string-append net-base "/etc/protocols")))
+                (substitute* "src/net/port_unix.go"
+                  (("/etc/services")
+                   (string-append net-base "/etc/services")))
+                (substitute* "src/time/zoneinfo_unix.go"
+                  (("/usr/share/zoneinfo/") tzdata-path)))))
+          (add-after 'patch-source 'disable-failing-tests
+            (lambda _
+              ;; Disable failing tests: these tests attempt to access
+              ;; commands or network resources which are neither available
+              ;; nor necessary for the build to succeed.
+              (for-each
+               (match-lambda
+                 ((file test)
+                  (let ((regex (string-append "^(func\\s+)(" test "\\()")))
+                    (substitute* file
+                      ((regex all before test_name)
+                       (string-append before "Disabled" test_name))))))
+               '(("src/net/cgo_unix_test.go" "TestCgoLookupPort")
+                 ("src/net/cgo_unix_test.go" "TestCgoLookupPortWithCancel")
+                 ;; 127.0.0.1 doesn't exist
+                 ("src/net/cgo_unix_test.go" "TestCgoLookupPTR")
+                 ("src/net/cgo_unix_test.go" "TestCgoLookupPTRWithCancel")
+                 ;; /etc/services doesn't exist
+                 ("src/net/parse_test.go" "TestReadLine")
+                 ;; The user's directory doesn't exist
+                 ("src/os/os_test.go" "TestUserHomeDir")))
+              ;; These tests fail on aarch64-linux
+              (substitute* "src/cmd/dist/test.go"
+                (("t.registerHostTest\\(\"testsanitizers/msan.*") ""))))
+          (add-after 'patch-source 'enable-external-linking
+            (lambda _
+              ;; Invoke GCC to link any archives created with GCC (that is, any
+              ;; packages built using 'cgo'), because Go doesn't know how to
+              ;; handle the runpaths but GCC does.  Use substitute* rather than
+              ;; a patch since these files are liable to change often.
+              ;;
+              ;; XXX: Replace with GO_EXTLINK_ENABLED=1 or similar when
+              ;; <https://github.com/golang/go/issues/31544> and/or
+              ;; <https://github.com/golang/go/issues/43525> are resolved.
+              (substitute* "src/cmd/link/internal/ld/config.go"
+                (("iscgo && externalobj") "iscgo"))
+              (substitute* '("src/cmd/nm/nm_cgo_test.go"
+                             "src/cmd/dist/test.go")
+                (("^func.*?nternalLink\\(\\).*" all)
+                 (string-append all "\n\treturn false\n")))))
+          (replace 'build
+            (lambda* (#:key (parallel-build? #t) #:allow-other-keys)
+              (let* ((njobs (if parallel-build? (parallel-job-count) 1)))
+                (with-directory-excursion "src"
+                  (setenv "GOMAXPROCS" (number->string njobs))
+                  (invoke "sh" "make.bash" "--no-banner")))))
+          (replace 'check
+            (lambda* (#:key target (tests? (not target)) (parallel-tests? #t)
+                      #:allow-other-keys)
+              (let* ((njobs (if parallel-tests? (parallel-job-count) 1)))
+                (when tests?
+                  (with-directory-excursion "src"
+                    (setenv "GOMAXPROCS" (number->string njobs))
+                    (invoke "sh" "run.bash" "--no-rebuild"))))))
+          (add-before 'install 'unpatch-perl-shebangs
+            (lambda _
+              ;; Avoid inclusion of perl in closure by rewriting references
+              ;; to perl input in sourcecode generators and test scripts
+              (substitute* (cons "src/net/http/cgi/testdata/test.cgi"
+                                 (find-files "src" "\\.pl$"))
+                (("^#!.*") "#!/usr/bin/env perl\n"))))
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              ;; Notably, we do not install archives (180M), which Go will
+              ;; happily recompile quickly (and cache) if needed, almost
+              ;; surely faster than they could be substituted.
+              ;;
+              ;; The main motivation for pre-compiled archives is to use
+              ;; libc-linked `net' or `os' packages without a C compiler,
+              ;; but on Guix a C compiler is necessary to properly link the
+              ;; final binaries anyway.  Many build flags also invalidate
+              ;; these pre-compiled archives, so in practice Go often
+              ;; recompiles them anyway.
+              ;;
+              ;; Upstream is also planning to no longer install these
+              ;; archives: <https://github.com/golang/go/issues/47257>
+              ;;
+              ;; When necessary, a custom pre-compiled library package can
+              ;; be created with `#:import-path "std"' and used with
+              ;; `-pkgdir'.
+              (let* ((out (assoc-ref outputs "out"))
+                     (tests (assoc-ref outputs "tests")))
+                (for-each
+                 (lambda (file)
+                   (copy-recursively file (string-append out "/lib/go/" file)))
+                 '("lib" "VERSION" "pkg/include" "pkg/tool"))
+                (for-each
+                 (match-lambda
+                   ((file dest output)
+                    ;; Copy to output/dest and symlink from output/lib/go/file.
+                    (let ((file* (string-append output "/lib/go/" file))
+                          (dest* (string-append output "/" dest)))
+                      (copy-recursively file dest*)
+                      (mkdir-p (dirname file*))
+                      (symlink (string-append "../../" dest) file*))))
+                 `(("bin"          "bin"                 ,out)
+                   ("src"          "share/go/src"        ,out)
+                   ("misc"         "share/go/misc"       ,out)
+                   ("doc"          "share/doc/go/doc"    ,out)
+                   ("api"          "share/go/api"        ,tests)
+                   ("test"         "share/go/test"       ,tests))))))
+          (add-after 'install 'install-doc-files
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out")))
+                (for-each
+                 (lambda (file)
+                   (install-file file (string-append out "/share/doc/go")))
+                 '("AUTHORS" "CONTRIBUTORS" "CONTRIBUTING.md" "PATENTS"
+                   "README.md" "SECURITY.md"))))))))
+     (inputs (alist-delete "gcc:lib" (package-inputs go-1.16)))))
  (define-public go go-1.14)
  
  (define-public go-0xacab-org-leap-shapeshifter
@@@ -1381,6 -1558,12 +1563,12 @@@ Go."
           (url "https://github.com/sevlyar/go-daemon")
           (commit (string-append "v" version))))
         (file-name (git-file-name name version))
+        (modules '((guix build utils)))
+        (snippet
+         ;; XXX: Remove when updating
+         '(begin
+            (substitute* "compilation_test.go"
+              ((".*\"darwin/386\".*") ""))))
         (sha256
          (base32 "1y3gnxaifykcjcbzx91lz9bc93b95w3xj4rjxjbii26pm3j7gqyk"))))
      (build-system go-build-system)
                   (("/bin/sleep" command)
                    (string-append
                     (assoc-ref (or native-inputs inputs) "coreutils")
-                    command))))))))
+                    command)))
+                (substitute* "src/github.com/keybase/go-ps/process_openbsd.go"
+                  (("^// \\+build ignore") "")))))))
        (native-inputs
         `(("coreutils" ,coreutils)
           ("go-github-com-stretchr-testify"
@@@ -2759,6 -2944,68 +2949,68 @@@ developers to use @code{http} methods e
  with the HTTP protocol definition.")
      (license license:expat)))
  
+ (define-public go-cloud-google-com-go-compute-metadata
+   (package
+     (name "go-cloud-google-com-go-compute-metadata")
+     (version "0.81.0")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/googleapis/google-cloud-go")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "15jgynqb5pbxqbj3a7ii970yn4srsw1dbxzxnhpkfkmplalpgyh3"))))
+     (build-system go-build-system)
+     (arguments
+      '(#:unpack-path "cloud.google.com/go"
+        #:import-path "cloud.google.com/go/compute/metadata"))
+     (home-page
+      "https://pkg.go.dev/cloud.google.com/go/compute/metadata")
+     (synopsis
+      "Go wrapper for Google Compute Engine metadata service")
+     (description
+      "This package provides access to Google Compute Engine (GCE) metadata and
+ API service accounts for Go.")
+     (license license:asl2.0)))
+ (define-public go-github-com-google-gmail-oauth2-tools-go-sendgmail
+   (let ((commit "e3229155a4037267ce40f1a3a681f53221aa4d8d")
+         (revision "0"))
+     (package
+       (name "go-github-com-google-gmail-oauth2-tools-go-sendgmail")
+       (version (git-version "0.0.0" revision commit))
+       (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                (url "https://github.com/google/gmail-oauth2-tools")
+                (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            "1cxpkiaajhq1gjsg47r2b5xgck0r63pvkyrkm7af8c8dw7fyn64f"))))
+       (propagated-inputs
+        `(("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
+          ("go-cloud-google-com-go-compute-metadata"
+           ,go-cloud-google-com-go-compute-metadata)))
+       (build-system go-build-system)
+       (arguments
+        '(#:unpack-path "github.com/google/gmail-oauth2-tools"
+          #:import-path "github.com/google/gmail-oauth2-tools/go/sendgmail"))
+       (home-page
+        "https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail")
+       (synopsis
+        "Sendmail-compatible tool for using Gmail with @code{git send-email}")
+       (description
+        "The @command{sendgmail} command provides a minimal sendmail-compatible
+ front-end that connects to Gmail using OAuth2.  It is specifically designed
+ for use with @code{git send-email}.  The command needs a Gmail API key to
+ function.")
+       (license license:asl2.0))))
  (define-public go-github-com-google-cadvisor
    (let ((commit "2ed7198f77395ee9a172878a0a7ab92ab59a2cfd")
          (revision "0"))
@@@ -4791,7 -5038,8 +5043,8 @@@ as conversion to and from @command{net.
         (file-name (git-file-name name version))
         (sha256
          (base32
-          "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc"))))
+          "10mcnvi5qmn00vpyk6si8gjka7p654wr9hac4zc9w5h3ickhvbdc"))
+        (patches (search-patches "go-github-com-urfave-cli-fix-tests.patch"))))
      (build-system go-build-system)
      (arguments
       '(#:import-path "github.com/urfave/cli"))
@@@ -4817,7 -5065,10 +5070,10 @@@ fast and distributable command line app
               (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "08pvn7gyfznni72xrxfh2x6xxa8ykr7l1ka278js8g8qkh71bj8l"))))
+         (base32 "08pvn7gyfznni72xrxfh2x6xxa8ykr7l1ka278js8g8qkh71bj8l"))
+        ;; XXX: Remove patch when updating.
+        (patches
+         (search-patches "go-github-com-urfave-cli-v2-fix-tests.patch"))))
      (arguments
       '(#:import-path "github.com/urfave/cli/v2"))))
  
@@@ -3,7 -3,7 +3,7 @@@
  ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
  ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  ;;; Copyright © 2015, 2019 Eric Bavier <bavier@member.fsf.org>
 -;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@@ -28,6 -28,7 +28,7 @@@
  ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
  ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
  ;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
+ ;;; Copyright © 2021 Alice BRENON <alice.brenon@ens-lyon.fr>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -5895,7 -5896,8 +5896,7 @@@ descriptions."
               (let* ((out   (assoc-ref outputs "out"))
                      (elisp-file "elisp/hindent.el")
                      (dest  (string-append out "/share/emacs/site-lisp"))
 -                    (emacs (string-append (assoc-ref inputs "emacs")
 -                                          "/bin/emacs")))
 +                    (emacs (search-input-file inputs "/bin/emacs")))
                 (make-file-writable elisp-file)
                 (emacs-substitute-variables elisp-file
                   ("hindent-process-path"
@@@ -9764,7 -9766,7 +9765,7 @@@ version = Version [~a] [
         ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
         ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
         ("ghc-hunit" ,ghc-hunit)))
-     (home-page "https://johnmacfarlane.net/pandoc")
+     (home-page "https://pandoc.org")
      (synopsis "Types for representing a structured document")
      (description
       "This module defines the @code{Pandoc} data structure, which is used by
diff --combined gnu/packages/haskell.scm
@@@ -3,7 -3,7 +3,7 @@@
  ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
  ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  ;;; Copyright © 2015, 2019 Eric Bavier <bavier@member.fsf.org>
 -;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@@ -21,6 -21,7 +21,7 @@@
  ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
  ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+ ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -247,8 -248,9 +248,8 @@@ top of CLISP."
                       (gmp-lib (string-append gmp "/lib"))
                       (gmp-include (string-append gmp "/include"))
                       (ncurses-lib
 -                      (string-append (assoc-ref inputs "ncurses") "/lib"))
 -                     (ld-so (string-append (assoc-ref inputs "libc")
 -                                           ,(glibc-dynamic-linker)))
 +                      (dirname (search-input-file inputs "/lib/libncurses.so")))
 +                     (ld-so (search-input-file inputs ,(glibc-dynamic-linker)))
                       (libtinfo-dir
                        (string-append ghc-bootstrap-prefix
                                       "/lib/ghc-7.8.4/terminfo-0.4.0.0")))
@@@ -610,9 -612,14 +611,14 @@@ interactive environment for the functio
                                  (file-pattern ".*\\.conf\\.d$")
                                  (file-type 'directory))))))
  
+ ;; Versions newer than ghc defined below (i.e. the compiler
+ ;; haskell-build-system uses) should use ghc-next as their name to
+ ;; ensure ghc (without version specification) and ghc-* packages are
+ ;; always compatible. See https://issues.guix.gnu.org/issue/47335.
  (define-public ghc-8.8
    (package (inherit ghc-8.6)
-     (name "ghc")
+     (name "ghc-next")
      (version "8.8.4")
      (source
       (origin
                                  (file-pattern ".*\\.conf\\.d$")
                                  (file-type 'directory))))))
  
+ (define-public ghc-8.10
+   (package
+     (inherit ghc-8.8)
+     (name "ghc-next")
+     (version "8.10.7")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://www.haskell.org/ghc/dist/"
+                            version "/ghc-" version "-src.tar.xz"))
+        (sha256
+         (base32 "179ws2q0dinl1a39wm9j37xzwm84zfz3c5543vz8v479khigdvp3"))))
+     (native-inputs
+      `(("ghc-bootstrap" ,ghc-8.8)
+        ("ghc-testsuite"
+         ,(origin
+            (method url-fetch)
+            (uri (string-append
+                  "https://www.haskell.org/ghc/dist/"
+                  version "/ghc-" version "-testsuite.tar.xz"))
+            (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+            (sha256
+             (base32
+              "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))))
+        ("git" ,git-minimal)                     ; invoked during tests
+        ,@(filter (match-lambda
+                    (("ghc-bootstrap" . _) #f)
+                    (("ghc-testsuite" . _) #f)
+                    (_ #t))
+                  (package-native-inputs ghc-8.8))))
+     (arguments
+      (substitute-keyword-arguments (package-arguments ghc-8.8)
+        ((#:phases phases '%standard-phases)
+         `(modify-phases ,phases
+            (add-after 'unpack-testsuite 'patch-more-shebangs
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((bash (assoc-ref inputs "bash")))
+                  (substitute* '("testsuite/tests/driver/T8602/T8602.script")
+                    (("/bin/sh")
+                     (string-append bash "/bin/sh"))))))
+            ;; Mark failing tests as broken. Reason for failure is unknown.
+            (add-after 'skip-more-tests 'skip-even-more-tests
+              (lambda _
+                (substitute* '("testsuite/tests/driver/T16521/all.T")
+                  (("extra_files" all) (string-append "[" all))
+                  (("\\]\\), " all)
+                   (string-append all "expect_broken(0)], ")))))))))
+     (native-search-paths (list (search-path-specification
+                                 (variable "GHC_PACKAGE_PATH")
+                                 (files (list
+                                         (string-append "lib/ghc-" version)))
+                                 (file-pattern ".*\\.conf\\.d$")
+                                 (file-type 'directory))))))
  (define-public ghc-8 ghc-8.6)
  
  (define-public ghc ghc-8)
diff --combined gnu/packages/kde-pim.scm
@@@ -1,6 -1,7 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2017, 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+ ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -339,8 -340,9 +340,9 @@@ wrapping notes into KMime::Message obje
                           ""))
                        #t))
                    (replace 'check
-                     (lambda _
-                       (invoke "dbus-launch" "ctest"))))))
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (invoke "dbus-launch" "ctest")))))))
      (home-page "https://api.kde.org/kdepim/akonadi/html/index.html")
      (synopsis "Akonadi search library")
      (description "This package provides a library used to search in the
@@@ -757,9 -759,10 +759,9 @@@ for KDE PIM."
                        ;; found during one of the compilation steps without
                        ;; this hack.
                        (setenv "CPLUS_INCLUDE_PATH"
 -                              (string-append (assoc-ref inputs "akonadi-mime")
 -                                             "/include/KF5:"
 -                                             (or (getenv "CPLUS_INCLUDE_PATH") "")))
 -                      #t)))))
 +                              (string-append
 +                               (search-input-directory inputs "include/KF5")
 +                               ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
      (home-page "https://invent.kde.org/pim/kdepim-runtime")
      (synopsis "Runtime components for Akonadi KDE")
      (description "This package contains Akonadi agents written using KDE
@@@ -1014,8 -1017,9 +1016,9 @@@ protocol for querying and modifying dir
       `(#:phases
         (modify-phases %standard-phases
           (replace 'check
-            (lambda _
-              (invoke "dbus-launch" "ctest" ".")
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "dbus-launch" "ctest" "."))
               #t)))))
      (home-page "https://kde.org/applications/utilities/org.kde.kleopatra")
      (synopsis "Certificate Manager and Unified Crypto GUI")
@@@ -1104,8 -1108,9 +1107,9 @@@ and retrieving certificates from LDAP s
       `(#:phases
         (modify-phases %standard-phases
           (replace 'check
-            (lambda _
-              (invoke "dbus-launch" "ctest" ".")
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "dbus-launch" "ctest" "."))
               #t)))))
      (home-page "https://kontact.kde.org/components/kmail.html")
      (synopsis "Full featured graphical email client")
@@@ -1368,9 -1373,10 +1372,9 @@@ using a Qt/KMime C++ API."
                        ;; FIXME: One of the compilation steps fail to find
                        ;; <Libkdepim/MultiplyingLine> without this hack.
                        (setenv "CPLUS_INCLUDE_PATH"
 -                              (string-append (assoc-ref inputs "libkdepim")
 -                                             "/include/KF5:"
 -                                             (or (getenv "CPLUS_INCLUDE_PATH") "")))
 -                      #t)))))
 +                              (string-append
 +                               (search-input-directory inputs "include/KF5")
 +                               ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
      (home-page "https://invent.kde.org/pim/messagelib")
      (synopsis "KDE PIM messaging libraries")
      (description "This package provides several libraries for messages,
@@@ -1596,8 -1602,9 +1600,9 @@@ application \"Parts\" to be embedded a
                  ""))
               #t))
           (replace 'check
-            (lambda _
-              (invoke "dbus-launch" "ctest" ".")
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "dbus-launch" "ctest" "."))
               #t)))))
      (home-page "https://kontact.kde.org/components/korganizer.html")
      (synopsis "Organizational assistant, providing calendars and other similar
diff --combined gnu/packages/linux.scm
  ;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
  ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
  ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
- ;;; Copyright © 2017, 2018, 2020 Leo Famulari <leo@famulari.name>
+ ;;; Copyright © 2017, 2018, 2020, 2021 Leo Famulari <leo@famulari.name>
  ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
  ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
 -;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 +;;; Copyright © 2017, 2019, 2021 Mathieu Othacehe <othacehe@gnu.org>
  ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
  ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
  ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
  ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
  ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
  ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
 +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 +;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 +;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 +;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
    #:use-module (gnu packages xdisorg)
    #:use-module (gnu packages xorg)
    #:use-module (gnu packages groff)
 -  #:use-module (gnu packages rsync)
    #:use-module (gnu packages selinux)
    #:use-module (gnu packages swig)
    #:use-module (guix build-system cmake)
 +  #:use-module (guix build-system copy)
    #:use-module (guix build-system gnu)
    #:use-module (guix build-system go)
    #:use-module (guix build-system meson)
@@@ -200,24 -196,24 +200,24 @@@ defconfig.  Return the appropriate mak
  ;;; Kernel source code deblobbing.
  ;;;
  
- (define (linux-libre-deblob-scripts version
+ (define (linux-libre-deblob-scripts version gnu-revision
                                      deblob-hash
                                      deblob-check-hash)
    (list (version-major+minor version)
          (origin
            (method url-fetch)
            (uri (string-append "https://linux-libre.fsfla.org"
-                               "/pub/linux-libre/releases/" version "-gnu/"
+                               "/pub/linux-libre/releases/" version "-" gnu-revision "/"
                                "deblob-" (version-major+minor version)))
            (file-name (string-append "linux-libre-deblob-"
-                                     version))
+                                     version "-" gnu-revision))
            (sha256 deblob-hash))
          (origin
            (method url-fetch)
            (uri (string-append "https://linux-libre.fsfla.org"
-                               "/pub/linux-libre/releases/" version "-gnu/"
+                               "/pub/linux-libre/releases/" version "-" gnu-revision "/"
                                "deblob-check"))
-           (file-name (string-append "linux-libre-deblob-check-" version))
+           (file-name (string-append "linux-libre-deblob-check-" version "-" gnu-revision))
            (sha256 deblob-check-hash))))
  
  (define* (computed-origin-method gexp-promise hash-algo hash
@@@ -335,21 -331,21 +335,21 @@@ corresponding UPSTREAM-SOURCE (an origi
  ;;; Kernel sources.
  ;;;
  
- (define (linux-libre-urls version)
+ (define (linux-libre-urls version gnu-revision)
    "Return a list of URLs for Linux-Libre VERSION."
    (list (string-append
           "https://linux-libre.fsfla.org/pub/linux-libre/releases/"
-          version "-gnu/linux-libre-" version "-gnu.tar.xz")
+          version "-" gnu-revision "/linux-libre-" version "-" gnu-revision ".tar.xz")
  
          ;; XXX: Work around <http://bugs.gnu.org/14851>.
          (string-append
           "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
-          version "-gnu.tar.xz")
+          version "-" gnu-revision ".tar.xz")
  
          ;; Maybe this URL will become valid eventually.
          (string-append
-          "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
-          version "-gnu.tar.xz")))
+          "mirror://gnu/linux-libre/" version "-" gnu-revision "/linux-libre-"
+          version "-" gnu-revision ".tar.xz")))
  
  (define (%upstream-linux-source version hash)
    (origin
  
  ;; The current "stable" kernels. That is, the most recently released major
  ;; versions that are still supported upstream.
- (define-public linux-libre-5.13-version "5.13.13")
+ (define-public linux-libre-5.14-version "5.14.4")
+ (define-public linux-libre-5.14-gnu-revision "gnu")
+ (define deblob-scripts-5.14
+   (linux-libre-deblob-scripts
+    linux-libre-5.14-version
+    linux-libre-5.14-gnu-revision
+    (base32 "00vv2a51cvw2nx8iazmiy9i4h3jj9gvvpwz9gxp2v1hcmrsxq935")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
+ (define-public linux-libre-5.14-pristine-source
+   (let ((version linux-libre-5.14-version)
+         (hash (base32 "1dijf7qsjlqx893c2sxg5jrjdm8v1nv4hicvqlmp1v92s3h7kqj2")))
+    (make-linux-libre-source version
+                             (%upstream-linux-source version hash)
+                             deblob-scripts-5.14)))
+ (define-public linux-libre-5.13-version "5.13.17")
+ (define-public linux-libre-5.13-gnu-revision "gnu1")
  (define deblob-scripts-5.13
    (linux-libre-deblob-scripts
     linux-libre-5.13-version
-    (base32 "0bdqgxpc2vnj6m1nnrw8l5jpdglm0nlvjl6g44xryhy230ds0p9l")
-    (base32 "153jf5l5x4438zgxwggaky2ahjlfl48j438vhpzks6h77lzc51a5")))
+    linux-libre-5.13-gnu-revision
+    (base32 "0hj3w3vh1rj24xgl4v72mr6vaz1qzsnc5xzdfjga1zy84bw8lhkp")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-5.13-pristine-source
    (let ((version linux-libre-5.13-version)
-         (hash (base32 "0d1lr3rivgf9j3bn2a9hpzdf74nq8kybf3rfxxvw68vr1hhd4cam")))
+         (hash (base32 "06qa3c8wx87l4mh9h8gjcra5k5l6bcirs59s7baxdfjkxlihvrsa")))
     (make-linux-libre-source version
                              (%upstream-linux-source version hash)
                              deblob-scripts-5.13)))
  ;; The "longterm" kernels — the older releases with long-term upstream support.
  ;; Here are the support timelines:
  ;; <https://www.kernel.org/category/releases.html>
- (define-public linux-libre-5.10-version "5.10.61")
+ (define-public linux-libre-5.10-version "5.10.65")
+ (define-public linux-libre-5.10-gnu-revision "gnu1")
  (define deblob-scripts-5.10
    (linux-libre-deblob-scripts
     linux-libre-5.10-version
-    (base32 "16w9r5h8r8j5ckq2brr15xgdq3ksr2pgwcmjx5a7bqry8a60i3m4")
-    (base32 "0c9x07gplzajm0h5if3fpw2rvfb7psw3yp7i2n6ws7ggq1dvmki2")))
+    linux-libre-5.10-gnu-revision
+    (base32 "19d1pdsilq1ycnx1zw3vhf9mwdxbi5nmgzm0g1kj1lkkf1y4i1mv")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-5.10-pristine-source
    (let ((version linux-libre-5.10-version)
-         (hash (base32 "1lci78584c0rg5m5rkylssppnv001pzh4769m9mds4fdqn6f7sl2")))
+         (hash (base32 "0riyq1gdm18642fpnhpcw8hspcjqzprzhqnygjxabjjvrvdxxlzd")))
     (make-linux-libre-source version
                              (%upstream-linux-source version hash)
                              deblob-scripts-5.10)))
  
- (define-public linux-libre-5.4-version "5.4.143")
+ (define-public linux-libre-5.4-version "5.4.146")
+ (define-public linux-libre-5.4-gnu-revision "gnu1")
  (define deblob-scripts-5.4
    (linux-libre-deblob-scripts
     linux-libre-5.4-version
-    (base32 "12g1wm7xvjvmjanbgg0ahxm4vs2n5bvicfnnnag4h35vl4q3lggg")
-    (base32 "1xghbbnaisjd0k1klbyn1p7r6r4x5a1bpmkm56a3gh2zvw4s7mj8")))
+    linux-libre-5.4-gnu-revision
+    (base32 "1cdxljvmivdwcy9v9fr5iv0x0d1884pf3876p9nzrly599lz2wnl")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-5.4-pristine-source
    (let ((version linux-libre-5.4-version)
-         (hash (base32 "090x087p8hxnc1daf2xwj7vg8hg1jhz5i4andkbhdy550l5nalq9")))
+         (hash (base32 "1bjkfk24j86akm6df3c5b28viyq363drhssml7rcrl69286f92dk")))
     (make-linux-libre-source version
                              (%upstream-linux-source version hash)
                              deblob-scripts-5.4)))
  
- (define-public linux-libre-4.19-version "4.19.205")
+ (define-public linux-libre-4.19-version "4.19.206")
+ (define-public linux-libre-4.19-gnu-revision "gnu1")
  (define deblob-scripts-4.19
    (linux-libre-deblob-scripts
     linux-libre-4.19-version
-    (base32 "1jfcz4lnm44b3xzrkiipvw35kl0vvdvhr2pg7jfwf02f6qbvay18")
-    (base32 "1jiaw0as1ippkrjdpd52657w5mz9qczg3y2hlra7m9k0xawwiqlf")))
+    linux-libre-4.19-gnu-revision
+    (base32 "1hiaagdyfy6b0f9ivdy7zq0cd6akaj6v3c4nzikrgsk12vgc1a1q")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-4.19-pristine-source
    (let ((version linux-libre-4.19-version)
-         (hash (base32 "1ii9l44d6jxhyd5qkc5h83ixailma9v7hyl60wi3rskkafqnwv2m")))
+         (hash (base32 "1h44lvzxd0cngj71bk8qba9dz7jlqj68ir6xjwfafglb81ppgsxp")))
      (make-linux-libre-source version
                               (%upstream-linux-source version hash)
                               deblob-scripts-4.19)))
  
- (define-public linux-libre-4.14-version "4.14.245")
+ (define-public linux-libre-4.14-version "4.14.246")
+ (define-public linux-libre-4.14-gnu-revision "gnu1")
  (define deblob-scripts-4.14
    (linux-libre-deblob-scripts
     linux-libre-4.14-version
-    (base32 "07afckszdm4pq008i6ij0pxpw2rpgi5q931nxh6dxcczpicvwbc9")
-    (base32 "1qij18inijj6c3ma8hv98yjagnzxdxyn134da9fd23ky8q6hbvky")))
+    linux-libre-4.14-gnu-revision
+    (base32 "0cnax38650m9sxiwvc1xm5saymlsmx427j3jqpx34df2ah2rnrwf")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-4.14-pristine-source
    (let ((version linux-libre-4.14-version)
-         (hash (base32 "085jls7b2rzxlmvp0zsp4l3wi5xdrqlv2qczzwvbhzna1f4n2x0d")))
+         (hash (base32 "0fpgig84shpas1jc0h4s3aw9brkcq1as84gjbk4bfhc48bpi4mlw")))
      (make-linux-libre-source version
                               (%upstream-linux-source version hash)
                               deblob-scripts-4.14)))
  
- (define-public linux-libre-4.9-version "4.9.281")
+ (define-public linux-libre-4.9-version "4.9.282")
+ (define-public linux-libre-4.9-gnu-revision "gnu1")
  (define deblob-scripts-4.9
    (linux-libre-deblob-scripts
     linux-libre-4.9-version
-    (base32 "1w8cb8w1cpcwswc3rxq6vwjafw6yy0igib34rrm93ag5h6inncfv")
-    (base32 "0fxajshb75siq39lj5h8xvhdj8lcmddkslwlyj65rhlwk6g2r4b2")))
+    linux-libre-4.9-gnu-revision
+    (base32 "1n74ddrifnw06hx7ih2sk8jaiqlm1jyyhswyjpxiyhrrcvjcilch")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-4.9-pristine-source
    (let ((version linux-libre-4.9-version)
-         (hash (base32 "1dg70jv3bqanmjs31s0x2p7nd5g37bqzjn9rc1y6wvkgm4pwahi6")))
+         (hash (base32 "059fin4si93ya13xy831w84q496ksxidpd3kyw38918sfy4p6wk7")))
      (make-linux-libre-source version
                               (%upstream-linux-source version hash)
                               deblob-scripts-4.9)))
  
- (define-public linux-libre-4.4-version "4.4.282")
+ (define-public linux-libre-4.4-version "4.4.283")
+ (define-public linux-libre-4.4-gnu-revision "gnu1")
  (define deblob-scripts-4.4
    (linux-libre-deblob-scripts
     linux-libre-4.4-version
-    (base32 "1lid4k7g947yi3hcjj0lz0fnssawbph3jsy67vrv57l5imrhv3zs")
-    (base32 "0hhin1jpfkd6nwrb6xqxjzl3hdxy4pn8a15hy2d3d83yw6pflbsf")))
+    linux-libre-4.4-gnu-revision
+    (base32 "11397dgj6cdfv6anxrj7jwgvnqvwh5i0ci6c8mb85ry6h4fnfmq4")
+    (base32 "1a0k9i8gnzkyvfr80f8xw2fnxfwddhz1pzicz9fh0y3jzzkzk45p")))
  (define-public linux-libre-4.4-pristine-source
    (let ((version linux-libre-4.4-version)
-         (hash (base32 "1rgxznjb6gsi64wk7x2rylyi64y2nx5yiah5gfm40c6l2f7lb9cc")))
+         (hash (base32 "1d9v4h4cbc4i371lhhwpxbmg88gna6xyi2ahfvv0clz60802y982")))
      (make-linux-libre-source version
                               (%upstream-linux-source version hash)
                               deblob-scripts-4.4)))
      (patches (append (origin-patches source)
                       patches))))
  
+ (define-public linux-libre-5.14-source
+   (source-with-patches linux-libre-5.14-pristine-source
+                        (list %boot-logo-patch
+                              %linux-libre-arm-export-__sync_icache_dcache-patch
+                              ;; Pinebook Pro patch to fix LCD display
+                              (search-patch
+                               "linux-libre-arm64-generic-pinebook-lcd.patch"))))
  (define-public linux-libre-5.13-source
    (source-with-patches linux-libre-5.13-pristine-source
                         (list %boot-logo-patch
  ;;; Kernel headers.
  ;;;
  
- (define (make-linux-libre-headers version hash-string)
-   (make-linux-libre-headers* version
+ (define (make-linux-libre-headers version gnu-revision hash-string)
+   (make-linux-libre-headers* version gnu-revision
                               (origin
                                 (method url-fetch)
-                                (uri (linux-libre-urls version))
+                                (uri (linux-libre-urls version gnu-revision))
                                 (sha256 (base32 hash-string)))))
  
- (define (make-linux-libre-headers* version source)
+ (define (make-linux-libre-headers* version gnu-revision source)
    (package
      (name "linux-libre-headers")
      (version version)
                       ,@(if (version>=? version "4.16")
                             `(("flex" ,flex)
                               ("bison" ,bison))
 -                           '())
 -                     ,@(if (version>=? version "5.3")
 -                           `(("rsync" ,rsync))
                             '())))
      (arguments
       `(#:modules ((guix build gnu-build-system)
                    (guix build utils)
 -                  (srfi srfi-1))
 +                  (srfi srfi-1)
 +                  (ice-9 match))
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
                                (%current-system))))
                     (defconfig ,(system->defconfig
                                  (or (%current-target-system)
 -                                    (%current-system)))))
 +                                    (%current-system))))
 +                   (make-target ,(if (version>=? version "5.3")
 +                                     "headers"
 +                                     "headers_check")))
                 (setenv "ARCH" arch)
                 (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
                 (invoke "make" defconfig)
 -               (invoke "make" "mrproper" "headers_check"))))
 +               (invoke "make" "mrproper" make-target))))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
 -               (invoke "make"
 -                       (string-append "INSTALL_HDR_PATH=" out)
 -                       "headers_install")
 +
 +               ;; Mimic the quiet_cmd_headers_install target to avoid a
 +               ;; dependency on rsync.
 +               (for-each (lambda (file)
 +                           (let ((destination (string-append
 +                                               out "/include/"
 +                                               ;; Drop the 'usr/include' prefix.
 +                                               (match (string-split file #\/)
 +                                                 ((_ _ path ...)
 +                                                  (string-join path "/"))))))
 +                             (format #t "`~a' -> `~a'~%" file destination)
 +                             (install-file file (dirname destination))))
 +                         (find-files "usr/include" "\\.h$"))
  
                 (mkdir (string-append out "/include/config"))
                 (call-with-output-file
                     (string-append out
                                    "/include/config/kernel.release")
                   (lambda (p)
 -                   (format p "~a-default~%" ,version)))
 -
 -               ;; Remove the '.install' and '..install.cmd' files; the
 -               ;; latter contains store paths, which pulls in bootstrap
 -               ;; binaries in the build environment, and prevents bit
 -               ;; reproducibility for the bootstrap binaries.
 -               (for-each delete-file (find-files out "\\.install"))
 -
 -               #t))))
 +                   (format p "~a-default~%" ,version)))))))
         #:allowed-references ()
         #:tests? #f))
      (home-page "https://www.gnu.org/software/linux-libre/")
      (description "Headers of the Linux-Libre kernel.")
      (license license:gpl2)))
  
+ (define-public linux-libre-headers-5.14
+   (make-linux-libre-headers* linux-libre-5.14-version
+                              linux-libre-5.14-gnu-revision
+                              linux-libre-5.14-source))
  (define-public linux-libre-headers-5.13
    (make-linux-libre-headers* linux-libre-5.13-version
+                              linux-libre-5.13-gnu-revision
                               linux-libre-5.13-source))
  
  (define-public linux-libre-headers-5.10
    (make-linux-libre-headers* linux-libre-5.10-version
+                              linux-libre-5.10-gnu-revision
                               linux-libre-5.10-source))
  
  (define-public linux-libre-headers-5.4
    (make-linux-libre-headers* linux-libre-5.4-version
+                              linux-libre-5.4-gnu-revision
                               linux-libre-5.4-source))
  
  (define-public linux-libre-headers-4.19
    (make-linux-libre-headers* linux-libre-4.19-version
+                              linux-libre-4.19-gnu-revision
                               linux-libre-4.19-source))
  
  (define-public linux-libre-headers-4.14
    (make-linux-libre-headers* linux-libre-4.14-version
+                              linux-libre-4.14-gnu-revision
                               linux-libre-4.14-source))
  
  (define-public linux-libre-headers-4.9
    (make-linux-libre-headers* linux-libre-4.9-version
+                              linux-libre-4.9-gnu-revision
                               linux-libre-4.9-source))
  
  (define-public linux-libre-headers-4.4
    (make-linux-libre-headers* linux-libre-4.4-version
+                              linux-libre-4.4-gnu-revision
                               linux-libre-4.4-source))
  
  ;; The following package is used in the early bootstrap, and thus must be kept
  ;; stable and with minimal build requirements.
 -(define-public linux-libre-headers-5.4.20
 -  (make-linux-libre-headers "5.4.20" "gnu"
 -                            "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47"))
 +(define-public linux-libre-headers-5.10.35
-   (make-linux-libre-headers "5.10.35"
++  (make-linux-libre-headers "5.10.35" "gnu"
 +                            "0q2rnchad55d49f3rajrkazz0fcjv1irwrdb1hwjnl01fzm2gjk3"))
  
 -(define-public linux-libre-headers linux-libre-headers-5.4.20)
 +(define-public linux-libre-headers linux-libre-headers-5.10.35)
  
  \f
  ;;;
@@@ -734,7 -776,7 +783,7 @@@ for ARCH and optionally VARIANT, or #f 
  ;;; Kernel package utilities.
  ;;;
  
- (define* (make-linux-libre version hash-string supported-systems
+ (define* (make-linux-libre version gnu-revision hash-string supported-systems
                             #:key
                             (extra-version #f)
                             ;; A function that takes an arch and a variant.
                             (defconfig "defconfig")
                             (extra-options %default-extra-linux-options)
                             (patches (list %boot-logo-patch)))
-   (make-linux-libre* version
+   (make-linux-libre* version gnu-revision
                       (origin
                         (method url-fetch)
-                        (uri (linux-libre-urls version))
+                        (uri (linux-libre-urls version gnu-revision))
                         (sha256 (base32 hash-string))
                         (patches patches))
                       supported-systems
                       #:defconfig defconfig
                       #:extra-options extra-options))
  
- (define* (make-linux-libre* version source supported-systems
+ (define* (make-linux-libre* version gnu-revision source supported-systems
                              #:key
                              (extra-version #f)
                              ;; A function that takes an arch and a variant.
@@@ -900,49 -942,64 +949,64 @@@ It has been modified to remove all non-
  ;;; Generic kernel packages.
  ;;;
  
+ (define-public linux-libre-5.14
+   (make-linux-libre* linux-libre-5.14-version
+                      linux-libre-5.14-gnu-revision
+                      linux-libre-5.14-source
+                      '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
+                      #:configuration-file kernel-config))
  (define-public linux-libre-5.13
    (make-linux-libre* linux-libre-5.13-version
+                      linux-libre-5.13-gnu-revision
                       linux-libre-5.13-source
                       '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-version         linux-libre-5.13-version)
+ (define-public linux-libre-gnu-revision    linux-libre-5.13-gnu-revision)
  (define-public linux-libre-pristine-source linux-libre-5.13-pristine-source)
  (define-public linux-libre-source          linux-libre-5.13-source)
  (define-public linux-libre                 linux-libre-5.13)
  
  (define-public linux-libre-5.10
    (make-linux-libre* linux-libre-5.10-version
+                      linux-libre-5.10-gnu-revision
                       linux-libre-5.10-source
                       '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-5.4
    (make-linux-libre* linux-libre-5.4-version
+                      linux-libre-5.4-gnu-revision
                       linux-libre-5.4-source
                       '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-4.19
    (make-linux-libre* linux-libre-4.19-version
+                      linux-libre-4.19-gnu-revision
                       linux-libre-4.19-source
                       '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-4.14
    (make-linux-libre* linux-libre-4.14-version
+                      linux-libre-4.14-gnu-revision
                       linux-libre-4.14-source
                       '("x86_64-linux" "i686-linux" "armhf-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-4.9
    (make-linux-libre* linux-libre-4.9-version
+                      linux-libre-4.9-gnu-revision
                       linux-libre-4.9-source
                       '("x86_64-linux" "i686-linux")
                       #:configuration-file kernel-config))
  
  (define-public linux-libre-4.4
    (make-linux-libre* linux-libre-4.4-version
+                      linux-libre-4.4-gnu-revision
                       linux-libre-4.4-source
                       '("x86_64-linux" "i686-linux")
                       #:configuration-file kernel-config
  ;; Reference: https://jxself.org/linux-libre/
  
  (define-public linux-libre-lts-version         linux-libre-5.10-version)
+ (define-public linux-libre-lts-gnu-revision    linux-libre-5.10-gnu-revision)
  (define-public linux-libre-lts-pristine-source linux-libre-5.10-pristine-source)
  (define-public linux-libre-lts-source          linux-libre-5.10-source)
  (define-public linux-libre-lts                 linux-libre-5.10)
  
  (define-public linux-libre-arm-generic
    (make-linux-libre* linux-libre-version
+                      linux-libre-gnu-revision
                       linux-libre-source
                       '("armhf-linux")
                       #:defconfig "multi_v7_defconfig"
  
  (define-public linux-libre-arm-generic-5.10
    (make-linux-libre* linux-libre-5.10-version
+                      linux-libre-5.10-gnu-revision
                       linux-libre-5.10-source
                       '("armhf-linux")
                       #:defconfig "multi_v7_defconfig"
  
  (define-public linux-libre-arm-generic-5.4
    (make-linux-libre* linux-libre-5.4-version
+                      linux-libre-5.4-gnu-revision
                       linux-libre-5.4-source
                       '("armhf-linux")
                       #:defconfig "multi_v7_defconfig"
  
  (define-public linux-libre-arm-generic-4.19
    (make-linux-libre* linux-libre-4.19-version
+                      linux-libre-4.19-gnu-revision
                       linux-libre-4.19-source
                       '("armhf-linux")
                       #:defconfig "multi_v7_defconfig"
  
  (define-public linux-libre-arm-generic-4.14
    (make-linux-libre* linux-libre-4.14-version
+                      linux-libre-4.14-gnu-revision
                       linux-libre-4.14-source
                       '("armhf-linux")
                       #:defconfig "multi_v7_defconfig"
  
  (define-public linux-libre-arm-omap2plus
    (make-linux-libre* linux-libre-version
+                      linux-libre-gnu-revision
                       linux-libre-source
                       '("armhf-linux")
                       #:defconfig "omap2plus_defconfig"
  
  (define-public linux-libre-arm-omap2plus-4.19
    (make-linux-libre* linux-libre-4.19-version
+                      linux-libre-4.19-gnu-revision
                       linux-libre-4.19-source
                       '("armhf-linux")
                       #:defconfig "omap2plus_defconfig"
  
  (define-public linux-libre-arm-omap2plus-4.14
    (make-linux-libre* linux-libre-4.14-version
+                      linux-libre-4.14-gnu-revision
                       linux-libre-4.14-source
                       '("armhf-linux")
                       #:defconfig "omap2plus_defconfig"
  
  (define-public linux-libre-arm64-generic
    (make-linux-libre* linux-libre-version
+                      linux-libre-gnu-revision
                       linux-libre-source
                       '("aarch64-linux")
                       #:defconfig "defconfig"
  
  (define-public linux-libre-arm64-generic-5.10
    (make-linux-libre* linux-libre-5.10-version
+                      linux-libre-5.10-gnu-revision
                       linux-libre-5.10-source
                       '("aarch64-linux")
                       #:defconfig "defconfig"
  
  (define-public linux-libre-arm64-generic-5.4
    (make-linux-libre* linux-libre-5.4-version
+                      linux-libre-5.4-gnu-revision
                       linux-libre-5.4-source
                       '("aarch64-linux")
                       #:defconfig "defconfig"
  
  (define-public linux-libre-riscv64-generic
    (make-linux-libre* linux-libre-version
+                      linux-libre-gnu-revision
                       linux-libre-source
                       '("riscv64-linux")
                       #:extra-version "riscv64-generic"))
  
  (define-public linux-libre-mips64el-fuloong2e
    (make-linux-libre* linux-libre-version
+                      linux-libre-gnu-revision
                       linux-libre-source
                       '("mips64el-linux")
                       #:defconfig "fuloong2e_defconfig"
    (let ((base-linux-libre
           (make-linux-libre*
            linux-libre-5.13-version
+           linux-libre-5.13-gnu-revision
            linux-libre-5.13-source
            '("x86_64-linux" "i686-linux" "armhf-linux"
              "aarch64-linux" "riscv64-linux")
@@@ -1510,6 -1582,43 +1589,43 @@@ allows some more serious things like ad
  application by hooking GStreamer into the loopback device.")
      (license license:gpl2+)))
  
+ (define-public xpadneo
+   (package
+     (name "xpadneo")
+     (version "0.9.1")
+     (source (origin
+               (method git-fetch)
+               (uri (git-reference
+                     (url "https://github.com/atar-axis/xpadneo")
+                     (commit (string-append "v" version))))
+               (file-name (git-file-name name version))
+               (sha256
+                (base32
+                 "0xr0zx134s56h4ij6c3fh8ki0h58h61minbfxcl3sgpgxkh14ism"))))
+     (build-system linux-module-build-system)
+     (arguments
+      `(#:tests? #f ; no `check' target
+        #:source-directory "hid-xpadneo/src"
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'install 'post-install
+            (lambda* (#:key outputs #:allow-other-keys #:rest args)
+              (let ((out (assoc-ref outputs "out")))
+                (copy-recursively "hid-xpadneo/etc-modprobe.d"
+                                  (string-append out "/etc/modprobe.d"))
+                ;; udev-service-type takes its rules from /lib rather than
+                ;; /etc, so copy it there instead
+                (copy-recursively "hid-xpadneo/etc-udev-rules.d"
+                                  (string-append out "/lib/udev/rules.d"))))))))
+     (home-page "https://atar-axis.github.io/xpadneo/")
+     (synopsis "Xbox One Wireless Controller driver")
+     (description
+      "This package provides a driver for the XBox One S Wireless controller
+ and some newer models when connected via bluetooth.  In addition to the kernel
+ module provided itself, it also contains a modprobe configuration and udev
+ rules, which need to be installed separately.")
+     (license license:gpl3+)))
  \f
  ;;;
  ;;; Pluggable authentication modules (PAM).
@@@ -1755,7 -1864,7 +1871,7 @@@ providing the system administrator wit
  (define-public util-linux
    (package
      (name "util-linux")
 -    (version "2.35.1")
 +    (version "2.37.1")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://kernel.org/linux/utils/"
                                    "util-linux-" version ".tar.xz"))
                (sha256
                 (base32
 -                "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
 +                "0xkb7vw2040zi4m0sbhs5qn5l8nrq4xsf4sdxf3cy9mpachd8jwf"))
                (patches (search-patches "util-linux-tests.patch"))
                (modules '((guix build utils)))
                (snippet
                 "static"))       ;2.9 MiB static .a libraries
      (arguments
       `(#:configure-flags (list "--disable-use-tty-group"
 -                               "--enable-fs-paths-default=/run/current-system/profile/sbin"
 +                               (string-append
 +                                "--enable-fs-paths-default="
 +                                "/run/setuid-programs"
 +                                ":/run/current-system/profile/sbin")
                                 ;; Don't try to chown root:root mount and umount
                                 "--disable-makeinstall-chown"
                                 "--localstatedir=/var"
                          ;; libraries below $exec_prefix when $libdir does not
                          ;; match any of the "usual" locations.  Fix that.
                          (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
 -                         "usrlib_execdir=$libdir"))
 -                      #t))
 +                         "usrlib_execdir=$libdir"))))
                    (add-before 'build 'set-umount-file-name
                      (lambda* (#:key outputs #:allow-other-keys)
                        ;; Tell 'eject' the right file name of 'umount'.
                        (let ((out (assoc-ref outputs "out")))
                          (substitute* "sys-utils/eject.c"
                            (("\"/bin/umount\"")
 -                           (string-append "\"" out "/bin/umount\"")))
 -                        #t)))
 +                           (string-append "\"" out "/bin/umount\""))))))
                    (add-before 'check 'pre-check
 -                    (lambda* (#:key inputs outputs #:allow-other-keys)
 -                      (let ((out (assoc-ref outputs "out"))
 -                            (net (assoc-ref inputs "net-base")))
 +                    (lambda* (#:key native-inputs inputs #:allow-other-keys)
 +                      (let ((services (search-input-file (or native-inputs inputs)
 +                                                         "etc/services")))
                          ;; Change the test to refer to the right file.
                          (substitute* "tests/ts/misc/mcookie"
                            (("/etc/services")
 -                           (string-append net "/etc/services")))
 +                           services))
  
                          ;; The C.UTF-8 locale does not exist in our libc.
                          (substitute* "tests/ts/column/invalid-multibyte"
 -                          (("C\\.UTF-8") "en_US.utf8"))
 -                        #t)))
 -                  ;; TODO: Remove the conditional on the next rebuild cycle.
 -                  ,@(if (string-prefix? "arm" (%current-system))
 -                        '((add-before 'check 'disable-setarch-test
 +                          (("C\\.UTF-8") "en_US.utf8")))))
 +                  (add-before 'check 'disable-setarch-test
 +                    (lambda _
 +                      ;; The setarch tests are unreliable in QEMU's user-mode
 +                      ;; emulation, which is our primary method of building
 +                      ;; ARMv7 packages.  See
 +                      ;; <https://github.com/karelzak/util-linux/issues/601>.
 +                      (substitute* "tests/ts/misc/setarch"
 +                        (("ts_init_subtest.*" all)
 +                         (string-append
 +                          all "\n"
 +                          "ts_skip \"setarch tests are unreliable under QEMU\"")))))
 +                  ,@(if (target-x86-32?)
 +                        `((add-before 'check 'disable-lsns-test
                              (lambda _
 -                              ;; The setarch tests are unreliable in QEMU's
 -                              ;; user-mode emulation, which is our primary
 -                              ;; method of building ARMv7 packages.
 -                              ;; <https://github.com/karelzak/util-linux/issues/601>
 -                              (substitute* "tests/ts/misc/setarch"
 -                                (("ts_init_subtest.*" all)
 -                                 (string-append
 -                                  all "\n"
 -                                  "ts_skip \"setarch tests are unreliable under QEMU\"")))
 -                              #t)))
 +                              ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
 +                              ;; returning ENOTTY, indicating this kernel does not
 +                              ;; support user namespaces.  Curiously, this test can fail
 +                              ;; on i686 even if the same test passes on x86_64 on the
 +                              ;; same machine.  See <https://issues.guix.gnu.org/49933>.
 +                              (delete-file "tests/ts/lsns/ioctl_ns"))))
                          '())
                    (add-after 'install 'move-static-libraries
                      (lambda* (#:key outputs #:allow-other-keys)
                            ;; files so that Libtool does the right thing when both
                            ;; the shared and static library is available.
                            (substitute* (find-files "lib" "\\.la$")
 -                            (("old_library=.*") "old_library=''\n")))
 -
 -                        #t)))
 +                            (("old_library=.*") "old_library=''\n"))))))
                    (add-after 'install 'adjust-pkg-config-files
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let ((lib (assoc-ref outputs "lib")))
                          ;; the pkg-config files to avoid a cyclic reference on "out".
                          (substitute* (find-files (string-append lib "/lib/pkgconfig")
                                                   "\\.pc$")
 -                          (("^(exec_)?prefix=.*") "")))
 -                        #t)))))
 -    (inputs `(("zlib" ,zlib)
 -              ("ncurses" ,ncurses)
 -
 -              ;; XXX: This is so that the 'pre-check' phase can find it.
 -              ,@(if (%current-target-system)
 -                    `(("net-base" ,net-base))
 -                    '())))
 +                          (("^(exec_)?prefix=.*") ""))))))))
 +    (inputs
 +     (list file                         ;for libmagic
 +           ncurses
 +           zlib))
      (native-inputs
 -     `(("perl" ,perl)
 -       ("net-base" ,net-base)))         ;for tests
 +     (list net-base                     ;for tests
 +           perl))
      (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
      (synopsis "Collection of utilities for the Linux kernel")
      (description "Util-linux is a diverse collection of Linux kernel
@@@ -2084,6 -2193,38 +2200,38 @@@ slabtop, tload, top, vmstat, w, watch a
       "Tools for working with USB devices, such as lsusb.")
      (license license:gpl2+)))
  
+ (define-public usbip-utils
+   (package
+     (name "usbip-utils")
+     (version (package-version linux-libre))
+     (source (package-source linux-libre))
+     (build-system gnu-build-system)
+     (arguments
+      '(#:configure-flags '("--disable-static")
+        #:phases (modify-phases %standard-phases
+                   (add-after 'unpack 'enter-subdirectory
+                     (lambda _
+                       (chdir "tools/usb/usbip")
+                       #t)))))
+     (native-inputs
+      `(("automake" ,automake)
+        ("autoreconf" ,autoconf)
+        ("libtool" ,libtool)))
+     (inputs `(("eudev" ,eudev)))
+     (home-page (package-home-page linux-libre))
+     (synopsis "Utilities for sharing USB devices over IP networks")
+     (description
+      "The USB/IP protocol enables to pass USB device from a server to
+ a client over the network.  The server is a machine which shares an
+ USB device and the client is a machine which uses USB device provided by
+ a server over the network.  The USB device may be either physical device
+ connected to a server or software entity created on a server using USB
+ gadget subsystem.  The usbip-utils are userspace tools to used to handle
+ connection and management on both side.  The client needs the @file{vhci-hcd}
+ Linux kernel module and the server needs the @file{usbip_host} Linux kernel
+ module.")
+     (license license:gpl2)))
  (define-public e2fsprogs
    (package
      (name "e2fsprogs")
@@@ -2267,7 -2408,7 +2415,7 @@@ Zerofree requires the file system to b
  (define-public strace
    (package
      (name "strace")
 -    (version "5.8")
 +    (version "5.13")
      (home-page "https://strace.io")
      (source (origin
               (method url-fetch)
                                   "/strace-" version ".tar.xz"))
               (sha256
                (base32
 -               "1abs3svkg9985f4jrxx34sj1dcpsf95vv1a0g01c777zgygncjnz"))))
 +               "0mmns22bjjvakxj29si0x4dcylcgy26llpcimkb0llcxif439k2s"))))
      (build-system gnu-build-system)
      (arguments
       '(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-/bin/sh
             (lambda _
 -             (substitute* "strace.c"
 +             (substitute* "src/strace.c"
                 (("/bin/sh") (which "sh")))
               #t))
           (add-after 'unpack 'disable-failing-tests
             (lambda _
 -             ;; XXX These hang forever even if the test time-out is extended.
               (substitute* "tests/Makefile.in"
 -               (("^\tstrace-DD?D?\\.test \\\\.*") ""))
 +               ;; XXX: This test fails because an extra readlink call is made
 +               ;; by the glibc when using the ld.so cache.
 +               (("readlink.gen.test[^:]") " ")
 +
 +               ;; XXX: These hang forever even if the test time-out is
 +               ;; extended.
 +               (("^\tstrace-DD?D?\\.test \\\\.*") "")
 +               (("^\tpidns-cache.test \\\\.*") "")
 +               (("^\t.*--pidns-translation.test \\\\.*") ""))
               #t)))
 -       ;; Don't fail if the architecture doesn't support different personalities.
 +       ;; Don't fail if the architecture doesn't support different
 +       ;; personalities.
         #:configure-flags '("--enable-mpers=check")
         ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
         #:parallel-tests? #f))           ; undeterministic failures
@@@ -2334,96 -2467,24 +2482,96 @@@ an executed process and the signals rec
  intercept and print the system calls executed by the program.")
      (license license:gpl2+)))
  
 +(define-public alsa-ucm-conf
 +  (package
 +    (name "alsa-ucm-conf")
 +    (version "1.2.4")
 +    (source (origin
 +              (method url-fetch)
 +              (uri (string-append
 +                    "ftp://ftp.alsa-project.org/pub/lib/" name "-"
 +                    version ".tar.bz2"))
 +              (sha256
 +               (base32
 +                "0h6kzi1cfdqyxp4pwpqh5wb89c8s9wrgix315bvamffwfxf56frc"))))
 +    (build-system copy-build-system)
 +    (arguments
 +     '(#:install-plan
 +       '(("ucm" "share/alsa/ucm")
 +         ("ucm2" "share/alsa/ucm2"))))
 +    (home-page "https://www.alsa-project.org/wiki/Main_Page")
 +    (synopsis "The Advanced Linux Sound Architecture Use Case Manager")
 +    (description
 +     "This package contains Advanced Linux Sound Architecture Use Case Manager
 +configuration of audio input/output names and routing for specific audio
 +hardware.")
 +    (license license:bsd-3)))
 +
 +(define-public alsa-topology-conf
 +  (package
 +    (name "alsa-topology-conf")
 +    (version "1.2.4")
 +    (source (origin
 +              (method url-fetch)
 +              (uri (string-append
 +                    "ftp://ftp.alsa-project.org/pub/lib/" name "-"
 +                    version ".tar.bz2"))
 +              (sha256
 +               (base32
 +                "01zdg6q4s6d01k39z96wi4vbhrfw1i2g4yi5dijwfk6a5vjfdq2m"))))
 +    (build-system copy-build-system)
 +    (arguments
 +     '(#:install-plan
 +       '(("topology" "share/alsa/topology"))))
 +    (home-page "https://www.alsa-project.org/wiki/Main_Page")
 +    (synopsis "The Advanced Linux Sound Architecture libraries")
 +    (description
 +     "This package contains Advanced Linux Sound Architecture topology
 +configuration files that can be used for specific audio hardware.")
 +    (license license:bsd-3)))
 +
  (define-public alsa-lib
    (package
      (name "alsa-lib")
      (version "1.2.4")
      (source (origin
 -             (method url-fetch)
 -             (uri (string-append
 -                   "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
 -                   version ".tar.bz2"))
 -             (sha256
 -              (base32
 -               "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
 +              (method url-fetch)
 +              (uri (string-append
 +                    "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
 +                    version ".tar.bz2"))
 +              (sha256
 +               (base32
 +                "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
      (build-system gnu-build-system)
      (arguments
       '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                                (assoc-ref %outputs "out")
 -                                              "/lib"))))
 -    (home-page "https://www.alsa-project.org/")
 +                                              "/lib"))
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-before 'install 'pre-install
 +           (lambda* (#:key inputs outputs #:allow-other-keys)
 +             (let* ((ucm
 +                     (string-append (assoc-ref inputs "alsa-ucm-conf")))
 +                    (topology
 +                     (string-append (assoc-ref inputs "alsa-topology-conf")))
 +                    (alsa
 +                     (string-append (assoc-ref outputs "out") "/share/alsa"))
 +                    (ucm-share
 +                     (string-append ucm "/share/alsa/ucm"))
 +                    (ucm2-share
 +                     (string-append ucm "/share/alsa/ucm2"))
 +                    (topology-share
 +                     (string-append topology "/share/alsa/topology")))
 +               (mkdir-p alsa)
 +               (symlink ucm-share (string-append alsa "/ucm"))
 +               (symlink ucm2-share (string-append alsa "/ucm2"))
 +               (symlink topology-share (string-append alsa "/topology")))
 +             #t)))))
 +    (inputs
 +     `(("alsa-ucm-conf" ,alsa-ucm-conf)
 +       ("alsa-topology-conf" ,alsa-topology-conf)))
 +    (home-page "https://www.alsa-project.org/wiki/Main_Page")
      (synopsis "The Advanced Linux Sound Architecture libraries")
      (description
       "The Advanced Linux Sound Architecture (ALSA) provides audio and
@@@ -2835,10 -2896,10 +2983,10 @@@ network hardware types (plipconfig, sla
  configuration (iptunnel, ipmaddr).")
        (license license:gpl2+))))
  
 -(define-public libcap-2.31
 +(define-public libcap
    (package
      (name "libcap")
 -    (version "2.31")
 +    (version "2.51")
      (source (origin
               (method url-fetch)
               (uri (string-append
                     "libcap2/libcap-" version ".tar.xz"))
               (sha256
                (base32
 -               "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266"))))
 +               "1ych13qc1mvzv8iscbims5b317vxcmy5ffpmfy98zk7bgamz62b6"))))
      (build-system gnu-build-system)
      (arguments '(#:phases
                   (modify-phases %standard-phases
                              ;; Add $libdir to the RUNPATH of executables.
                              (lambda _
                                (substitute* "Make.Rules"
 -                                (("LDFLAGS := #-g")
 -                                 (string-append "LDFLAGS := -Wl,-rpath="
 -                                                %output "/lib")))
 -                              #t)))
 +                                (("LDFLAGS \\?= #-g")
 +                                 (string-append "LDFLAGS ?= -Wl,-rpath="
 +                                                %output "/lib"))))))
                   #:test-target "test"
                   #:make-flags (list "lib=lib"
                                      (string-append "prefix="
@@@ -2873,6 -2935,37 +3021,6 @@@ Linux-based operating systems."
      ;; License is BSD-3 or GPLv2, at the user's choice.
      (license license:gpl2)))
  
 -;; libcap 2.31 has problems with newer kernels, so provide this newer variant.
 -;; Keep the old libcap around to avoid rebuilding 'coreutils' and 'avahi'.
 -;; To be merged with libcap on the next rebuild cycle.
 -(define-public libcap
 -  (package
 -    (inherit libcap-2.31)
 -    (version "2.45")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append
 -                    "mirror://kernel.org/linux/libs/security/linux-privs/"
 -                    "libcap2/libcap-" version ".tar.xz"))
 -              (sha256
 -               (base32
 -                "11ijmi7jik9iw6pdszc6bylhggghr8cza03bcrbhbqf0cpvkjrnn"))))
 -    (arguments
 -     (substitute-keyword-arguments (package-arguments libcap-2.31)
 -       ((#:phases phases)
 -        `(modify-phases ,phases
 -           (replace 'configure
 -             (lambda _
 -               ;; Add $libdir to the RUNPATH of executables.
 -               (substitute* "Make.Rules"
 -                 (("LDFLAGS \\?= #-g")
 -                  (string-append "LDFLAGS ?= -Wl,-rpath="
 -                                 %output "/lib")))
 -               #t))))))))
 -
 -(define-deprecated libcap/next libcap)
 -(export libcap/next)
 -
  (define-public bridge-utils
    (package
      (name "bridge-utils")
@@@ -3190,12 -3283,11 +3338,12 @@@ processes currently causing I/O."
               ;; it refers to the right ones.
               (substitute* '("lib/mount_util.c" "util/mount_util.c")
                 (("/bin/(u?)mount" _ maybe-u)
 -                (string-append (assoc-ref inputs "util-linux")
 -                               "/bin/" maybe-u "mount")))
 -             (substitute* "util/mount.fuse.c"
 -               (("/bin/sh" command)
 -                (string-append (assoc-ref inputs "bash-minimal") command)))
 +                (search-input-file inputs
 +                                   (string-append "bin/"
 +                                                  maybe-u "mount"))))
 +             (substitute* '("util/mount.fuse.c")
 +               (("/bin/sh")
 +                (search-input-file inputs "/bin/sh")))
  
               ;; This hack leads libfuse to search for 'fusermount' in
               ;; $PATH, where it may find a setuid-root binary, instead of
@@@ -3557,7 -3649,7 +3705,7 @@@ to use Linux' inotify mechanism, which 
  (define-public kmod
    (package
      (name "kmod")
 -    (version "27")
 +    (version "29")
      (source (origin
                (method url-fetch)
                (uri
                                "kmod-" version ".tar.xz"))
                (sha256
                 (base32
 -                "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1"))
 +                "0am54mi5rk72g5q7k6l6f36gw3r9vwgjmyna43ywcjhqmakyx00b"))
                (patches (search-patches "kmod-module-directory.patch"))))
      (build-system gnu-build-system)
      (native-inputs
 -     `(("pkg-config" ,pkg-config)))
 +     `(("pkg-config" ,pkg-config)
 +       ;; For tests.
 +       ("zstd" ,zstd)))
      (inputs
       `(("xz" ,xz)
 -       ("zlib" ,zlib)))
 +       ("zlib" ,zlib)
 +       ("zstd-lib" ,zstd "lib")))
      (arguments
 -     `(#:configure-flags '("--with-xz" "--with-zlib"
 +     `(#:configure-flags '("--with-xz" "--with-zlib" "--with-zstd"
                             "--disable-test-modules")
         #:phases
         (modify-phases %standard-phases
@@@ -4282,28 -4371,27 +4430,28 @@@ country-specific regulations for the wi
               (substitute* '("prog/pwm/pwmconfig"
                              "prog/pwm/fancontrol")
                 (("gnuplot")
 -                (string-append (assoc-ref inputs "gnuplot")
 -                               "/bin/gnuplot"))
 +                (search-input-file inputs "/bin/gnuplot"))
                 (("cat ")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/cat "))
 +                (string-append (search-input-file inputs "/bin/cat")
 +                               " "))
                 (("e?grep " match)
 -                (string-append (assoc-ref inputs "grep")
 -                               "/bin/" match))
 +                (string-append (search-input-file inputs
 +                                                  (string-append
 +                                                   "/bin/"
 +                                                   (string-trim-right match)))
 +                               " "))
                 (("sed -e")
 -                (string-append (assoc-ref inputs "sed")
 -                               "/bin/sed -e"))
 +                (string-append (search-input-file inputs "/bin/sed")
 +                               " -e"))
                 (("cut -d")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/cut -d"))
 +                (string-append (search-input-file inputs "/bin/cut")
 +                               " -d"))
                 (("sleep ")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/sleep "))
 +                (string-append (search-input-file inputs "/bin/sleep")
 +                               " "))
                 (("readlink -f")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/readlink -f")))
 -             #t)))))
 +                (string-append (search-input-file inputs "/bin/readlink")
 +                               " -f"))))))))
      (home-page "https://hwmon.wiki.kernel.org/lm_sensors")
      (synopsis "Utilities to read temperature/voltage/fan sensors")
      (description
@@@ -5201,7 -5289,7 +5349,7 @@@ Bluetooth audio output devices like hea
                   (("hid2hci --method")
                    (string-append out "/lib/udev/hid2hci --method"))
                   (("/sbin/udevadm")
 -                  (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
 +                  (search-input-file inputs "/bin/udevadm")))
                 #t))))))
      (native-inputs
       `(("pkg-config" ,pkg-config)
@@@ -5326,7 -5414,7 +5474,7 @@@ and copy/paste text in the console and 
  (define-public btrfs-progs
    (package
      (name "btrfs-progs")
-     (version "5.13.1")
+     (version "5.14")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://kernel.org/linux/kernel/"
                                    "btrfs-progs-v" version ".tar.xz"))
                (sha256
                 (base32
-                 "16gkyhvvpqpq0skpavkvnmglbld7p331bnpiqn2z9flgwq0mlzix"))))
+                 "0mwxhwws6scjjpfws5xp7988wwwfa46jp5y3kn6jjmjpxiqm85da"))))
      (build-system gnu-build-system)
      (outputs '("out"
                 "static"))      ; static versions of the binaries in "out"
@@@ -5525,8 -5613,7 +5673,8 @@@ obviously it can be shared with files o
  
      (build-system gnu-build-system)
      (arguments
 -     `(#:phases
 +     `(#:configure-flags '("CFLAGS=-fcommon")
 +       #:phases
         (modify-phases %standard-phases
           (add-after 'install 'install-headers
             (lambda* (#:key outputs #:allow-other-keys)
@@@ -5906,7 -5993,6 +6054,7 @@@ invocations of itself."
      (native-inputs `(("pkg-config" ,pkg-config)))
      (arguments
       '(#:configure-flags (list "--disable-static"
 +                               "--disable-ldconfig" ;not necessary
                                 "--exec-prefix=${prefix}"
                                 "--with-fuse=external" ;use our own FUSE
                                 "--enable-mount-helper"
@@@ -7257,11 -7343,6 +7405,11 @@@ libraries, which are often integrated d
      (arguments
       '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
                        ,(string-append "INSTALL_PREFIX=" %output)
 +                      ,(string-append "CFLAGS=-Wall -fpic -fPIC -D_GNU_SOURCE"
 +                                      " -funwind-tables -O3 -g3"
 +                                      " -DPSM_USE_SYS_UUID"
 +                                      " -Wno-strict-aliasing -DNVALGRIND"
 +                                      " -fcommon")
                        ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
         #:tests? #f
         #:phases (modify-phases %standard-phases
@@@ -7708,90 -7789,94 +7856,90 @@@ the superuser to make device nodes."
      (license license:gpl2)))
  
  (define-public fakeroot
 -  (package
 -    (name "fakeroot")
 -    (version "1.25.3")
 -    (source (origin
 -              ;; There are no tags in the repository, so take this snapshot.
 -              (method url-fetch)
 -              (uri (string-append "https://deb.debian.org/debian/pool/main/f/"
 -                                  "fakeroot/fakeroot_" version ".orig.tar.gz"))
 -              (file-name (string-append name "-" version ".tar.gz"))
 -              (sha256
 -               (base32
 -                "0v4m3v1bdqvblwj3vqsb3mllgbci6dsgsydq6765nzvz6n1kd44f"))))
 -    (build-system gnu-build-system)
 -    (arguments
 -     `(#:phases
 -       (modify-phases %standard-phases
 -         (replace 'bootstrap
 -           (lambda _
 -             ;; The "preroll" script takes care of Autoconf and also
 -             ;; prepares the translated manuals.
 -             (invoke "sh" "./preroll")))
 -        (add-after 'configure 'patch-Makefile
 -          (lambda _
 -            ;; Note: The root of the problem is already in "Makefile.am".
 -            (substitute* "Makefile"
 -             (("/bin/sh") (which "sh")))
 -            #t))
 -        (add-after 'unpack 'patch-script
 -          (lambda*  (#:key inputs #:allow-other-keys)
 -            (substitute* "scripts/fakeroot.in"
 -             (("getopt")
 -              (string-append (assoc-ref inputs "util-linux")
 -                             "/bin/getopt"))
 -             (("sed")
 -              (string-append (assoc-ref inputs "sed")
 -                             "/bin/sed"))
 -             (("cut")
 -              (string-append (assoc-ref inputs "coreutils")
 -                             "/bin/cut")) )
 -            #t))
 -        (add-before 'configure 'setenv
 -          (lambda _
 -            (setenv "LIBS" "-lacl")
 -            #t))
 -        (add-before 'check 'prepare-check
 -          (lambda _
 -            (setenv "SHELL" (which "bash"))
 -            (setenv "VERBOSE" "1")
 -            (substitute* "test/t.touchinstall"
 -             ;; We don't have the name of the root user, so use ID=0.
 -             (("grep root") "grep \"\\<0\\>\""))
 -            (substitute* "test/tartest"
 -             ;; We don't have the name of the root group, so use ID=0.
 -             (("ROOTGROUP=root") "ROOTGROUP=0")
 -             ;; We don't have the name of the daemon user, so use IDs.
 -             (("daemon:sys") "1:3")
 -             (("daemon:") "1:"))
 -            ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
 -            (substitute* "test/compare-tar"
 -             (("tar -tvf") "tar --numeric-owner -tvf"))
 -            #t)))))
 -    (native-inputs
 -     `(;; For bootstrapping the package.
 -       ("autoconf" ,autoconf)
 -       ("automake" ,automake)
 -       ("libtool" ,libtool)
 -       ("gettext" ,gettext-minimal)
 -       ("po4a" ,po4a)
 -
 -       ;; For tests.
 -       ("sharutils" ,sharutils)
 -       ("xz" ,xz)))
 -    (inputs
 -     `(("acl" ,acl)
 -       ("libcap" ,libcap)
 -       ("util-linux" ,util-linux)
 -       ("sed" ,sed)
 -       ("coreutils" ,coreutils)))
 -    (synopsis "Provides a fake root environment")
 -    (description "@command{fakeroot} runs a command in an environment where
 +  ;; glibc-2.33 compatibility was added since the last release.
 +  (let ((commit "24d6b0857396cad87b2cabd32fb8af9ef4799915")
 +        (revision "1"))
 +    (package
 +      (name "fakeroot")
 +      (version (git-version "1.25.3" revision commit))
 +      (source (origin
 +                (method git-fetch)
 +                (uri (git-reference
 +                       (url "https://salsa.debian.org/clint/fakeroot.git")
 +                       (commit commit)))
 +                (file-name (git-file-name name version))
 +                (sha256
 +                 (base32
 +                  "0rg9m30k6v930cmj16qwk1k2vn1l2irxj7r3pp3k1i1sdhfkm3df"))))
 +      (build-system gnu-build-system)
 +      (arguments
 +       `(#:phases
 +         (modify-phases %standard-phases
 +           (replace 'bootstrap
 +             (lambda _
 +               ;; The "preroll" script takes care of Autoconf and also
 +               ;; prepares the translated manuals.
 +               (invoke "sh" "./preroll")))
 +          (add-after 'configure 'patch-Makefile
 +            (lambda _
 +              ;; Note: The root of the problem is already in "Makefile.am".
 +              (substitute* "Makefile"
 +               (("/bin/sh") (which "sh")))))
 +          (add-after 'unpack 'patch-script
 +            (lambda*  (#:key inputs #:allow-other-keys)
 +              (substitute* "scripts/fakeroot.in"
 +               (("getopt")
 +                (search-input-file inputs "/bin/getopt"))
 +               (("sed")
 +                (search-input-file inputs "/bin/sed"))
 +               (("cut")
 +                (search-input-file inputs "/bin/cut")) )))
 +          (add-before 'configure 'setenv
 +            (lambda _
 +              (setenv "LIBS" "-lacl")))
 +          (add-before 'check 'prepare-check
 +            (lambda _
 +              (setenv "SHELL" (which "bash"))
 +              (setenv "VERBOSE" "1")
 +              (substitute* "test/t.touchinstall"
 +               ;; We don't have the name of the root user, so use ID=0.
 +               (("grep root") "grep \"\\<0\\>\""))
 +              (substitute* "test/tartest"
 +               ;; We don't have the name of the root group, so use ID=0.
 +               (("ROOTGROUP=root") "ROOTGROUP=0")
 +               ;; We don't have the name of the daemon user, so use IDs.
 +               (("daemon:sys") "1:3")
 +               (("daemon:") "1:"))
 +              ;; We don't have an /etc/passwd entry for "root" - use numeric IDs.
 +              (substitute* "test/compare-tar"
 +               (("tar -tvf") "tar --numeric-owner -tvf")))))))
 +      (native-inputs
 +       `(;; For bootstrapping the package.
 +         ("autoconf" ,autoconf)
 +         ("automake" ,automake)
 +         ("libtool" ,libtool)
 +         ("gettext" ,gettext-minimal)
 +         ("po4a" ,po4a)
 +
 +         ;; For tests.
 +         ("sharutils" ,sharutils)
 +         ("xz" ,xz)))
 +      (inputs
 +       `(("acl" ,acl)
 +         ("libcap" ,libcap)
 +         ("util-linux" ,util-linux)
 +         ("sed" ,sed)
 +         ("coreutils" ,coreutils)))
 +      (synopsis "Provides a fake root environment")
 +      (description "@command{fakeroot} runs a command in an environment where
  it appears to have root privileges for file manipulation. This is useful
  for allowing users to create archives (tar, ar, .deb etc.) with files in
  them with root permissions/ownership. Without fakeroot one would have to
  have root privileges to create the constituent files of the archives with
  the correct permissions and ownership, and then pack them up, or one would
  have to construct the archives directly, without using the archiver.")
 -    (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
 -    (license license:gpl3+)))
 +      (home-page "http://freshmeat.sourceforge.net/projects/fakeroot")
 +      (license license:gpl3+))))
  
  (define-public fakechroot
    (package
@@@ -7844,8 -7929,10 +7992,8 @@@ set as @code{LD_PRELOAD} to override th
           (replace 'build
             (lambda* (#:key inputs #:allow-other-keys)
               (with-directory-excursion "inputattach"
 -               (invoke (string-append (assoc-ref inputs "gcc")
 -                                      "/bin/gcc")
 -                       "-O2" "-o" "inputattach" "inputattach.c"))
 -             #t))
 +               (invoke "gcc" "-O2" "-o" "inputattach"
 +                       "inputattach.c"))))
           (delete 'check)
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
@@@ -7875,8 -7962,7 +8023,8 @@@ types and interfaces and translates so 
                (file-name (git-file-name name version))
                (sha256
                 (base32
 -                "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))))
 +                "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))
 +              (patches (search-patches "pipewire-0.2.7-fno-common.patch"))))
      (build-system meson-build-system)
      (arguments
       '(#:configure-flags '("-Dsystemd=false")))
@@@ -8165,7 -8251,7 +8313,7 @@@ headers."
                  (lambda (python-executable)
                    (format #t "Wrapping: ~A.~%" python-executable)
                    (wrap-program python-executable
 -                    `("PYTHONPATH" ":" prefix
 +                    `("GUIX_PYTHONPATH" ":" prefix
                        (,(string-append lib
                                         "/python"
                                         ,(version-major+minor
diff --combined gnu/packages/llvm.scm
@@@ -18,6 -18,7 +18,7 @@@
  ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+ ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -490,7 -491,7 +491,7 @@@ output), and Binutils."
      (build-system cmake-build-system)
      (outputs '("out" "opt-viewer"))
      (native-inputs
 -     `(("python" ,python)
 +     `(("python" ,python-wrapper)
         ("perl"   ,perl)))
      (inputs
       `(("libffi" ,libffi)))
@@@ -571,7 -572,11 +572,7 @@@ of programming tools as well as librari
        (uri (llvm-uri "llvm" version))
        (sha256
         (base32
 -        "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"))))
 -    (native-inputs
 -     `(;; TODO: Switch to Python 3 in the next rebuild cycle.
 -       ("python" ,python-2)
 -       ("perl"   ,perl)))))
 +        "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"))))))
  
  (define-public clang-runtime-11
    (clang-runtime-from-llvm
  (define-public llvm-10
    (package
      (inherit llvm-11)
 -    (version "10.0.0")
 +    (version "10.0.1")
      (source
       (origin
        (method url-fetch)
        (uri (llvm-uri "llvm" version))
        (sha256
         (base32
 -        "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz"))))))
 +        "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))))
  
  (define-public clang-runtime-10
    (clang-runtime-from-llvm
     llvm-10
 -   "0x9c531k6ww21s2mkdwqx1vbdjmx6d4wmfb8gdbj0wqa796sczba"))
 +   "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"))
  
  (define-public clang-10
    (clang-from-llvm llvm-10 clang-runtime-10
 -                   "08fbxa2a0kr3ni35ckppj0kyvlcyaywrhpqwcdrdy0z900mhcnw8"
 +                   "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"
                     #:patches '("clang-10.0-libc-search-path.patch")
                     #:tools-extra
                     (origin
                                               (package-version llvm-10)))
                       (sha256
                        (base32
 -                       "074ija5s2jsdn0k035r2dzmryjmqxdnyg4xwvaqych2bazv8rpxc")))))
 +                       "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh")))))
  
  (define-public clang-toolchain-10
    (make-clang-toolchain clang-10))
               (add-after 'unpack 'find-rpc-includes
                 (lambda* (#:key inputs #:allow-other-keys)
                   (setenv "CPATH"
 -                         (string-append (assoc-ref inputs "libtirpc")
 -                                        "/include/tirpc/:"
 -                                        (or (getenv "CPATH") "")))
 +                         (string-append
 +                          (search-input-directory inputs "/include/tirpc")
 +                          ":" (or (getenv "CPATH") "")))
                   (setenv "CPLUS_INCLUDE_PATH"
 -                         (string-append (assoc-ref inputs "libtirpc")
 -                                        "/include/tirpc/:"
 -                                        (or (getenv "CPLUS_INCLUDE_PATH") "")))
 -                 #t))))))
 +                         (string-append
 +                          (search-input-directory inputs "/include/tirpc")
 +                          ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))))))))
        (inputs
         `(("libtirpc" ,libtirpc)
           ("llvm" ,llvm-3.5))))))
  (define-public clang clang-9)
  (define-public clang-toolchain clang-toolchain-9)
  
+ (define-public llvm-for-rocm
+   (package
+     ;; Actually based on LLVM 13 as of v4.3, but llvm-12 works just fine.
+     (inherit llvm-12)
+     (name "llvm-for-rocm")
+     (version "4.3.0")                         ;this must match '%rocm-version'
+     (source (origin
+               (method git-fetch)
+               (uri (git-reference
+                     (url "https://github.com/RadeonOpenCompute/llvm-project.git")
+                     (commit (string-append "rocm-" version))))
+               (file-name (git-file-name name version))
+               (sha256
+                (base32
+                 "0p75nr1qpmy6crymdax5hm40wkimman4lnglz4x5cnbiqindya7s"))
+               (patches
+                (search-patches "llvm-roc-4.2.0-add_Object.patch"
+                                "llvm-roc-3.0.0-add_libraries.patch"
+                                "llvm-roc-4.0.0-remove-isystem-usr-include.patch"))))
+     (arguments
+      (substitute-keyword-arguments (package-arguments llvm-12)
+        ((#:phases phases '%standard-phases)
+         `(modify-phases ,phases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (chdir "llvm")))))
+        ((#:configure-flags flags)
+         ''("-DLLVM_ENABLE_PROJECTS=llvm;clang;lld"
+            "-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86"
+            "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
+            "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+            "-DBUILD_SHARED_LIBS:BOOL=TRUE"
+            "-DLLVM_VERSION_SUFFIX="))))
+     (properties `((hidden? . #t)
+                   ,@(package-properties llvm-12)))))
\f
  (define-public lld
    (package
      (name "lld")
diff --combined gnu/packages/mail.scm
@@@ -32,7 -32,7 +32,7 @@@
  ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
  ;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
- ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+ ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  ;;; Copyright © 2020, 2021 Alexey Abramov <levenson@mmer.org>
  ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
@@@ -40,7 -40,6 +40,7 @@@
  ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
  ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
  ;;; Copyright © 2020 divoplade <d@divoplade.fr>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
  ;;;
    #:use-module (guix build-system gnu)
    #:use-module (guix build-system go)
    #:use-module (guix build-system guile)
+   #:use-module (guix build-system emacs)
    #:use-module (guix build-system meson)
    #:use-module (guix build-system perl)
    #:use-module (guix build-system python)
@@@ -261,18 -261,16 +262,16 @@@ example, modify the message headers or 
  (define-public mailutils
    (package
      (name "mailutils")
-     (version "3.10")
+     (version "3.13")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/mailutils/mailutils-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "17smrxjdgbbzbzakik30vj46q4iib85ksqhb82jr4vjp57akszh9"))
+                "1iwl82d6aa2acsdxbqh1s5xx44sg83b4yxqik408m1s9rcfrf86r"))
               (patches
-               ;; Fixes https://issues.guix.gnu.org/43088.
-               (search-patches "mailutils-fix-uninitialized-variable.patch"
-                               "mailutils-variable-lookup.patch"))))
+               (search-patches "mailutils-variable-lookup.patch"))))
      (build-system gnu-build-system)
      (arguments
       `(#:phases
               ;; The 'pipeact.at' tests generate a shell script; make
               ;; sure it uses the right shell.
               (substitute* '("sieve/tests/testsuite"
-                             "mh/tests/testsuite")
-                (("#! /bin/sh")
+                             "mh/tests/testsuite"
+                             "libmailutils/tests/lock.at")
+                (("#! ?/bin/sh")
                  (string-append "#!" (which "sh"))))
  
               (substitute* "mh/tests/testsuite"
                   (format port "Path: ~a/Mail-for-tests~%"
                           (getcwd))))
  
-              #t)))
-        ;; TODO: Add `--with-sql'.
+              (substitute* "imap4d/tests/testclient.c"
+                (("\"/bin/sh\"")
+                 (string-append "\"" (which "sh") "\""))))))
         #:configure-flags
         (list "--sysconfdir=/etc"
  
                                             (package-inputs this-package))
                                 (("guile" guile)
                                  (version-major+minor
-                                  (package-version guile))))))
-        #:parallel-tests? #f))
+                                  (package-version guile))))))))
      (native-inputs
-      `(("perl" ,perl)                           ;for 'gylwrap'
+      ;; Regeneration of the build system is triggered by touching the
+      ;; 'libmailutils/tests/lock.at' file.
+      `(("autoconf" ,autoconf)
+        ("automake" ,automake)
+        ("gettext" ,gettext-minimal)
+        ("libtool" ,libtool)
+        ("m4" ,m4)
+        ("perl" ,perl)                           ;for 'gylwrap'
         ("texinfo" ,texinfo)
         ("dejagnu" ,dejagnu)))
      (inputs
-      `(("m4" ,m4)
-        ("guile" ,guile-3.0)
+      `(("guile" ,guile-3.0)
         ("gsasl" ,gsasl)
         ("gnutls" ,gnutls)
         ("ncurses" ,ncurses)
         ("linux-pam" ,linux-pam)
         ("libltdl" ,libltdl)
         ("gdbm" ,gdbm)
         ;; Required for SEARCH CHARSET.
         ("libiconv" ,libiconv)
         ("libunistring" ,libunistring)))
  processing electronic mail.  It contains both utilities and server daemons
  and all operate in a protocol-agnostic way.  The underlying libraries are
  also available, simplifying the addition of mail capabilities to new
- software.")
+ software.  GNU Mailutils provides the following commands:
+ @itemize @command
+ @item dotlock
+ @item decodemail
+ @item frm
+ @item from
+ @item guimb
+ @item mail
+ @item mailutils
+ @item mailutils-config
+ @item messages
+ @item mimeview
+ @item movemail
+ @item popauth
+ @item putmail
+ @item readmsg
+ @item sieve
+ @end itemize")
      (license
       ;; Libraries are under LGPLv3+, and programs under GPLv3+.
       (list license:gpl3+ license:lgpl3+))))
@@@ -1207,7 -1227,8 +1228,7 @@@ security functionality including PGP, S
             (lambda* (#:key inputs #:allow-other-keys)
               ;; For mu/test/test-mu-query.c
               (setenv "TZDIR"
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))))
 +                     (search-input-directory inputs "share/zoneinfo"))))
           (add-after 'install 'install-emacs-autoloads
             (lambda* (#:key outputs #:allow-other-keys)
               (emacs-generate-autoloads
@@@ -1313,7 -1334,7 +1334,7 @@@ Notmuch."
                 (let* ((out (assoc-ref outputs "out"))
                        (bin (string-append out "/bin/notifymuch")))
                   (wrap-program bin
 -                   `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
 +                   `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
                     `("GI_TYPELIB_PATH" ":" prefix
                       (,(getenv "GI_TYPELIB_PATH")
                        ,(string-append out "/lib/girepository-1.0")))))
@@@ -1342,31 -1363,18 +1363,18 @@@ invoking @command{notifymuch} from the 
                  "1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf"))))
      (build-system gnu-build-system)
      (arguments
-      `(#:modules ((guix build gnu-build-system)
-                   ((guix build emacs-build-system) #:prefix emacs:)
-                   (guix build utils))
-        #:imported-modules (,@%gnu-build-system-modules
-                            (guix build emacs-build-system)
-                            (guix build emacs-utils))
-        #:make-flags
+      `(#:make-flags
         (list "V=1"                      ; verbose test output
               "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
         #:phases (modify-phases %standard-phases
-                   (add-after 'unpack 'patch-notmuch-lib.el
-                     (lambda _
-                       (substitute* "emacs/notmuch-lib.el"
-                         (("/bin/sh") (which "sh")))))
                    (replace 'configure
                      (lambda* (#:key outputs #:allow-other-keys)
-                       (setenv "CC" "gcc")
+                       (setenv "CC" ,(cc-for-target))
                        (setenv "CONFIG_SHELL" (which "sh"))
-                       (let* ((out (assoc-ref outputs "out"))
-                              (elisp (emacs:elpa-directory out)))
+                       (let* ((out (assoc-ref outputs "out")))
                          (invoke "./configure"
                                  (string-append "--prefix=" out)
-                                 (string-append "--emacslispdir=" elisp)
-                                 (string-append "--emacsetcdir=" elisp)))))
+                                 "--without-emacs"))))
                    (add-before 'check 'disable-failing-tests
                      ;; FIXME: Investigate why these tests are failing,
                      ;; and try removing this for notmuch versions > 0.31.
                          (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))))
                    (add-before 'check 'prepare-test-environment
                      (lambda _
-                       (setenv "TEST_CC" "gcc")
+                       (setenv "TEST_CC" ,(cc-for-target))
                        ;; Patch various inline shell invocations.
                        (substitute* (find-files "test" "\\.sh$")
-                         (("/bin/sh") (which "sh")))))
-                   (add-after 'install 'make-autoloads
-                     (assoc-ref emacs:%standard-phases 'make-autoloads)))))
+                         (("/bin/sh") (which "sh"))))))))
      (native-inputs
       `(("bash-completion" ,bash-completion)
-        ("emacs" ,emacs-no-x)    ; -minimal lacks libxml, needed for some tests
         ("pkg-config" ,pkg-config)
         ("python" ,python)
         ("python-docutils" ,python-docutils)
         ("sphinx" ,python-sphinx)
+        ("texinfo" ,texinfo)
  
         ;; The following are required for tests only.
+        ("emacs" ,emacs-no-x)    ; -minimal lacks libxml, needed for some tests
         ("which" ,which)
         ("dtach" ,dtach)
         ("gnupg" ,gnupg)
  ing, and tagging large collections of email messages.")
      (license license:gpl3+)))
  
+ (define-public emacs-notmuch
+   (package
+     (inherit notmuch)
+     (name "emacs-notmuch")
+     (build-system emacs-build-system)
+     (native-inputs '())
+     (inputs
+      `(("notmuch" ,notmuch)))
+     (arguments
+      `(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude)
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'chdir
+            (lambda _
+              (chdir "emacs")))
+          (add-after 'chdir 'patch-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((notmuch (assoc-ref inputs "notmuch")))
+                (substitute* "notmuch-lib.el"
+                  (("\"notmuch\"")
+                   (string-append "\"" notmuch "/bin/notmuch\"")))))))))
+     (synopsis "Run Notmuch within Emacs")
+     (description
+      "This package provides an Emacs-based interface to the Notmuch mail
+ system.")))
  (define-public notmuch-addrlookup-c
    (package
      (name "notmuch-addrlookup-c")
@@@ -1639,8 -1672,8 +1672,8 @@@ compresses it."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "src/procmime.c"
                 (("/usr/share/mime/globs")
 -                (string-append (assoc-ref inputs "shared-mime-info")
 -                               "/share/mime/globs"))))))))
 +                (search-input-directory inputs
 +                                        "/share/mime/globs"))))))))
      (native-inputs
       `(("bison" ,bison)
         ;;("docbook-utils" ,docbook-utils)
@@@ -2982,7 -3015,6 +3015,7 @@@ transfer protocols."
               (let ((out (assoc-ref outputs "out"))
                     (path (getenv "PERL5LIB")))
                 (wrap-script (string-append out "/bin/sieve-connect")
 +                 #:guile (search-input-file inputs "bin/guile")
                   `("PERL5LIB" ":" = (,path)))
                 #t))))))
      (inputs
@@@ -3517,6 -3549,7 +3550,6 @@@ which sends emails to HyperKitty, the o
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
               (invoke "example_project/manage.py" "test"
                       "--settings=hyperkitty.tests.settings_test"))))))
      (propagated-inputs
@@@ -4150,7 -4183,7 +4183,7 @@@ Git and exports them in maildir format 
                      ;; 'git' is invoked in various files of the PublicInbox
                      ;; perl module.
                      `("PATH" ":" prefix
 -                      (,(string-append (assoc-ref inputs "git") "/bin")))))
 +                      (,(dirname (search-input-file inputs "/bin/git"))))))
                  (find-files (string-append out "/bin"))))
               #t)))))
      (native-inputs
diff --combined gnu/packages/man.scm
@@@ -36,7 -36,6 +36,7 @@@
    #:use-module (gnu packages dbm)
    #:use-module (gnu packages flex)
    #:use-module (gnu packages gawk)
 +  #:use-module (gnu packages gettext)
    #:use-module (gnu packages groff)
    #:use-module (gnu packages less)
    #:use-module (gnu packages perl)
@@@ -255,6 -254,10 +255,10 @@@ the traditional flat-text whatis databa
                                          "\n"))))))))
      (native-inputs `(("perl" ,perl)))             ;used to run tests
      (inputs `(("zlib" ,zlib)))
+     (native-search-paths
+      (list (search-path-specification
+             (variable "MANPATH")
+             (files '("share/man")))))
      (synopsis "Tools for BSD mdoc and man pages")
      (description
       "mandoc is a suite of tools compiling mdoc, the roff macro language of
@@@ -304,11 -307,9 +308,11 @@@ Linux kernel and C library interfaces e
      (license license:gpl2+)))
  
  (define-public help2man
 +  ;; TODO: Manual pages for languages not available from the implicit
 +  ;; input "locales" contain the original (English) text.
    (package
      (name "help2man")
 -    (version "1.47.13")
 +    (version "1.48.3")
      (source
       (origin
        (method url-fetch)
                            version ".tar.xz"))
        (sha256
         (base32
 -        "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p"))))
 +        "1b58s40dh2lflrkgbyxg1s48p8icb5a5yzp9ch83kg9zchygyqc3"))))
      (build-system gnu-build-system)
      (arguments `(;; There's no `check' target.
 -                 #:tests? #f))
 +                 #:tests? #f
 +                 #:phases
 +                 (modify-phases %standard-phases
 +                   (add-after 'unpack 'patch-help2man-with-perl-gettext
 +                     (lambda* (#:key inputs #:allow-other-keys)
 +                       (let ((lib (assoc-ref inputs "perl-gettext"))
 +                             (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
 +                         (substitute* "help2man.PL"
 +                           (("^use Locale::gettext.*$" load)
 +                            (format #f fmt lib load))))
 +                       #t)))))
      (inputs
       `(("perl" ,perl)
 -       ;; TODO: Add these optional dependencies.
 -       ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
 -       ;; ("gettext" ,gettext-minimal)
 -       ))
 +       ("perl-gettext" ,perl-gettext)))
      (native-inputs
 -     `(("perl" ,perl)))
 +     `(("perl" ,perl)
 +       ("gettext" ,gettext-minimal)))
      (home-page "https://www.gnu.org/software/help2man/")
      (synopsis "Automatically generate man pages from program --help")
      (description
diff --combined gnu/packages/maths.scm
@@@ -26,7 -26,7 +26,7 @@@
  ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
  ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
  ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
 -;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
 +;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
  ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
  ;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
  ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
@@@ -48,7 -48,6 +48,7 @@@
  ;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
  ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
  ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
 +;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -73,7 -72,6 +73,7 @@@
    #:use-module (guix packages)
    #:use-module (guix download)
    #:use-module (guix git-download)
 +  #:use-module (guix gexp)
    #:use-module (guix utils)
    #:use-module ((guix build utils) #:select (alist-replace))
    #:use-module (guix build-system cmake)
@@@ -86,7 -84,6 +86,7 @@@
    #:use-module (gnu packages audio)
    #:use-module (gnu packages autotools)
    #:use-module (gnu packages base)
 +  #:use-module (gnu packages bash)
    #:use-module (gnu packages bison)
    #:use-module (gnu packages boost)
    #:use-module (gnu packages check)
    #:use-module (gnu packages scheme)
    #:use-module (gnu packages serialization)
    #:use-module (gnu packages shells)
 +  #:use-module (gnu packages sphinx)
    #:use-module (gnu packages tcl)
    #:use-module (gnu packages texinfo)
    #:use-module (gnu packages tex)
      (inputs `(("gtk+" ,gtk+)
                ("libxml2" ,libxml2)))
      (native-inputs `(("pkg-config" ,pkg-config)))
 +    (arguments
 +     `(#:configure-flags '("CFLAGS=-fcommon")))
      (synopsis "Natural deduction first-order logic interface")
      (description "Aris is a program for performing logical proofs.  It supports
  propositional and predicate logic, as well as Boolean algebra and
@@@ -382,8 -376,8 +382,8 @@@ programming language."
                       (let* ((out (assoc-ref outputs "out"))
                              (bin (string-append out "/bin")))
                         (wrap-program (string-append bin "/units_cur")
 -                         `("PYTHONPATH" ":" prefix
 -                           ,(search-path-as-string->list (getenv "PYTHONPATH"))))
 +                         `("GUIX_PYTHONPATH" ":" prefix
 +                           ,(search-path-as-string->list (getenv "GUIX_PYTHONPATH"))))
                         #t))))))
     (synopsis "Conversion between thousands of scales")
     (description
@@@ -521,56 -515,46 +521,56 @@@ precision floating point numbers."
  (define-public gsl
    (package
      (name "gsl")
 -    (version "2.6")
 +    (version "2.7")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnu/gsl/gsl-"
                                    version ".tar.gz"))
                (sha256
                 (base32
 -                "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp"))))
 +                "0av04cpblphvvs3kl5rwphniarml503501vrpqw31rd0bmwg7fzg"))))
      (build-system gnu-build-system)
      (arguments
       (let ((system (%current-system)))
 -       (cond
 -        ((or (string-prefix? "aarch64" system)
 -             (string-prefix? "powerpc" system))
 -         ;; Some sparse matrix tests are failing on AArch64 and PowerPC:
 -         ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
 -         '(#:phases (modify-phases %standard-phases
 -                      (add-before 'check 'disable-failing-tests
 -                        (lambda _
 -                          (substitute* "spmatrix/test.c"
 -                            ((".*test_complex.*") "\n"))
 -                          #t)))))
 -        ((string-prefix? "i686" system)
 -         ;; There are rounding issues with these tests on i686:
 -         ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
 -         ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
 -         '(#:phases (modify-phases %standard-phases
 -                      (add-before 'check 'disable-failing-tests
 -                        (lambda _
 -                          (substitute* "linalg/test.c"
 -                            ((".*gsl_test\\(test_LU_decomp.*") "\n")
 -                            ((".*gsl_test\\(test_LUc_decomp.*") "\n")
 -                            ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
 -                            ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
 -                          (substitute* "spmatrix/test.c"
 -                            ((".*test_all.*") "\n")
 -                            ((".*test_float.*") "\n")
 -                            ((".*test_complex.*") "\n"))
 -                          #t)))))
 -        (else '()))))
 +       `(#:configure-flags (list "--disable-static") ;halves package size
 +         #:phases
 +         (modify-phases %standard-phases
 +           ,@(cond
 +              ((or (string-prefix? "aarch64" system)
 +                   (string-prefix? "powerpc" system))
 +               ;; Some sparse matrix tests are failing on AArch64 and PowerPC:
 +               ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
 +               '((add-before 'check 'disable-failing-tests
 +                   (lambda _
 +                     (substitute* "spmatrix/test.c"
 +                       ((".*test_complex.*") "\n"))))))
 +
 +              ((string-prefix? "i686" system)
 +               ;; There are rounding issues with these tests on i686:
 +               ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
 +               ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
 +               '((add-before 'check 'disable-failing-tests
 +                   (lambda _
 +                     (substitute* "linalg/test.c"
 +                       ((".*gsl_test\\(test_LU_decomp.*") "\n")
 +                       ((".*gsl_test\\(test_LUc_decomp.*") "\n")
 +                       ((".*gsl_test\\(test_QR_decomp_r.*") "\n")
 +                       ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
 +                       ((".*gsl_test\\(test_pcholesky_solve.*") "\n")
 +                       ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
 +                     (substitute* "spmatrix/test.c"
 +                       ((".*test_all.*") "\n")
 +                       ((".*test_float.*") "\n")
 +                       ((".*test_complex.*") "\n"))
 +
 +                     ;; XXX: These tests abort with:
 +                     ;; gsl: cholesky.c:645: ERROR: matrix is not positive definite
 +                     (substitute* '("multifit_nlinear/test.c"
 +                                    "multilarge_nlinear/test.c")
 +                       (("gsl_ieee_env_setup.*" all)
 +                        (string-append "exit (77);\n" all)))))))
 +
 +              (else '()))))))
      (home-page "https://www.gnu.org/software/gsl/")
      (synopsis "Numerical library for C and C++")
      (description
@@@ -1097,8 -1081,6 +1097,8 @@@ computations."
      (arguments
       `(#:parallel-tests? #f
         #:configure-flags (list "--enable-shared"
 +                               "FCFLAGS=-fallow-argument-mismatch"
 +                               "FFLAGS=-fallow-argument-mismatch"
                                 (string-append "CPPFLAGS=-I"
                                                (assoc-ref %build-inputs "libtirpc")
                                                "/include/tirpc"))
               ;; .so-files.  We truncate the hashes to avoid
               ;; unnecessary store references to those compilers:
               (substitute* "libhdf4.settings"
 -               (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
 +               (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
                  (string-append prefix (string-take hash 10) "...")))
               #t))
           (add-after 'install 'provide-absolute-libjpeg-reference
@@@ -1400,17 -1382,16 +1400,17 @@@ extremely large and complex data collec
                              "hdf/hdf5lib/exceptions/Makefile.in"
                              "hdf/hdflib/Makefile.in")
                 (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
 -                (string-append (assoc-ref inputs "slf4j-api")
 -                               "/share/java/slf4j-api.jar")))
 +                (search-input-file inputs "/share/java/slf4j-api.jar")))
               ;; Replace outdated config.sub and config.guess:
               (with-directory-excursion "config"
                 (for-each (lambda (file)
                             (install-file
 -                            (string-append (assoc-ref inputs "automake")
 -                                           "/share/automake-"
 -                                           ,(version-major+minor (package-version automake))
 -                                           "/" file) "."))
 +                            (search-input-file inputs
 +                                               (string-append
 +                                                "/share/automake-"
 +                                                ,(version-major+minor (package-version automake))
 +                                                "/" file))
 +                            "."))
                           '("config.sub" "config.guess")))
  
               ;; Fix embedded version number
                                "test/hdf5lib/junit.sh.in"
                                "examples/runExample.sh.in")
                   (("/usr/bin/test")
 -                  (string-append (assoc-ref inputs "coreutils")
 -                                 "/bin/test"))
 +                  (search-input-file inputs "/bin/test"))
                   (("/usr/bin/uname")
 -                  (string-append (assoc-ref inputs "coreutils")
 -                                 "/bin/uname"))
 +                  (search-input-file inputs "/bin/uname"))
                   (("CLASSPATH=[^\n]*")
                    (string-append "CLASSPATH=" class-path)))
                 (setenv "CLASSPATH" class-path))
@@@ -1678,13 -1661,6 +1678,13 @@@ similar to MATLAB, GNU Octave or SciPy.
         (sha256
          (base32
           "1a2fpp15a2rl1m50gcvvzd9y6bavl6vjf9zzf63sz5gdmq06yiqf"))
 +       (modules '((guix build utils)))
 +       (snippet
 +        ;; Make sure this variable is defined only once.  Failing to do so
 +        ;; would break builds of 'netcdf-parallel-openmpi' with a
 +        ;; multiple-definition link error with GCC 10.
 +        '(substitute* "ncdump/ocprint.c"
 +           (("^int ocdebug") "static int ocdebug")))
         (patches (search-patches "netcdf-date-time.patch"))))
      (build-system gnu-build-system)
      (native-inputs
               ;; filenames to avoid unnecessary references to the corresponding
               ;; store items.
               (substitute* "libnetcdf.settings"
 -               (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
 +               (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
                  (string-append prefix (string-take hash 10) "...")))
               #t)))
  
@@@ -1767,9 -1743,7 +1767,9 @@@ sharing of scientific data."
                  "0x4acvfhbsx1q79dkkwrwbgfhm0w5ngnp4zj5kk92s1khihmqfhj"))))
      (build-system gnu-build-system)
      (arguments
 -     `(#:parallel-tests? #f))
 +     `(#:configure-flags '("FCFLAGS=-fallow-argument-mismatch"
 +                           "FFLAGS=-fallow-argument-mismatch")
 +       #:parallel-tests? #f))
      (inputs
       `(("netcdf" ,netcdf)))
      (native-inputs
@@@ -2302,7 -2276,7 +2302,7 @@@ script files."
         ,@(package-inputs octave-cli)))
      (native-inputs
       `(("qttools" , qttools) ;for lrelease
 -       ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-epsf))) ; for texi2dvi
         ,@(package-native-inputs octave-cli)))
      (arguments
       (substitute-keyword-arguments (package-arguments octave-cli)
@@@ -3811,9 -3785,8 +3811,9 @@@ to BMP, JPEG or PNG image formats."
         (patches (search-patches "maxima-defsystem-mkdir.patch"))))
      (build-system gnu-build-system)
      (inputs
 -     `(("gcl" ,gcl)
 +     `(("bash" ,bash-minimal)
         ("gnuplot" ,gnuplot)                       ;for plots
 +       ("sbcl" ,sbcl)
         ("sed" ,sed)
         ("tk" ,tk)))                               ;Tcl/Tk is used by 'xmaxima'
      (native-inputs
         ("python" ,python)))
      (arguments
       `(#:configure-flags
 -       (list "--enable-gcl"
 -             (string-append "--with-posix-shell="
 -                            (assoc-ref %build-inputs "bash")
 -                            "/bin/sh")
 -             (string-append "--with-wish="
 -                            (assoc-ref %build-inputs "tk")
 -                            "/bin/wish"
 -                            (let ((v ,(package-version tk)))
 -                              (string-take v (string-index-right v #\.)))))
 +       ,#~(list "--enable-sbcl"
 +                (string-append "--with-sbcl=" #$sbcl "/bin/sbcl")
 +                (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh")
 +                (string-append "--with-wish=" #$tk "/bin/wish"
 +                               #$(version-major+minor (package-version tk))))
         ;; By default Maxima attempts to write temporary files to
         ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
         ;; Work around that.
         (modify-phases %standard-phases
           (add-after 'unpack 'patch-paths
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
 +             (let* ((sed (search-input-file inputs "/bin/sed"))
                      (coreutils (assoc-ref inputs "coreutils"))
                      (dirname (string-append coreutils "/bin/dirname"))
                      (head (string-append coreutils "/bin/head"))
 -                    (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
 -                    (python (string-append (assoc-ref inputs "python")
 -                                           "/bin/python3")))
 +                    (perl (search-input-file inputs "/bin/perl"))
 +                    (python (search-input-file inputs "/bin/python3")))
                 (substitute* "src/maxima.in"
                   (("sed ") (string-append sed " "))
                   (("dirname") dirname)
               (invoke "sh" "-c"
                       (string-append
                        "./maxima-local "
 -                      "--lisp=gcl "
 +                      "--lisp=sbcl "
                        "--batch-string=\"run_testsuite();\" "
                        "| grep -q \"No unexpected errors found\""))))
           ;; Make sure the doc and emacs files are found in the
               (let* ((gnuplot (assoc-ref inputs "gnuplot"))
                      (out (assoc-ref outputs "out"))
                      (datadir (string-append out "/share/maxima/" ,version))
 -                    (binutils (string-append (assoc-ref inputs "binutils")
 -                                             "/bin")))
 +                    (binutils (dirname (search-input-file inputs "/bin/as"))))
                 (with-directory-excursion out
                   (mkdir-p "share/emacs")
                   (mkdir-p "share/doc")
@@@ -4040,17 -4019,16 +4040,17 @@@ parts of it."
  (define-public openblas
    (package
      (name "openblas")
 -    (version "0.3.9")
 +    (version "0.3.13")
      (source
       (origin
 -       (method url-fetch)
 -       (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20"
 -                           version "%20version.tar.gz"))
 -       (file-name (string-append name "-" version ".tar.gz"))
 +       (method git-fetch)
 +       (uri (git-reference
 +             (url "https://github.com/xianyi/OpenBLAS")
 +             (commit (string-append "v" version))))
 +       (file-name (git-file-name name version))
         (sha256
          (base32
 -         "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3"))))
 +         "14jxh0v3jfbw4mfjx4mcz4dd51lyq7pqvh9k8dg94539ypzjr2lj"))))
      (build-system gnu-build-system)
      (arguments
       `(#:test-target "test"
                         (string-prefix? "i686" system))
                     '("DYNAMIC_ARCH=1"))
                    ;; On some of these architectures the CPU can't be detected.
 -                  ((string-prefix? "powerpc64le" system)
 +                  ((or (string-prefix? "powerpc64le" system)
 +                       (string-prefix? "aarch64" system))
                     '("DYNAMIC_ARCH=1"
                       "TARGET=GENERIC"))
                    ;; On MIPS we force the "SICORTEX" TARGET, as for the other
                    ;; for Loongson cores are used.
                    ((string-prefix? "mips" system)
                     '("TARGET=SICORTEX"))
 -                  ;; On aarch64 force the generic 'armv8-a' target
 -                  ((string-prefix? "aarch64" system)
 -                   '("TARGET=ARMV8"))
                    ;; Failed to detect CPU.
                    ((string-prefix? "armhf" system)
                     '("TARGET=ARMV7"))
@@@ -4398,7 -4378,6 +4398,7 @@@ packages."
                (method url-fetch)
                (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
                                    version "/atlas" version ".tar.bz2"))
 +              (patches (search-patches "atlas-gfortran-compat.patch"))
                (sha256
                 (base32
                  "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
@@@ -5074,7 -5053,7 +5074,7 @@@ set."
  (define-public hypre
    (package
      (name "hypre")
 -    (version "2.15.1")
 +    (version "2.20.0")
      (source
       (origin
         (method git-fetch)
               (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
 -        (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4"))
 -       (modules '((guix build utils)))
 -       (snippet
 -        '(begin
 -           ;; Remove use of __DATE__ and __TIME__ for reproducibility;
 -           ;; substitute the release date.
 -           (substitute* "src/utilities/HYPRE_utilities.h"
 -             (("Date Compiled: .*$")
 -              "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n"))
 -           #t))))
 +        (base32 "14iqjwg5sv1qjn7c2cfv0xxmn9rwamjrhh9hgs8fjbywcbvrkjdi"))))
      (build-system gnu-build-system)
 -    (outputs '("out"                    ; 6.1 MiB of headers and libraries
 -               "doc"))                  ; 4.8 MiB of documentation
 +    (outputs '("out"                    ;5.3 MiB of headers and libraries
 +               "doc"))                  ;12 MiB of documentation
      (native-inputs
       `(("doc++" ,doc++)
 -       ("netpbm" ,netpbm)
 -       ("perl" ,perl)                   ; needed to run 'ppmquant' during tests
 -       ("texlive" ,(texlive-union (list texlive-xypic
 -                                        texlive-cm
 -                                        texlive-latex-hyperref
 -                                        texlive-bibtex)))
 -       ("ghostscript" ,ghostscript)))
 +       ("doxygen" ,doxygen)
 +       ("python" ,python)
 +       ("python-breathe" ,python-breathe)
 +       ("python-sphinx" ,python-sphinx)
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
 +                                             texlive-amsfonts
 +                                             texlive-bibtex
 +                                             texlive-caption
 +                                             texlive-cm
 +                                             texlive-etoolbox
 +                                             texlive-jknappen
 +                                             texlive-sectsty
 +                                             texlive-tex-gyre
 +                                             texlive-wasy
 +                                             texlive-xcolor
 +                                             texlive-xypic
 +                                             texlive-generic-listofitems
 +                                             texlive-generic-ulem
 +                                             texlive-latex-capt-of
 +                                             texlive-latex-cmap
 +                                             texlive-latex-colortbl
 +                                             texlive-latex-etoc
 +                                             texlive-latex-fancyhdr
 +                                             texlive-latex-fancyvrb
 +                                             texlive-latex-float
 +                                             texlive-latex-fncychap
 +                                             texlive-latex-framed
 +                                             texlive-latex-geometry
 +                                             texlive-latex-hanging
 +                                             texlive-hyperref
 +                                             texlive-latex-multirow
 +                                             texlive-latex-natbib
 +                                             texlive-latex-needspace
 +                                             texlive-latex-newunicodechar
 +                                             texlive-latex-parskip
 +                                             texlive-latex-stackengine
 +                                             texlive-latex-tabulary
 +                                             texlive-latex-titlesec
 +                                             texlive-latex-tocloft
 +                                             texlive-latex-upquote
 +                                             texlive-latex-varwidth
 +                                             texlive-wasysym
 +                                             texlive-latex-wrapfig)))))
      (inputs
       `(("blas" ,openblas)
         ("lapack" ,lapack)))
                             "--with-blas")
         #:phases
         (modify-phases %standard-phases
 -         (add-before 'build 'set-HOME
 -           (lambda _
 -             ;; FIXME: texlive-union does not find the built
 -             ;; metafonts, so it tries to generate them in HOME.
 -             (setenv "HOME" "/tmp")
 -             #t))
           (add-before 'configure 'chdir-src
             (lambda _ (chdir "src")))
           (replace 'configure
                                            configure-flags)))))))
           (add-after 'build 'build-docs
             (lambda _
 -             (invoke "make" "-Cdocs" "pdf" "html")))
 +             (invoke "make" "-C" "docs")))
           (replace 'check
             (lambda _
               (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
                             (when (positive? size)
                               (error (format #f "~a size ~d; error indication~%"
                                              filename size)))))
 -                       (find-files "test" ".*\\.err$"))
 -             #t))
 +                       (find-files "test" ".*\\.err$"))))
           (add-after 'install 'install-docs
             (lambda* (#:key outputs #:allow-other-keys)
               ;; Custom install because docs/Makefile doesn't honor ${docdir}.
                 (with-directory-excursion "docs"
                   (for-each (lambda (base)
                               (install-file (string-append base ".pdf") docdir)
 -                             (copy-recursively base docdir)) ; html docs
 -                           '("HYPRE_usr_manual"
 -                             "HYPRE_ref_manual")))
 -               #t))))))
 +                             (copy-recursively (string-append base "-html")
 +                                               (string-append docdir "/" base)))
 +                           '("usr-manual" "ref-manual")))))))))
      (home-page "https://computing.llnl.gov/projects\
  /hypre-scalable-linear-solvers-multigrid-methods")
      (synopsis "Library of solvers and preconditioners for linear equations")
@@@ -6430,7 -6390,7 +6430,7 @@@ management via the GIMPS project's Prim
  (define-public nauty
    (package
      (name "nauty")
-     (version "2.7r2")
+     (version "2.7r3")
      (source
       (origin
         (method url-fetch)
               "https://pallini.di.uniroma1.it/"
               "nauty" (string-join (string-split version #\.) "") ".tar.gz"))
         (sha256
-         (base32 "0s57rq7kk3rrwgrjygpwjvq9bbwq4wjbpcvgbz191jhwv8bnrhb9"))))
+         (base32 "1hl81gpf3xjf809w04jczvilq1ixy9ch1qrax8a7lgx52svna1jg"))))
      (build-system gnu-build-system)
      (outputs '("out" "lib"))
      (arguments
@@@ -6818,8 -6778,9 +6818,8 @@@ of C, Java, or Ada programs."
         (modify-phases %standard-phases
           (add-before 'configure 'export-shell
             (lambda* (#:key inputs #:allow-other-keys)
 -             (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
 -                                                   "/bin/sh"))
 -             #t)))))
 +             (setenv "CONFIG_SHELL"
 +                     (search-input-file inputs "/bin/sh")))))))
      (inputs
       `(("gmp" ,gmp)))
      (propagated-inputs
diff --combined gnu/packages/music.scm
@@@ -17,7 -17,7 +17,7 @@@
  ;;; Copyright © 2018 nee <nee.git@hidamari.blue>
  ;;; Copyright © 2018, 2021 Stefan Reichör <stefan@xsteve.at>
  ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 -;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
  ;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com>
  ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
@@@ -632,7 -632,7 +632,7 @@@ many input formats and provides a custo
               ;; Replace hard-coded diff file name.
               (substitute* "tests/integration.c"
                 (("/usr/bin/diff")
 -                (string-append (assoc-ref inputs "diffutils") "/bin/diff")))
 +                (search-input-file inputs "/bin/diff")))
               ;; Denemo's documentation says to use this command to run its
               ;; test suite.
               (invoke "make" "-C" "tests" "check")))
             ;; This phase sets the default path for lilypond to its current
             ;; location in the store.
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let* ((lilypond (string-append (assoc-ref inputs "lilypond")
 -                                             "/bin/lilypond")))
 +             (let* ((lilypond (search-input-file inputs "/bin/lilypond")))
                 (substitute* "src/core/prefops.c"
                   (("g_string_new \\(\"lilypond\"\\);")
                    (string-append "g_string_new (\""
@@@ -1493,6 -1494,15 +1493,6 @@@ and auto-mapping slices to MIDI note nu
                              "/share/fonts/opentype/"))
         #:phases
         (modify-phases %standard-phases
 -         (add-after 'unpack 'use-texlive-union
 -           (lambda _
 -             ;; FIXME: fonts are not found and have to be generated in HOME.
 -             (setenv "HOME" "/tmp")
 -             ;; The test for the "lh" package fails, even though it is among
 -             ;; the inputs.
 -             (substitute* "configure"
 -               (("TEX_FIKPARM=.*") "TEX_FIKPARM=found\n"))
 -             #t))
           (add-after 'unpack 'fix-path-references
             (lambda _
               (substitute* "scm/backend-library.scm"
         ("gettext" ,gettext-minimal)
         ("imagemagick" ,imagemagick)
         ("netpbm" ,netpbm)               ;for pngtopnm
 -       ("texlive" ,(texlive-union (list texlive-metapost
 -                                        texlive-generic-epsf
 -                                        texlive-latex-lh
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-metapost
 +                                        texlive-epsf
 +                                        texlive-lh
                                          texlive-latex-cyrillic)))
         ("texinfo" ,texinfo)
         ("texi2html" ,texi2html-1.82)
@@@ -1589,7 -1599,7 +1589,7 @@@ Guile."
         ("python-iniconfig" ,python-iniconfig)
         ("python-isort" ,python-isort)
         ("python-mypy" ,python-mypy)
 -       ("python-pytest" ,python-pytest-6)
 +       ("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)
         ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)))
      (inputs
@@@ -1644,7 -1654,7 +1644,7 @@@ typographic detail of symbols on the pa
         ("python-iniconfig" ,python-iniconfig)
         ("python-isort" ,python-isort)
         ("python-mypy" ,python-mypy)
 -       ("python-pytest" ,python-pytest-6)
 +       ("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)
         ("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
      (propagated-inputs
@@@ -1686,7 -1696,7 +1686,7 @@@ and manipulating rhythms such as accele
         ("python-iniconfig" ,python-iniconfig)
         ("python-isort" ,python-isort)
         ("python-mypy" ,python-mypy)
 -       ("python-pytest" ,python-pytest-6)
 +       ("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)
         ("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
      (propagated-inputs
@@@ -1733,7 -1743,7 +1733,7 @@@ music theorist Paul Nauert's quantizati
         ("python-iniconfig" ,python-iniconfig)
         ("python-isort" ,python-isort)
         ("python-mypy" ,python-mypy)
 -       ("python-pytest" ,python-pytest-6)
 +       ("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)
         ("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
      (propagated-inputs
@@@ -1885,7 -1895,7 +1885,7 @@@ complete studio."
         `(("liblo" ,liblo)
           ("gtkmm" ,gtkmm)
           ("alsa-lib" ,alsa-lib)
-          ("libxmlplusplus" ,libxmlplusplus-2.6)))
+          ("libxml++" ,libxml++-2)))
        (native-inputs
         `(("glib:bin" ,glib "bin")
           ("pkg-config" ,pkg-config)))
@@@ -2093,9 -2103,9 +2093,9 @@@ for path in [path for path in sys.path 
             (lambda* (#:key inputs outputs #:allow-other-keys)
               ;; Make sure 'solfege' runs with the correct PYTHONPATH.
               (let* ((out (assoc-ref outputs "out"))
 -                    (path (getenv "PYTHONPATH")))
 +                    (path (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/solfege")
 -                 `("PYTHONPATH" ":" prefix (,path))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,path))))
               #t)))))
      (inputs
       `(("python" ,python-2)
@@@ -3201,7 -3211,9 +3201,7 @@@ can connect to any JACK port and recor
               ;; Fix reference to dlopened libraries.
               (substitute* "jackselect/alsainfo.py"
                 (("libasound.so.2")
 -                (string-append (assoc-ref inputs "alsa-lib")
 -                               "/lib/libasound.so.2")))
 -             #t))
 +                (search-input-file inputs "/lib/libasound.so.2")))))
           (replace 'build
             (assoc-ref python:%standard-phases 'build))
           (add-after 'install 'wrap
@@@ -3472,7 -3484,8 +3472,7 @@@ socket or command line."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "curseradio/curseradio.py"
                 (("/usr/bin/mpv")
 -                (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
 -             #t)))))
 +                (search-input-file inputs "/bin/mpv"))))))))
      (propagated-inputs
       `(("python-lxml" ,python-lxml)
         ("python-requests" ,python-requests)
@@@ -5006,7 -5019,7 +5006,7 @@@ studio."
  (define-public gsequencer
    (package
      (name "gsequencer")
-     (version "3.8.13")
+     (version "3.10.18")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "1gwy7fhbxgrd5n6afq1hnxc6p873wsh4qs63yhkkdfzyl7s412z4"))))
+         (base32 "126kbvdkxy82mmkl19qhp9k6iz5xclar06chbj7lf580x96c899c"))))
      (build-system glib-or-gtk-build-system)
      (arguments
       `(#:phases
@@@ -6352,6 -6365,7 +6352,6 @@@ and as an LV2 plugin."
     (build-system meson-build-system)
     (arguments
      `(#:glib-or-gtk? #t
 -      #:meson ,meson-0.55
        #:configure-flags
        `("-Dtests=true"
          "-Dmanpage=true"
@@@ -6824,7 -6838,7 +6824,7 @@@ It is provided as an LV2 plugin and as 
                 (substitute* (string-append bin "a2j")
                   (("a2j_control") (string-append bin "a2j_control")))
                 (wrap-program (string-append bin "a2j_control")
 -                `("PYTHONPATH" prefix (,(getenv "PYTHONPATH"))))
 +                `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))
                 #t))))))
      (build-system meson-build-system)
      (inputs
@@@ -1,5 -1,5 +1,5 @@@
  ;;; GNU Guix --- Functional package management for GNU
 -;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2014, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
  ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2015, 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at>
@@@ -24,7 -24,7 +24,7 @@@
  ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
  ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
  ;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
- ;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
+ ;;; Copyright © 2018, 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
  ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
  ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
@@@ -44,7 -44,7 +44,8 @@@
  ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
  ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
  ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 +;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+ ;;; Copyright © 2021 Milkey Mouse <milkeymouse@meme.institute>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -304,7 -304,6 +305,7 @@@ Android, and ChromeOS."
      (native-inputs
       `(("glib:bin" ,glib "bin")
         ("gobject-introspection" ,gobject-introspection)
 +       ("graphviz" ,graphviz)
         ("gtk-doc" ,gtk-doc/stable)
         ("pkg-config" ,pkg-config)))
      (inputs
@@@ -386,6 -385,30 +387,30 @@@ supported, including rtmp://, rtmpt://
          ;; Others.
          license:gpl2+)))))
  
+ (define-public slurm-monitor
+   (package
+     (name "slurm-monitor")
+     (version "0.4.3")
+     (source
+      (origin
+        (method git-fetch)
+        (uri
+         (git-reference
+          (url "https://github.com/mattthias/slurm")
+          (commit (string-append "upstream/" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "1n6pgrcs8gwrcq5fch1q3yk3jipjwrf21s9a13fbjrl903g5zzv9"))))
+     (build-system cmake-build-system)
+     (arguments `(#:tests? #f)) ;no tests
+     (inputs `(("ncurses" ,ncurses)))
+     (synopsis "Network load monitor")
+     (description
+      "Slurm is a network load monitor.  It shows real-time traffic statistics
+ from any network device in any of three ASCII graph formats.")
+     (home-page "https://github.com/mattthias/slurm")
+     (license license:gpl2)))
  (define-public srt
    (package
      (name "srt")
@@@ -646,24 -669,26 +671,24 @@@ systems with no further dependencies."
                                "blueman-manager.in" "blueman-mechanism.in"
                                "blueman-rfcomm-watcher.in" "blueman-sendto.in"
                                "blueman-services.in" "blueman-tray.in")
 -                 (("@PYTHON@") (string-append (assoc-ref inputs "python")
 -                                              "/bin/python"
 -                                              ,(version-major+minor
 -                                                (package-version python))))))
 -             #t))
 +                 (("@PYTHON@")
 +                  (search-input-file inputs
 +                                     (string-append
 +                                      "/bin/python"
 +                                      ,(version-major+minor
 +                                        (package-version python)))))))))
           ;; Fix loading of external programs.
           (add-after 'unpack 'patch-external-programs
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* '("blueman/main/NetConf.py"
                              "blueman/main/PPPConnection.py")
                 (("/usr/sbin/bluetoothd")
 -                (string-append (assoc-ref inputs "bluez")
 -                               "/libexec/bluetooth/bluetoothd"))
 +                (search-input-directory inputs
 +                                        "/libexec/bluetooth/bluetoothd"))
                 (("/sbin/iptables")
 -                (string-append (assoc-ref inputs "iptables")
 -                               "/sbin/iptables"))
 +                (search-input-file inputs "/sbin/iptables"))
                 (("/usr/sbin/pppd")
 -                (string-append (assoc-ref inputs "ppp")
 -                               "/sbin/pppd")))
 -             #t))
 +                (search-input-file inputs "/sbin/pppd")))))
           ;; Fix loading of pulseaudio libraries.
           (add-after 'unpack 'patch-pulseaudio-libraries
             (lambda* (#:key inputs #:allow-other-keys)
                 (for-each
                  (lambda (program)
                    (wrap-program program
 -                    `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,lib))
 +                    `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,lib))
                      `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
                  (append
                   (map (lambda (prog) (string-append bin prog))
@@@ -1741,7 -1766,9 +1766,7 @@@ TCP connection, TLS handshake and so on
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "test-suite/testheaders.sh"
                 (("/bin/true")
 -                (string-append (assoc-ref inputs "coreutils")
 -                               "/bin/true")))
 -             #t)))))
 +                (search-input-file inputs "/bin/true"))))))))
      (inputs
       `(("perl" ,perl)
         ("openldap" ,openldap)
@@@ -1836,8 -1863,8 +1861,8 @@@ live network and disk I/O bandwidth mon
                        #t))
                    (add-after 'build 'absolutize-tools
                      (lambda* (#:key inputs #:allow-other-keys)
 -                      (let ((ethtool (string-append (assoc-ref inputs "ethtool")
 -                                                    "/sbin/ethtool")))
 +                      (let ((ethtool (search-input-file inputs
 +                                                        "/sbin/ethtool")))
                          (substitute* "scripts/airmon-ng"
                            (("ethtool ")
                             (string-append ethtool " ")))
@@@ -3391,7 -3418,7 +3416,7 @@@ and targeted primarily for asynchronou
        (build-system cmake-build-system)
        (inputs
         `(("argon2" ,argon2)
 -         ("nettle" ,nettle-3.7)
 +         ("nettle" ,nettle)
           ("readline" ,readline)
           ("jsoncpp" ,jsoncpp)
           ("openssl" ,openssl)             ;required for the DHT proxy
@@@ -3509,6 -3536,39 +3534,39 @@@ A very simple IM client working over th
  protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
      (license license:gpl2+)))
  
+ (define-public bird
+   (package
+     (name "bird")
+     (version "2.0.8")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "ftp://bird.network.cz/pub/bird/bird-"
+                                   version ".tar.gz"))
+               (sha256
+                (base32
+                 "1xp7f0im1v8pqqx3xqyfkd1nsxk8vnbqgrdrwnwhg8r5xs1xxlhr"))))
+     (inputs
+      `(("libssh" ,libssh)
+        ("readline" ,readline)))
+     (native-inputs
+      `(("bison" ,bison)
+        ("flex" ,flex)))
+     (arguments
+      `(#:configure-flags '("--localstatedir=/var" "--enable-ipv6")
+        #:phases
+        (modify-phases %standard-phases
+          (add-before 'configure 'dont-create-sysconfdir
+            (lambda* (#:key outputs #:allow-other-keys)
+              (substitute* "Makefile.in"
+                ((" \\$\\(DESTDIR)/\\$\\(runstatedir)") "")))))))
+     (build-system gnu-build-system)
+     (home-page "http://bird.network.cz")
+     (synopsis "Internet Routing Daemon")
+     (description "BIRD is an Internet routing daemon with full support for all
+ the major routing protocols.  It allows redistribution between protocols with a
+ powerful route filtering syntax and an easy-to-use configuration interface.")
+     (license license:gpl2+)))
  (define-public iwd
    (package
      (name "iwd")
@@@ -3641,8 -3701,11 +3699,8 @@@ module @code{batman-adv}, for Layer 2."
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (man (string-append out "/share/man")))
 -               (invoke "make"
 -                       (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
 -                       "doc/pagekite.1")
 -               (install-file "doc/pagekite.1" (string-append man "/man1"))
 -               #t))))))
 +               (invoke "make" "doc/pagekite.1")
 +               (install-file "doc/pagekite.1" (string-append man "/man1"))))))))
      (inputs
       `(("python-six" ,python-six)
         ("python-socksipychain" ,python-socksipychain)))
@@@ -298,6 -298,13 +298,13 @@@ GiB)."
               (invoke "py.test" "-v" "-k"
                       ;; TODO: Those tests fail, why?
                       "not test_classify_change_actions")))
+          (add-after 'install 'copy-styles
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((styles "/share/gtksourceview-3.0/styles"))
+                (copy-recursively
+                 (string-append (assoc-ref inputs "gtksourceview") styles)
+                 (string-append (assoc-ref outputs "out") styles))
+                #t)))
           (add-after 'wrap 'glib-or-gtk-wrap
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
           (add-after 'wrap 'wrap-typelib
@@@ -348,7 -355,7 +355,7 @@@ you to figure out what is going on in t
                   ;; as the python modules in this package in the wsgi.py file,
                   ;; as this will ensure they are available at runtime.
                   (define pythonpath
 -                   (string-append (getenv "PYTHONPATH")
 +                   (string-append (getenv "GUIX_PYTHONPATH")
                                    ":"
                                    (site-packages inputs outputs)))
                   (display
diff --combined gnu/packages/perl.scm
@@@ -13,7 -13,7 +13,7 @@@
  ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
  ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  ;;; Copyright © 2017 Raoul J.P. Bonnal <ilpuccio.febo@gmail.com>
 -;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
 +;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
  ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
  ;;; Copyright © 2017, 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
    ;; Yeah, Perl...  It is required early in the bootstrap process by Linux.
    (package
      (name "perl")
 -    (version "5.30.2")
 +    (version "5.34.0")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/src/5.0/perl-"
                                   version ".tar.gz"))
               (sha256
                (base32
 -               "128nfdxcvxfn5kq55qcfrx2851ys8hv794dcdxbyny8rm7w7vnv6"))
 +               "16mywn5afpv1mczv9dlc1w84rbgjgrr0pyr4c0hhb2wnif0zq7jm"))
               (patches (search-patches
                         "perl-no-sys-dirs.patch"
                         "perl-autosplit-default-time.patch"
 -                       "perl-deterministic-ordering.patch"
                         "perl-reproducible-build-date.patch"))))
      (build-system gnu-build-system)
      (arguments
         #:phases
         (modify-phases %standard-phases
           (add-before 'configure 'setup-configure
 -           (lambda _
 +           (lambda* (#:key inputs #:allow-other-keys)
               ;; Use the right path for `pwd'.
 -             ;; TODO: use coreutils from INPUTS instead of 'which'
 -             ;; in next rebuild cycle, see fixup below.
               (substitute* "dist/PathTools/Cwd.pm"
 -               (("/bin/pwd")
 -                (which "pwd")))
 +               (("'/bin/pwd'")
 +                (string-append "'" (search-input-file inputs "bin/pwd") "'")))
  
               ;; Build in GNU89 mode to tolerate C++-style comment in libc's
               ;; <bits/string3.h>.
               (substitute* "cflags.SH"
                 (("-std=c89")
 -                "-std=gnu89"))
 -             #t))
 +                "-std=gnu89"))))
           ,@(if (%current-target-system)
                 `((add-after 'unpack 'unpack-cross
                     (lambda* (#:key native-inputs inputs #:allow-other-keys)
                       (let ((cross-checkout
 -                            (assoc-ref native-inputs "perl-cross"))
 -                           (cross-patch
 -                            (assoc-ref native-inputs "perl-cross-patch")))
 +                            (assoc-ref native-inputs "perl-cross")))
                         (rename-file "Artistic" "Artistic.perl")
                         (rename-file "Copying" "Copying.perl")
 -                       (copy-recursively cross-checkout ".")
 -                       (format #t "Applying ~a\n" cross-patch)
 -                       (invoke "patch" "-p1" "-i" cross-patch))
 +                       (copy-recursively cross-checkout "."))
                       (let ((bash (assoc-ref inputs "bash")))
                         (substitute* '("Makefile.config.SH"
                                        "cnf/config.guess"
                           (("! */bin/sh") (string-append "! " bash "/bin/bash"))
                           ((" /bin/sh") (string-append bash "/bin/bash")))
                         (substitute* '("ext/Errno/Errno_pm.PL")
 -                         (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))
 -                       #t))
 +                         (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))))
                   (replace 'configure
                     (lambda* (#:key configure-flags outputs inputs #:allow-other-keys)
                       (let* ((out (assoc-ref outputs "out"))
                                         (lambda (x) (or (string-prefix? "-d" x)
                                                         (string-prefix? "-Dcc=" x))))
                                        configure-flags)))
 -                            (bash (assoc-ref inputs "bash"))
 -                            (coreutils (assoc-ref inputs "coreutils")))
 +                            (bash (assoc-ref inputs "bash")))
                         (format (current-error-port)
 -                               "running ./configure ~a\n" (string-join configure-flags))
 +                               "running ./configure ~a\n"
 +                               (string-join configure-flags))
                         (apply invoke (cons "./configure" configure-flags))
                         (substitute* "config.sh"
                           (((string-append store-directory "/[^/]*-bash-[^/]*"))
                            bash))
                         (substitute* '("config.h")
                           (("^#define SH_PATH .*")
 -                          (string-append  "#define SH_PATH \"" bash "/bin/bash\"\n")))
 -                       ;;TODO: fix this in setup-configure next rebuild cycle
 -                       (substitute* "dist/PathTools/Cwd.pm"
 -                         (((string-append store-directory "/[^/]*-coreutils-[^/]*"))
 -                          coreutils))
 -                       #t)))
 +                          (string-append  "#define SH_PATH \""
 +                                          bash "/bin/bash\"\n"))))))
                   (add-after 'build 'touch-non-built-files-for-install
                     (lambda _
                       ;; `make install' wants to install these although they do
                                   '("Pod-Usage/blib/script/pod2text"
                                     "Pod-Usage/blib/script/pod2usage"
                                     "Pod-Checker/blib/script/podchecker"
 -                                   "Pod-Parser/blib/script/podselect")))
 -                     #t)))
 +                                   "Pod-Parser/blib/script/podselect"))))))
                 `((replace 'configure
                     (lambda* (#:key configure-flags #:allow-other-keys)
                       (format #t "Perl configure flags: ~s~%" configure-flags)
                               (("libpth => .*$")
                                (string-append "libpth => '" libc
                                               "/lib',\n"))))
 -                         config2)
 -               #t))))))
 +                         config2)))))))
      (inputs
 -     (if (%current-target-system)
 -         `(("bash" ,bash-minimal)
 -           ("coreutils" ,coreutils))
 -         '()))
 +     (append (list coreutils-minimal)
 +             (if (%current-target-system)
 +                 (list bash-minimal)
 +                 '())))
      (native-inputs
       (if (%current-target-system)
           `(("perl-cross"
                 (method git-fetch)
                 (uri (git-reference
                       (url "https://github.com/arsv/perl-cross")
 -                     (commit "1.3.3")))
 -               (file-name (git-file-name "perl-cross" "1.3.3"))
 +                     (commit "1.3.6")))
 +               (file-name (git-file-name "perl-cross" "1.3.6"))
                 (sha256
 -                (base32 "065qbl1x44maykaj8p8za0b6qxj74bz7fi2zsrlydir1mqb1js3d"))))
 -           ("perl-cross-patch" ,@(search-patches "perl-cross.patch")))
 +                (base32 "0k5vyj40czbkfl7r3dcwxpc7dvdlp2xliaav358bviq3dq9vq9bb")))))
           '()))
      (native-search-paths (list (search-path-specification
                                  (variable "PERL5LIB")
@@@ -1944,7 -1960,7 +1944,7 @@@ and writing of @code{.ini}-style config
      (build-system perl-build-system)
      (home-page "https://metacpan.org/release/Const-Fast")
      (synopsis "Facility for creating read-only scalars, arrays, and hashes")
-     (description "This package provides prodecures to create read-only
+     (description "This package provides procedures to create read-only
  scalars, arrays, and hashes.")
      (license (package-license perl))))
  
@@@ -5110,25 -5126,6 +5110,25 @@@ vaguely inspired by John Ousterhout's T
      (home-page "https://metacpan.org/release/Getopt-Tabular")
      (license (package-license perl))))
  
 +(define-public perl-gettext
 +  (package
 +    (name "perl-gettext")
 +    (version "1.07")
 +    (source (origin
 +              (method url-fetch)
 +              (uri (string-append "mirror://cpan/authors/id/P/PV/PVANDRY"
 +                                  "/gettext-" version ".tar.gz"))
 +              (sha256
 +               (base32
 +                "05cwqjxxary11di03gg3fm6j9lbvg1dr2wpr311c1rwp8salg7ch"))))
 +    (build-system perl-build-system)
 +    (home-page "https://metacpan.org/release/gettext")
 +    (synopsis "Perl bindings for POSIX i18n gettext functions")
 +    (description
 +     "Locale::gettext provides an object oriented interface to the
 +internationalization functions provided by the C library.")
 +    (license license:perl-license)))
 +
  (define-public perl-graph
    (package
      (name "perl-graph")
@@@ -8648,39 -8645,13 +8648,39 @@@ available."
           "01xifj83dv492lxixijmg6va02rf3ydlxly0a9slmx22r6qa1drh"))))
      (build-system perl-build-system)
      (propagated-inputs
 -     `(("perl-devel-symdump" ,perl-devel-symdump)))
 +     `(("perl-devel-symdump" ,perl-devel-symdump)
 +       ("perl-pod-parser" ,perl-pod-parser)))
      (home-page "https://metacpan.org/release/Pod-Coverage")
      (synopsis "Check for comprehensive documentation of a module")
      (description "This module provides a mechanism for determining if the pod
  for a given module is comprehensive.")
      (license (package-license perl))))
  
 +(define-public perl-pod-parser
 +  (package
 +    (name "perl-pod-parser")
 +    (version "1.63")
 +    (source (origin
 +              (method url-fetch)
 +              (uri (string-append
 +                    "mirror://cpan/authors/id/M/MA/MAREKR/Pod-Parser-"
 +                    version ".tar.gz"))
 +              (sha256
 +               (base32
 +                "1k8clxxdjag56zm6cv38c3q81gj7xphfhh98l21jynwp55hvbq6v"))))
 +    (build-system perl-build-system)
 +    (home-page "https://metacpan.org/release/Pod-Parser")
 +    (synopsis "Modules for parsing/translating POD format documents")
 +    (description
 +     "@code{Pod::Parser} is a base class for creating POD filters and
 +translators.  It handles most of the effort involved with parsing the POD
 +sections from an input stream, leaving subclasses free to be concerned only
 +with performing the actual translation of text.
 +
 +@emph{NOTE}: This module is considered legacy.  New projects should prefer
 +@code{Pod::Simple} instead.")
 +    (license license:perl-license)))
 +
  (define-public perl-pod-simple
    (package
      (name "perl-pod-simple")
@@@ -11510,7 -11481,7 +11510,7 @@@ MYMETA.yml."
  (define-public perl-module-build
    (package
      (name "perl-module-build")
 -    (version "0.4229")
 +    (version "0.4231")
      (source
       (origin
         (method url-fetch)
                             "Module-Build-" version ".tar.gz"))
         (sha256
          (base32
 -         "064c03wxia7jz0i578awj4srykj0nnigm4p5r0dv0559rnk93r0z"))))
 +         "05xpn8qg814y49vrih16zfr9iiwb7pmdf57ahjnc2h0p5illq3vy"))))
      (build-system perl-build-system)
      (propagated-inputs
       `(("perl-cpan-meta" ,perl-cpan-meta)))
@@@ -11808,8 -11779,9 +11808,8 @@@ prop, vhea, vmtx and the reading and wr
           ;; This is needed for tests
           (add-after 'unpack 'set-TZDIR
             (lambda* (#:key inputs #:allow-other-keys)
 -             (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
 -                                            "/share/zoneinfo"))
 -             #t)))))
 +             (setenv "TZDIR"
 +                     (search-input-directory inputs "share/zoneinfo")))))))
      (native-inputs
       `(("perl-module-build" ,perl-module-build)
         ("tzdata" ,tzdata-for-tests)))
@@@ -1,6 -1,6 +1,6 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
  ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
  ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
@@@ -43,6 -43,7 +43,7 @@@
  ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
  ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
  ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+ ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -64,7 -65,6 +65,7 @@@
    #:use-module (guix download)
    #:use-module (guix git-download)
    #:use-module (guix build-system python)
 +  #:use-module (guix gexp)
    #:use-module (guix utils)
    #:use-module (gnu packages)
    #:use-module (gnu packages base)
@@@ -194,9 -194,12 +195,9 @@@ API rules."
                  (string-append "@pytest.mark.xfail\n" all)))
  
               ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
 -             (delete-file "tests/test_pytest_plugin.py")
 -             #t))
 +             (delete-file "tests/test_pytest_plugin.py")))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
 -             (setenv "PYTHONPATH"
 -                     (string-append ".:" (getenv "PYTHONPATH")))
               (if tests?
                   (invoke "pytest" "-vv"
                           ;; Disable loading the aiohttp coverage plugin
@@@ -331,6 -334,9 +332,6 @@@ comes with a SOCKS proxy client."
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)
@@@ -370,13 -376,13 +371,13 @@@ WSGI.  This package includes libraries 
  (define-public python-aws-sam-translator
    (package
      (name "python-aws-sam-translator")
-     (version "1.36.0")
+     (version "1.38.0")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "aws-sam-translator" version))
                (sha256
                 (base32
-                 "115mcbb4r205c1hln199llqrvvbijfqz075rwx991l99jc6rj6zs"))))
+                 "1djwlsjpbh13m4biglimrm9lq7hmla0k29giay7k3cjsrylxvjhf"))))
      (build-system python-build-system)
      (arguments
       `(;; XXX: Tests are not distributed with the PyPI archive, and would
@@@ -442,6 -448,9 +443,6 @@@ Model} (SAM) templates into AWS CloudFo
                                    "tests/ext/aiohttp/test_client.py"))))
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:.:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv" "tests"))))))
      (native-inputs
       `(;; These are required for the test suite.
@@@ -470,7 -479,7 +471,7 @@@ emit information from within their appl
  (define-public python-cfn-lint
    (package
      (name "python-cfn-lint")
-     (version "0.51.0")
+     (version "0.54.1")
      (home-page "https://github.com/aws-cloudformation/cfn-python-lint")
      (source (origin
                (method git-fetch)
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "1027s243sik25c6sqw6gla7k7vl3jdicrik5zdsa8pafxh2baja4"))))
+                 "161mzzlpbi85q43kwzrj39qb32l6wg6xhnbbd4z860yrfbymsn87"))))
      (build-system python-build-system)
      (arguments
       `(#:phases (modify-phases %standard-phases
                           "test/unit/module/maintenance/test_update_documentation.py")
                          (delete-file
                           "test/unit/module/maintenance/test_update_resource_specs.py")
-                         (invoke "python" "-m" "unittest" "discover"
 -                        (setenv "PYTHONPATH"
 -                                (string-append "./build/lib:"
 -                                               (getenv "PYTHONPATH")))
 -                        (setenv "PATH" (string-append out "/bin:"
 -                                                      (getenv "PATH")))
+                         (invoke "python" "-m" "unittest" "discover" "-v"
                                  "-s" "test")))))))
      (native-inputs
       `(("python-pydot" ,python-pydot)
@@@ -775,6 -789,9 +776,6 @@@ content using a variety of algorithms."
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv"
                                ;; Prevent running the flake8 and black
                                ;; pytest plugins, which only tests style
@@@ -1177,8 -1194,7 +1178,8 @@@ and written in Python."
       `(("libxml2" ,libxml2)))
      (propagated-inputs
       `(("python-lxml" ,python-lxml)
 -       ("python-beautifulsoup4" ,python-beautifulsoup4)))
 +       ("python-beautifulsoup4" ,python-beautifulsoup4)
 +       ("python-chardet" ,python-chardet)))
      (home-page "https://html5-parser.readthedocs.io")
      (synopsis "Fast C-based HTML5 parsing for Python")
      (description "This package provides a fast implementation of the HTML5
@@@ -1468,6 -1484,9 +1469,6 @@@ another XPath engine to find the matchi
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "tests" "-vv"
                                ;; XXX: This fails with newer Pytest
                                ;; (upstream uses Pytest 3..).
@@@ -2770,14 -2789,15 +2771,14 @@@ authenticated session objects providin
  (define-public python-urllib3
    (package
      (name "python-urllib3")
 -    (version "1.26.2")
 +    (version "1.26.4")
      (source
        (origin
          (method url-fetch)
          (uri (pypi-uri "urllib3" version))
          (sha256
           (base32
 -          "024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r"))))
 -    (replacement python-urllib3/fixed)
 +          "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77"))))
      (build-system python-build-system)
      (arguments `(#:tests? #f))
      (propagated-inputs
@@@ -2796,6 -2816,18 +2797,6 @@@ supports url redirection and retries, a
      (properties `((python2-variant . ,(delay python2-urllib3))))
      (license license:expat)))
  
 -(define python-urllib3/fixed
 -  (package
 -    (inherit python-urllib3)
 -    (version "1.26.4")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "urllib3" version))
 -       (sha256
 -        (base32
 -         "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77"))))))
 -
  ;; Some software requires an older version of urllib3, notably Docker.
  (define-public python-urllib3-1.24
    (package (inherit python-urllib3)
@@@ -2944,21 -2976,22 +2945,21 @@@ minimum of WSGI."
  (define-public python-flask
    (package
      (name "python-flask")
 -    (version "1.1.2")
 +    (version "2.0.1")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "Flask" version))
                (sha256
                 (base32
 -                "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
 +                "0mcgwq7b4qd99mf5bsvs3wphchxarf8kgil4hwww3blj31xjak0w"))))
      (build-system python-build-system)
      (arguments
       '(#:phases
         (modify-phases %standard-phases
           (replace 'check
 -           (lambda _
 -             (setenv "PYTHONPATH" (string-append "./build/lib:"
 -                                                 (getenv "PYTHONPATH")))
 -             (invoke "pytest" "-vv" "tests"))))))
 +           (lambda* (#:key tests? #:allow-other-keys)
 +             (when tests?
 +               (invoke "pytest" "-vv" "tests")))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (propagated-inputs
@@@ -2990,6 -3023,8 +2991,6 @@@ presume or force a developer to use a p
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH" (string-append "./build/lib:"
 -                                                 (getenv "PYTHONPATH")))
               (invoke "pytest" "-vv"))))))
      (propagated-inputs
       `(("python-flask-babel" ,python-flask-babel)
@@@ -3516,13 -3551,13 +3517,13 @@@ applications."
  (define-public python-flask-sqlalchemy
    (package
      (name "python-flask-sqlalchemy")
-     (version "2.4.4")
+     (version "2.5.1")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "Flask-SQLAlchemy" version))
                (sha256
                 (base32
-                 "1rgsj49gnx361hnb3vn6c1h17497qh22yc3r70l1r6w0mw71bixz"))))
+                 "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-flask" ,python-flask)
@@@ -3763,9 -3798,13 +3764,9 @@@ for Flask."
                      (lambda _
                        ;; This test requires 'postcss' and 'babel' which are
                        ;; not yet available in Guix.
 -                      (delete-file "tests/test_filters.py")
 -                      #t))
 +                      (delete-file "tests/test_filters.py")))
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv"))))))
      (native-inputs
       `(("python-jinja2" ,python-jinja2)
@@@ -4059,31 -4098,28 +4060,31 @@@ List.  Forked from and using the same A
  (define-public python-werkzeug
    (package
      (name "python-werkzeug")
 -    (version "1.0.1")
 +    (version "2.0.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "Werkzeug" version))
         (sha256
          (base32
 -         "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))))
 +         "0hlwawnn8c41f254qify5jnjj8xb97n294h09bqimzqhs0qdpq8x"))))
      (build-system python-build-system)
      (arguments
       '(#:phases
         (modify-phases %standard-phases
 -         (delete 'check)
 -         (add-after 'install 'check
 -           (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (add-installed-pythonpath inputs outputs)
 -             (invoke "python" "-m" "pytest"))))))
 +         (replace 'check
 +           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
 +             (when tests?
 +               (add-installed-pythonpath inputs outputs)
 +               (invoke "python" "-m" "pytest"
 +                       ;; Test tries to use the network.
 +                       "-k not test_reloader_sys_path")))))))
      (propagated-inputs
       `(("python-requests" ,python-requests)))
      (native-inputs
       `(("python-pytest" ,python-pytest)
 -       ("python-pytest-timeout" ,python-pytest-timeout)))
 +       ("python-pytest-timeout" ,python-pytest-timeout)
 +       ("python-pytest-xprocess" ,python-pytest-xprocess)))
      (home-page "https://palletsprojects.com/p/werkzeug/")
      (synopsis "Utilities for WSGI applications")
      (description "One of the most advanced WSGI utility modules.  It includes a
@@@ -4115,28 -4151,37 +4116,37 @@@ addon modules."
  (define-public python-wtforms
    (package
      (name "python-wtforms")
-     (version "2.1")
+     (version "2.3.3")
      (source
       (origin
         (method url-fetch)
-        (uri (pypi-uri "WTForms" version ".zip"))
+        (uri (pypi-uri "WTForms" version))
         (sha256
          (base32
-          "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
+          "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
      (build-system python-build-system)
      (arguments
-      '(#:phases
+      `(#:phases
         (modify-phases %standard-phases
-          (add-after 'unpack 'remove-django-test
-            ;; Don't fail the tests when the inputs for the optional tests cannot be found.
+          (add-after 'unpack 'delete-bundled-test
             (lambda _
-              (substitute*
-                "tests/runtests.py"
-                (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
-                (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
-              #t)))))
+              ;; Delete test copied from a third party package that fails
+              ;; with newer SQLAlchemy.  This can be removed for 3.0.
+              ;; See <https://github.com/wtforms/wtforms/issues/696>.
+              (delete-file "tests/ext_sqlalchemy.py")))
+          (replace 'check
+            (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+              (when tests?
+                (add-installed-pythonpath inputs outputs)
+                (invoke "python" "setup.py" "compile_catalog")
+                (invoke "python" "tests/runtests.py")))))))
      (native-inputs
-      `(("unzip" ,unzip)))
+      `(("python-dateutil" ,python-dateutil)
+        ("python-sqlalchemy" ,python-sqlalchemy)))
+     (propagated-inputs
+      `(("python-babel" ,python-babel)
+        ("python-email-validator" ,python-email-validator)
+        ("python-markupsafe" ,python-markupsafe)))
      (home-page "http://wtforms.simplecodes.com/")
      (synopsis
       "Form validation and rendering library for Python web development")
@@@ -4146,9 -4191,6 +4156,6 @@@ for Python web development.  It is ver
  available in Django, but is a standalone package.")
      (license license:bsd-3)))
  
- (define-public python2-wtforms
-   (package-with-python2 python-wtforms))
  (define-public python-paste
    (package
      (name "python-paste")
@@@ -4266,36 -4308,17 +4273,36 @@@ name resolutions asynchronously."
  (define-public python-yarl
    (package
      (name "python-yarl")
 -    (version "1.1.1")
 +    (version "1.6.3")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "yarl" version))
         (sha256
          (base32
 -         "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
 +         "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
 +       (modules '((guix build utils)))
 +       (snippet
 +         #~(begin
 +             (delete-file "yarl/_quoting_c.c")))))
      (build-system python-build-system)
 +    (arguments
 +      (list #:tests? #f     ; test suite can't find yarl._quoting_c
 +            #:phases
 +            #~(modify-phases %standard-phases
 +                (add-after 'unpack 'cythonize-code
 +                  (lambda _
 +                    (invoke "cython" "yarl/_quoting_c.pyx")))
 +                (replace 'check
 +                  (lambda* (#:key tests? inputs outputs #:allow-other-keys)
 +                    (when tests?
 +                      (substitute* "setup.cfg"
 +                        (("--cov=yarl") ""))
 +                      (add-installed-pythonpath inputs outputs)
 +                      (invoke "python" "-m" "pytest")))))))
      (native-inputs
 -     `(("python-pytest" ,python-pytest)
 +     `(("python-cython" ,python-cython)
 +       ("python-pytest" ,python-pytest)
         ("python-pytest-runner" ,python-pytest-runner)))
      (propagated-inputs
       `(("python-idna" ,python-idna)
@@@ -4338,15 -4361,7 +4345,15 @@@ Google search engine.  Its module is ca
           "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
      (build-system python-build-system)
      (arguments
 -     '(#:tests? #f)) ; tests require internet access
 +     `(#:tests? #f ; tests require internet access
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-after 'unpack 'fix-setup-py
 +           (lambda _
 +             (substitute* "setup.py"
 +               (("googleapiclient/discovery_cache")
 +                "googleapiclient.discovery_cache"))
 +             #t)))))
      (native-inputs
       `(("python-httplib2" ,python-httplib2)
         ("python-six" ,python-six)
@@@ -4559,8 -4574,7 +4566,8 @@@ Python."
         (sha256
          (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
      (propagated-inputs
 -     `(("python-unidecode" ,python-unidecode)))
 +     `(("python-unidecode" ,python-unidecode)
 +       ("python-text-unidecode" ,python-text-unidecode)))
      (arguments
       `(#:phases
         (modify-phases %standard-phases
@@@ -4788,11 -4802,14 +4795,11 @@@ event loop.  It is implemented in Cytho
             (lambda _
               (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
               (delete-file "docs/build/texinfo/Makefile")
 -             (delete-file "docs/build/texinfo/Gunicorn.texi")
 -             #t))
 +             (delete-file "docs/build/texinfo/Gunicorn.texi")))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (if tests?
                   (begin
 -                   (setenv "PYTHONPATH"
 -                           (string-append ".:" (getenv "PYTHONPATH")))
                     (invoke "pytest" "-vv"
                             ;; Disable the geventlet tests because eventlet uses
                             ;; dnspython, which does not work in the build
@@@ -5422,15 -5439,7 +5429,15 @@@ files."
           (base32
            "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
      (build-system python-build-system)
 -    (arguments '(#:tests? #f))  ; Tests not included in release tarball.
 +    (arguments
 +     '(#:tests? #f  ; Tests not included in release tarball.
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-after 'unpack 'fix-websockets-package-name-requirement
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             ;; Python package names use dot as separator.
 +             (substitute* "setup.py"
 +               (("websockets/extensions") "websockets.extensions")))))))
      (home-page "https://github.com/aaugustin/websockets")
      (synopsis
       "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
@@@ -6203,3 -6212,25 +6210,25 @@@ your code non-blocking and speedy."
       "This project provides a client library in Python that makes it easy to
  communicate with Microsoft Azure Storage services.")
      (license license:expat)))
+ (define-public python-w3lib
+   (package
+     (name "python-w3lib")
+     (version "1.22.0")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "w3lib" version))
+        (sha256
+         (base32
+          "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha"))))
+     (build-system python-build-system)
+     (native-inputs
+      `(("python-six" ,python-six)))
+     (home-page "https://github.com/scrapy/w3lib")
+     (synopsis "Python library of web-related functions")
+     (description
+      "This is a Python library of web-related functions, such as: remove comments,
+ or tags from HTML snippets, extract base url from HTML snippets, translate entites
+ on HTML strings, among other things.")
+     (license license:bsd-3)))
@@@ -37,7 -37,7 +37,7 @@@
  ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
  ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
  ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
 -;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 +;;; Copyright © 2017, 2018, 2019, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
  ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
  ;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
  ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
  ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
  ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
  ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
+ ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
+ ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
    #:use-module (gnu packages enchant)
    #:use-module (gnu packages file)
    #:use-module (gnu packages fontutils)
 +  #:use-module (gnu packages freedesktop)
    #:use-module (gnu packages gcc)
    #:use-module (gnu packages geo)
    #:use-module (gnu packages ghostscript)
    #:use-module (guix download)
    #:use-module (guix git-download)
    #:use-module (guix hg-download)
 +  #:use-module (guix gexp)
    #:use-module (guix utils)
    #:use-module (guix build-system gnu)
    #:use-module (guix build-system cmake)
@@@ -674,7 -674,12 +676,7 @@@ implementation for the Telegram Bot API
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      ;; Extend PYTHONPATH so the built package will be found.
 -                      (setenv "PYTHONPATH"
 -                              (string-append (getcwd) "/build/lib:"
 -                                             (getenv "PYTHONPATH")))
 -                      (invoke "pytest" "-p" "no:logging")
 -                      #t)))))
 +                      (invoke "pytest" "-p" "no:logging"))))))
      (home-page "https://github.com/borntyping/python-colorlog")
      (synopsis "Log formatting with colors for python")
      (description "The @code{colorlog.ColoredFormatter} is a formatter for use
@@@ -1048,16 -1053,15 +1050,16 @@@ by @code{binstar}, @code{binstar-build}
      (version "2.9.0")
      (source
       (origin
 -      (method url-fetch)
 -      (uri (pypi-uri "Babel" version))
 -      (sha256
 -       (base32
 -        "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
 +       (method url-fetch)
 +       (uri (pypi-uri "Babel" version))
 +       (sha256
 +        (base32
 +         "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
      (build-system python-build-system)
      (native-inputs
       `(("python-freezegun" ,python-freezegun)
 -       ("python-pytest" ,python-pytest)))
 +       ("python-pytest" ,python-pytest)
 +       ("tzdata" ,tzdata-for-tests)))
      (propagated-inputs
       `(("python-pytz" ,python-pytz)))
      (arguments
                    (replace 'check
                      (lambda _
                        (invoke "pytest" "-vv"))))))
 -    (home-page "http://babel.pocoo.org/")
 +    (home-page "https://babel.pocoo.org/")
      (synopsis
       "Tools for internationalizing Python applications")
      (description
@@@ -1117,7 -1121,7 +1119,7 @@@ and verifies that it matches the intend
      (build-system python-build-system)
      (native-inputs
       `(("python-coverage" ,python-coverage)
 -       ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
 +       ("python-hypothesis" ,python-hypothesis)
         ("python-pre-commit" ,python-pre-commit)
         ("python-py" ,python-py)
         ("python-pytest" ,python-pytest)
@@@ -1217,6 -1221,14 +1219,6 @@@ Expressions are constructed from parse
        (modify-phases %standard-phases
          (replace 'check
            (lambda _
 -            ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
 -            ;; on to import numpy. Somehow this works on their CI system.
 -            ;; Let's just manage PYTHONPATH here instead.
 -            (substitute* "runexamples.sh"
 -              (("export PYTHONPATH=.*") ""))
 -            (setenv "PYTHONPATH"
 -                    (string-append (getcwd) ":"
 -                                   (getenv "PYTHONPATH")))
              (invoke "./runexamples.sh")
              (invoke "nosetests" "-v"))))))
     (home-page "https://github.com/fhs/python-hdf4")
@@@ -1822,6 -1834,9 +1824,6 @@@ language.  It aims to be fast."
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (format #t "current working dir ~s~%" (getcwd))
 -                      (setenv "PYTHONPATH"
 -                              (string-append ".:" (getenv "PYTHONPATH")))
                        ;; We must run the test suite module directly, as it
                        ;; fails to define the 'tempdir' variable in scope for
                        ;; the tests otherwise
@@@ -2346,14 -2361,14 +2348,14 @@@ in the current session, Python, and th
  (define-public python-six
    (package
      (name "python-six")
 -    (version "1.14.0")
 +    (version "1.15.0")
      (source
       (origin
        (method url-fetch)
        (uri (pypi-uri "six" version))
        (sha256
         (base32
 -        "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
 +        "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
      (build-system python-build-system)
      (arguments
       `(#:phases
@@@ -2491,18 -2506,16 +2493,18 @@@ audio playback capability for Python 3 
  (define-public python-simplejson
    (package
      (name "python-simplejson")
 -    (version "3.17.0")
 +    (version "3.17.2")
      (source
       (origin
        (method url-fetch)
        (uri (pypi-uri "simplejson" version))
        (sha256
         (base32
 -        "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
 +        "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
      (build-system python-build-system)
 -    (home-page "http://simplejson.readthedocs.org/en/latest/")
 +    (native-inputs
 +     `(("python-toml" ,python-toml)))
 +    (home-page "https://simplejson.readthedocs.io/en/latest")
      (synopsis
       "Json library for Python")
      (description
@@@ -2525,14 -2538,14 +2527,14 @@@ Python 3.3+."
  (define-public python-pyicu
    (package
      (name "python-pyicu")
 -    (version "2.4.3")
 +    (version "2.7.4")
      (source
       (origin
        (method url-fetch)
        (uri (pypi-uri "PyICU" version))
        (sha256
         (base32
 -        "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
 +        "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
      (build-system python-build-system)
      (inputs
       `(("icu4c" ,icu4c)))
@@@ -3034,14 -3047,14 +3036,14 @@@ server."
  (define-public python-py
    (package
      (name "python-py")
 -    (version "1.8.1")
 +    (version "1.10.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "py" version))
         (sha256
          (base32
 -         "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
 +         "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
      (build-system python-build-system)
      (arguments
       ;; FIXME: "ImportError: 'test' module incorrectly imported from
  code introspection, and logging.")
      (license license:expat)))
  
 -(define-public python-py-next
 -  (package
 -    (inherit python-py)
 -    (version "1.10.0")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "py" version))
 -       (sha256
 -        (base32
 -         "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))))
 -
  (define-public python2-py
    (package-with-python2 python-py))
  
@@@ -3252,9 -3277,11 +3254,9 @@@ interfaces."
                                                   "cross-libc" "libc"))))
                 (substitute* "src/click/_unicodefun.py"
                   (("'locale'")
 -                  (string-append "'" glibc "/bin/locale'"))))
 -             #t))
 +                  (string-append "'" glibc "/bin/locale'"))))))
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
               (invoke "python" "-m" "pytest"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
@@@ -3369,15 -3396,16 +3371,15 @@@ compare, diff, and patch JSON and JSON-
       '(#:phases
         (modify-phases %standard-phases
           (replace 'check
 -           (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (add-installed-pythonpath inputs outputs)
 -             (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
 -             (invoke "trial" "jsonschema"))))))
 +           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
 +             (when tests?
 +               (setenv "JSON_SCHEMA_TEST_SUITE" "json")
 +               (invoke "trial" "jsonschema")))))))
      (native-inputs
       `(("python-setuptools_scm" ,python-setuptools-scm)
         ("python-twisted" ,python-twisted)))
      (propagated-inputs
       `(("python-attrs" ,python-attrs)
 -       ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
         ("python-pyrsistent" ,python-pyrsistent)
         ("python-six" ,python-six)))
      (home-page "https://github.com/Julian/jsonschema")
      (package/inherit jsonschema
               (propagated-inputs
                `(("python2-functools32" ,python2-functools32)
 +                ("python2-importlib-metadata" ,python2-importlib-metadata)
                  ,@(package-propagated-inputs jsonschema))))))
  
  (define-public python-schema
@@@ -3522,6 -3549,9 +3524,6 @@@ somewhat intelligible."
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
@@@ -3617,13 -3647,13 +3619,13 @@@ JavaScript-like message boxes.  Types o
    (package
      (name "python-pympler")
      (home-page "https://pythonhosted.org/Pympler/")
 -    (version "0.8")
 +    (version "0.9")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "Pympler" version))
                (sha256
                 (base32
 -                "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
 +                "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
      (build-system python-build-system)
      (arguments
       `(#:phases (modify-phases %standard-phases
@@@ -3652,14 -3682,14 +3654,14 @@@ visualisation and class tracker statist
  (define-public python-itsdangerous
    (package
      (name "python-itsdangerous")
 -    (version "1.1.0")
 +    (version "2.0.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "itsdangerous" version))
         (sha256
          (base32
 -         "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
 +         "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
      (build-system python-build-system)
      (home-page "https://palletsprojects.com/p/itsdangerous/")
      (synopsis "Python library for passing data to/from untrusted environments")
@@@ -3684,8 -3714,7 +3686,8 @@@ environments and back."
           "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
      (build-system python-build-system)
      (inputs
 -     `(("libyaml" ,libyaml)))
 +     `(("libyaml" ,libyaml)
 +       ("python-cython" ,python-cython)))
      (home-page "https://pyyaml.org")
      (synopsis "YAML parser and emitter for Python")
      (description
@@@ -3725,79 -3754,64 +3727,79 @@@ e.g. filters, callbacks and errbacks ca
  (define-public python-virtualenv
    (package
      (name "python-virtualenv")
 -    (version "20.2.1")
 +    (version "20.3.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "virtualenv" version))
         (sha256
          (base32
 -         "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
 +         "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
      (build-system python-build-system)
      (native-inputs
       `(("python-mock" ,python-mock)
         ("python-pytest" ,python-pytest)
 -       ;; NOTE: guix lint remarks that "python-setuptools should probably not
 -       ;; be an input at all". However, removing the input makes the build error:
 -       ;; File "setup.py", line 4, in <module>
 -       ;;   raise RuntimeError("setuptools >= 41 required to build")
 -       ("python-setuptools" ,python-setuptools)
         ("python-setuptools-scm" ,python-setuptools-scm)))
      (propagated-inputs
       `(("python-appdirs" ,python-appdirs)
 -       ("python-distlib" ,python-distlib/next)
 +       ("python-distlib" ,python-distlib)
         ("python-filelock" ,python-filelock)
 -       ("python-six" ,python-six)
 -       ("python-importlib-metadata" ,python-importlib-metadata)))
 +       ("python-six" ,python-six)))
      (home-page "https://virtualenv.pypa.io/")
      (synopsis "Virtual Python environment builder")
      (description
       "Virtualenv is a tool to create isolated Python environments.")
      (license license:expat)))
  
 +(define-public python2-virtualenv
 +  (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
 +    (package
 +      (inherit base)
 +      (arguments
 +       `(#:python ,python-2
 +         #:phases
 +         (modify-phases %standard-phases
 +           (add-after 'set-paths 'adjust-PYTHONPATH
 +             (lambda* (#:key inputs #:allow-other-keys)
 +               (let* ((python (assoc-ref inputs "python"))
 +                      (python-sitedir (string-append python "/lib/python2.7"
 +                                                     "/site-packages")))
 +                 ;; XXX: 'python2' always comes first on PYTHONPATH
 +                 ;; and shadows the 'setuptools' input.  Move python2
 +                 ;; last: this should be fixed in python-build-system
 +                 ;; in a future rebuild cycle.
 +                 (setenv "PYTHONPATH"
 +                         (string-append (string-join (delete python-sitedir
 +                                                             (string-split
 +                                                              (getenv "PYTHONPATH")
 +                                                              #\:))
 +                                                     ":")
 +                                        ":" python-sitedir))
 +                 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
 +                         (getenv "PYTHONPATH"))
 +                 #t))))))
 +      (propagated-inputs
 +       `(("python-contextlib2" ,python2-contextlib2)
 +         ,@(package-propagated-inputs base))))))
 +
  (define-public python-markupsafe
    (package
      (name "python-markupsafe")
 -    (version "1.1.1")
 +    (version "2.0.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "MarkupSafe" version))
         (sha256
          (base32
 -         "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
 +         "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26)
 -                  (guix build utils)
 -                  (guix build python-build-system))
 -       #:phases (modify-phases %standard-phases
 +     `(#:phases (modify-phases %standard-phases
                    (replace 'check
 -                    (lambda _
 -                      (let ((cwd (getcwd))
 -                            (libdir (find (cut string-prefix? "lib." <>)
 -                                          (scandir "build"))))
 -                      (setenv "PYTHONPATH"
 -                              (string-append cwd "/build/" libdir ":"
 -                                             (getenv "PYTHONPATH")))
 -                      (invoke "pytest" "-vv")))))))
 +                    (lambda* (#:key tests? #:allow-other-keys)
 +                      (when tests?
 +                        (invoke "pytest" "-vv")))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (home-page "https://github.com/mitsuhiko/markupsafe")
@@@ -3813,22 -3827,27 +3815,22 @@@ for Python."
  (define-public python-jinja2
    (package
      (name "python-jinja2")
 -    (version "2.11.2")
 +    (version "3.0.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "Jinja2" version))
         (sha256
          (base32
 -         "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
 +         "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
      (build-system python-build-system)
      (arguments
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda* (#:key tests? #:allow-other-keys)
                        (if tests?
 -                          (begin
 -                            (setenv "PYTHONPATH"
 -                                    (string-append "./build/lib:"
 -                                                   (getenv "PYTHONPATH")))
 -                            (invoke "pytest" "-vv"))
 -                          (format #t "test suite not run~%"))
 -                      #t)))))
 +                          (invoke "pytest" "-vv")
 +                          (format #t "test suite not run~%")))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (propagated-inputs
@@@ -4127,14 -4146,15 +4129,14 @@@ text styles of documentation."
  (define-public python-pygments
    (package
      (name "python-pygments")
 -    (version "2.7.3")
 +    (version "2.8.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "Pygments" version))
         (sha256
          (base32
 -         "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
 -    (replacement python-pygments/fixed)
 +         "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
      (build-system python-build-system)
      (arguments
       ;; FIXME: Tests require sphinx, which depends on this.
      (license license:bsd-2)
      (properties `((python2-variant . ,(delay python2-pygments))))))
  
 -(define python-pygments/fixed
 -  (package
 -    (inherit python-pygments)
 -    (version "2.7.4")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "Pygments" version))
 -       (sha256
 -        (base32
 -         "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
 -
  ;; Pygments 2.6 and later does not support Python 2.
  (define-public python2-pygments
    (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
@@@ -4352,7 -4384,8 +4354,7 @@@ ecosystem, but can naturally be used al
                        ;;
                        ;; OverflowError: mktime argument out of range
                        (setenv "TZDIR"
 -                              (string-append (assoc-ref inputs "tzdata")
 -                                             "/share/zoneinfo"))
 +                              (search-input-directory inputs "share/zoneinfo"))
                        (setenv "TZ" "Europe/Paris")
  
                        (invoke "python" "utest/run.py"))))))
@@@ -4825,14 -4858,7 +4827,14 @@@ matching of file paths."
               (substitute* "tests/test_black.py"
                 (("( *)def test_python38" match indent)
                  (string-append indent "@unittest.skip(\"guix\")\n" match)))
 -             #t)))))
 +             #t))
 +         ;; Remove blackd, because it depends on python-aiohttp and
 +         ;; python-aiohttp-cors.
 +         (add-after 'unpack 'remove-entrypoint
 +           (lambda _
 +             (substitute* "setup.py"
 +               (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
 +                (("\"blackd\", ") "")))))))
      (propagated-inputs
       `(("python-click" ,python-click)
         ("python-attrs" ,python-attrs)
@@@ -5358,16 -5384,16 +5360,16 @@@ readable format."
         ("pkg-config" ,pkg-config)
         ("python-sphinx" ,python-sphinx)
         ("python-numpydoc" ,python-numpydoc)
 -       ("texlive" ,(texlive-union (list texlive-fonts-cm-super
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-cm-super
                                          texlive-fonts-ec
 -                                        texlive-generic-ifxetex
 +                                        texlive-generic-iftex
                                          texlive-pdftex
 -                                        texlive-amsfonts/patched
 +                                        texlive-amsfonts
                                          texlive-latex-capt-of
                                          texlive-latex-cmap
                                          texlive-latex-environ
                                          texlive-latex-eqparbox
 -                                        texlive-latex-etoolbox
 +                                        texlive-etoolbox
                                          texlive-latex-expdlist
                                          texlive-latex-fancyhdr
                                          texlive-latex-fancyvrb
                                          texlive-latex-framed
                                          texlive-latex-geometry
                                          texlive-latex-graphics
 -                                        texlive-latex-hyperref
 +                                        texlive-hyperref
                                          texlive-latex-mdwtools
                                          texlive-latex-multirow
                                          texlive-latex-needspace
 -                                        texlive-latex-oberdiek
 +                                        texlive-oberdiek
                                          texlive-latex-parskip
                                          texlive-latex-preview
                                          texlive-latex-tabulary
                                          texlive-latex-trimspaces
                                          texlive-latex-ucs
                                          texlive-latex-upquote
 -                                        texlive-latex-url
 +                                        texlive-url
                                          texlive-latex-varwidth
                                          texlive-latex-wrapfig)))
         ("texinfo" ,texinfo)
                      (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
                      (pyver ,(string-append "PYVER=")))
  
 -               ;; FIXME: this is needed to for texlive-union to generate
 +               ;; FIXME: this is needed to for texlive-updmap.cfg to generate
                 ;; fonts, which are not found.
                 (setenv "HOME" "/tmp")
  
@@@ -5704,20 -5730,21 +5706,20 @@@ convert between colorspaces like sRGB, 
  (define-public python-matplotlib
    (package
      (name "python-matplotlib")
 -    (version "3.1.2")
 +    (version "3.4.3")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "matplotlib" version))
         (sha256
 -        (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
 -       (patches
 -        (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
 +        (base32 "06032j0ccjxldx4z9kf97qps2g36mfgvy1nap3b9n75kzmnm4kzw"))))
      (build-system python-build-system)
      (propagated-inputs ; the following packages are all needed at run time
       `(("python-cycler" ,python-cycler)
         ("python-kiwisolver" ,python-kiwisolver)
         ("python-pyparsing" ,python-pyparsing)
         ("python-pygobject" ,python-pygobject)
 +       ("python-certifi" ,python-certifi)
         ("gobject-introspection" ,gobject-introspection)
         ("python-tkinter" ,python "tk")
         ("python-dateutil" ,python-dateutil)
      (inputs
       `(("libpng" ,libpng)
         ("freetype" ,freetype)
 +       ("qhull" ,qhull)
         ("cairo" ,cairo)
         ("glib" ,glib)
         ;; FIXME: Add backends when available.
       `(("pkg-config" ,pkg-config)
         ("python-pytest" ,python-pytest)
         ("python-mock" ,python-mock)
 +       ("python-wheel" ,python-wheel)
         ("unzip" ,unzip)
         ("jquery-ui"
          ,(origin
                                                "test_.*\\.py$"))
                 (("^from matplotlib" match)
                  (string-append "import pytest\n" match))
 -               (("( *)@image_comparison" match indent)
 +               (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
 +                 indent)
                  (string-append indent
                                 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
                                 match)))
               (for-each delete-file
                         ;; test_normal_axes, test_get_tightbbox_polar
                         '("lib/matplotlib/tests/test_axes.py"
 -                         ;; We don't use the webagg backend and this test forces it.
 +                         "lib/matplotlib/tests/test_polar.py"
 +                         ;; We don't use the webagg backend and this test
 +                         ;; forces it.
                           "lib/matplotlib/tests/test_backend_webagg.py"
                           ;; test_outward_ticks
                           "lib/matplotlib/tests/test_tightlayout.py"
             (lambda* (#:key outputs inputs #:allow-other-keys)
               (let* ((python-version (python-version
                                        (assoc-ref inputs "python")))
 -                    (dir (string-append (assoc-ref outputs "out")
 -                                       "/lib/python" python-version "/site-packages"
 -                                       "/matplotlib/backends/web_backend/")))
 +                    (dir
 +                     (string-append (assoc-ref outputs "out")
 +                                    "/lib/python" python-version
 +                                    "/site-packages"
 +                                    "/matplotlib/backends/web_backend/")))
                 (mkdir-p dir)
                 (invoke "unzip"
                         (assoc-ref inputs "jquery-ui")
                   (setenv "CFLAGS" "-ffloat-store"))
                 (call-with-output-file "setup.cfg"
                   (lambda (port)
 -                   (format port "[directories]~%
 +                   (format port "[libs]~%
 +system_freetype = true
 +system_qhull = true
 +[directories]~%
  basedirlist = ~a,~a~%
  [packages]~%
  tests = True~%"
@@@ -5904,7 -5921,7 +5906,7 @@@ toolkits."
         ("python-ipykernel" ,python-ipykernel)
         ("python-mock" ,python-mock)
         ("graphviz" ,graphviz)
 -       ("texlive" ,(texlive-union (list texlive-amsfonts/patched
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                          texlive-latex-amsmath
                                          texlive-latex-enumitem
                                          texlive-latex-expdlist
                                          texlive-pdftex
  
                                          texlive-fonts-ec
 -                                        texlive-fonts-adobe-times
 -                                        texlive-fonts-txfonts)))
 +                                        texlive-times
 +                                        texlive-txfonts)))
         ("texinfo" ,texinfo)
         ,@(package-native-inputs python-matplotlib)))
      (arguments
           (replace 'build
             (lambda _
               (chdir "doc")
 -             (setenv "PYTHONPATH"
 -                     (string-append (getenv "PYTHONPATH")
 -                                    ":" (getcwd) "/../examples/units"))
 +             (setenv "PYTHONPATH" "../examples/units")
               (substitute* "conf.py"
                 ;; Don't use git.
                 (("^SHA = check_output.*")
                            "./matplotlib-figures")
                   (invoke "makeinfo" "--no-split"
                           "-o" "matplotlib.info" "matplotlib.texi"))
 -               (install-file "build/texinfo/matplotlib.info" info))
 -             #t)))))
 +               (install-file "build/texinfo/matplotlib.info" info)))))))
      (home-page (package-home-page python-matplotlib))
      (synopsis "Documentation for the python-matplotlib package")
      (description (package-description python-matplotlib))
@@@ -6199,12 -6219,24 +6201,12 @@@ Python code against some of the style c
           "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
      (build-system python-build-system)
      (arguments
 -     '(#:modules ((ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26)
 -                  (guix build utils)
 -                  (guix build python-build-system))
 -       #:phases (modify-phases %standard-phases
 +     '(#:phases (modify-phases %standard-phases
                    (replace 'check
                      (lambda* (#:key tests? #:allow-other-keys)
                        (if tests?
 -                          (begin
 -                            (let ((libdir (find (cut string-prefix? "lib." <>)
 -                                                (scandir "build"))))
 -                              (setenv "PYTHONPATH"
 -                                      (string-append "./build/" libdir ":"
 -                                                     (getenv "PYTHONPATH")))
 -                              (invoke "pytest" "-vv")))
 -                          (format #t "test suite not run~%"))
 -                      #t)))))
 +                          (invoke "pytest" "-vv")
 +                          (format #t "test suite not run~%")))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)))
@@@ -6283,14 -6315,14 +6285,14 @@@ by pycodestyle."
  (define-public python-distlib
    (package
      (name "python-distlib")
 -    (version "0.3.0")
 +    (version "0.3.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "distlib" version ".zip"))
         (sha256
          (base32
 -         "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
 +         "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
      (build-system python-build-system)
      (arguments
       `(#:phases
@@@ -6314,6 -6346,19 +6316,6 @@@ relate to packaging and distribution o
  used as the basis for third-party packaging tools.")
      (license license:psfl)))
  
 -;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
 -(define-public python-distlib/next
 -  (package
 -    (inherit python-distlib)
 -    (version "0.3.1")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "distlib" version ".zip"))
 -       (sha256
 -        (base32
 -         "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
 -
  (define-public python-distutils-extra
    (package
      (name "python-distutils-extra")
@@@ -6408,7 -6453,7 +6410,7 @@@ the OleFileIO module from PIL, the Pyth
      (native-inputs
       `(("pybind11" ,pybind11)
         ("python-setuptools" ,python-setuptools)
 -       ("python-setuptools-scm" ,python-setuptools-scm/next)
 +       ("python-setuptools-scm" ,python-setuptools-scm)
         ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
         ("python-toml" ,python-toml)
         ("python-wheel" ,python-wheel)))
@@@ -6490,11 -6535,7 +6492,11 @@@ a general image processing tool."
          (uri (pypi-uri "Pillow" version))
          (sha256
           (base32
 -          "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
 +          "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
 +     (arguments
 +      (substitute-keyword-arguments (package-arguments python-pillow)
 +        ;; FIXME: One of the tests is failing.
 +        ((#:tests? _ #f) #f))))))
  
  (define-public python-pillow-2.9
    (package
@@@ -7004,16 -7045,22 +7006,16 @@@ support for Python 3 and PyPy.  It is b
                 (("filenames = \\(library_filename,\\) \\+ filenames")
                  "pass")
                 (("libcairo.so.2")
 -                (string-append (assoc-ref inputs "cairo")
 -                               "/lib/libcairo.so.2")))
 +                (search-input-file inputs "/lib/libcairo.so.2")))
               (substitute* "cairocffi/pixbuf.py"
                 (("libgdk_pixbuf-2.0.so.0")
 -                (string-append (assoc-ref inputs "gdk-pixbuf")
 -                               "/lib/libgdk_pixbuf-2.0.so.0"))
 +                (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
                 (("libgobject-2.0.so.0")
 -                (string-append (assoc-ref inputs "glib")
 -                               "/lib/libgobject-2.0.so.0"))
 +                (search-input-file inputs "/lib/libgobject-2.0.so.0"))
                 (("libglib-2.0.so.0")
 -                (string-append (assoc-ref inputs "glib")
 -                               "/lib/libglib-2.0.so.0"))
 +                (search-input-file inputs "/lib/libglib-2.0.so.0"))
                 (("libgdk-3.so.0")
 -                (string-append (assoc-ref inputs "gtk+")
 -                               "/lib/libgdk-3.so.0")))
 -             #t))
 +                (search-input-file inputs "/lib/libgdk-3.so.0")))))
           (add-after 'unpack 'disable-linters
             ;; Their check fails; none of our business.
             (lambda _
@@@ -7052,13 -7099,13 +7054,13 @@@ PNG, PostScript, PDF, and SVG file outp
  (define-public python-decorator
    (package
      (name "python-decorator")
-     (version "4.4.2")
+     (version "5.0.9")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "decorator" version))
         (sha256
-         (base32 "1rxzhk5zwiggk45hl53zydvy70lk654kg0nc1p54090p402jz9p3"))))
+         (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
      (build-system python-build-system)
      (home-page "https://pypi.org/project/decorator/")
      (synopsis "Python module to simplify usage of decorators")
@@@ -7335,13 -7382,13 +7337,13 @@@ child application and control it as if 
  (define-public python-setuptools-scm
    (package
      (name "python-setuptools-scm")
 -    (version "3.4.3")
 +    (version "5.0.1")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "setuptools_scm" version))
                (sha256
                 (base32
 -                "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
 +                "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))
      (build-system python-build-system)
      (home-page "https://github.com/pypa/setuptools_scm/")
      (synopsis "Manage Python package versions in SCM metadata")
  them as the version argument or in a SCM managed file.")
      (license license:expat)))
  
 -;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
 -(define-public python-setuptools-scm/next
 -  (package
 -    (inherit python-setuptools-scm)
 -    (version "5.0.1")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "setuptools_scm" version))
 -       (sha256
 -        (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
 -
  (define-public python2-setuptools-scm
    (package-with-python2 python-setuptools-scm))
  
@@@ -7862,12 -7921,12 +7864,12 @@@ without using the configuration machine
           (add-after 'unpack 'patch-testsuite
             (lambda _
               ;; test_not_on_path() and test_path_priority() try to run a test
 -             ;; that loads jupyter_core, so we need PYTHONPATH
 +             ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
               (substitute* "jupyter_core/tests/test_command.py"
                 (("env = \\{'PATH': ''\\}")
 -                "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
 +                "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
                 (("env = \\{'PATH':  str\\(b\\)\\}")
 -                "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
 +                "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
               #t))
           ;; Migration is running whenever etc/jupyter exists, but the
           ;; Guix-managed directory will never contain any migratable IPython
@@@ -8203,15 -8262,15 +8205,15 @@@ computing."
       `(("python-sphinx" ,python-sphinx)
         ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
         ;; FIXME: It's possible that a smaller union would work just as well.
 -       ("texlive" ,(texlive-union (list texlive-amsfonts/patched
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                          texlive-fonts-ec
 -                                        texlive-generic-ifxetex
 +                                        texlive-generic-iftex
                                          texlive-pdftex
                                          texlive-latex-capt-of
                                          texlive-latex-cmap
                                          texlive-latex-environ
                                          texlive-latex-eqparbox
 -                                        texlive-latex-etoolbox
 +                                        texlive-etoolbox
                                          texlive-latex-expdlist
                                          texlive-latex-fancyhdr
                                          texlive-latex-fancyvrb
                                          texlive-latex-framed
                                          texlive-latex-geometry
                                          texlive-latex-graphics
 -                                        texlive-latex-hyperref
 +                                        texlive-hyperref
                                          texlive-latex-mdwtools
                                          texlive-latex-multirow
                                          texlive-latex-needspace
 -                                        texlive-latex-oberdiek
 +                                        texlive-oberdiek
                                          texlive-latex-parskip
                                          texlive-latex-preview
                                          texlive-latex-tabulary
                                          texlive-latex-trimspaces
                                          texlive-latex-ucs
                                          texlive-latex-upquote
 -                                        texlive-latex-url
 +                                        texlive-url
                                          texlive-latex-varwidth
                                          texlive-latex-wrapfig)))
         ("texinfo" ,texinfo)))))
@@@ -8539,15 -8598,10 +8541,15 @@@ converts incoming documents to Unicode 
          (base32
           "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
      (build-system python-build-system)
 -    (arguments `(#:tests? #f))
 -    ;;XXX: 2 tests fail currently despite claming they were to be
 -    ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
 -    ;;don't want to create a circular dependency.
 +    (arguments
 +      ;;XXX: 2 tests fail currently despite claming they were to be
 +      ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
 +      ;;don't want to create a circular dependency.
 +      (list #:tests? #f
 +            #:phases
 +            #~(modify-phases %standard-phases
 +                ;; Circular dependency with python-beautifulsoup4.
 +                (delete 'sanity-check))))
      (home-page "https://github.com/facelessuser/soupsieve")
      (synopsis "CSS selector library")
      (description
@@@ -9146,6 -9200,8 +9148,6 @@@ Python 2 and Python 3."
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH" (string-append "./build/lib:"
 -                                                 (getenv "PYTHONPATH")))
               (invoke "py.test" "-v"))))))
      (native-inputs
       `(("python2-pytest" ,python2-pytest)))
@@@ -9300,10 -9356,11 +9302,10 @@@ PEP 8."
          (method url-fetch)
          (uri (pypi-uri "pyflakes" version))
          (sha256
 -          (base32
 -            "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
 +         (base32
 +          "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
      (build-system python-build-system)
 -    (home-page
 -      "https://github.com/pyflakes/pyflakes")
 +    (home-page "https://github.com/PyCQA/pyflakes")
      (synopsis "Passive checker of Python programs")
      (description
        "Pyflakes statically checks Python source code for common errors.")
      (name "python-mccabe")
      (version "0.6.1")
      (source
 -      (origin
 -        (method url-fetch)
 -        (uri (pypi-uri "mccabe" version))
 -        (sha256
 -          (base32
 -            "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
 +     (origin
 +       (method url-fetch)
 +       (uri (pypi-uri "mccabe" version))
 +       (sha256
 +        (base32
 +         "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
      (build-system python-build-system)
      (native-inputs
 -      `(("python-pytest" ,python-pytest-bootstrap)
 -        ("python-pytest-runner" ,python-pytest-runner)))
 -    (home-page "https://github.com/flintwork/mccabe")
 +     `(("python-toml", python-toml)
 +       ("python-pytest" ,python-pytest-bootstrap)
 +       ("python-pytest-runner" ,python-pytest-runner)))
 +    (home-page "https://github.com/PyCQA/mccabe")
      (synopsis "McCabe checker, plugin for flake8")
 -    (description
 -      "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
 -complexity of Python source code.")
 +    (description "This package provides a Flake8 plug-in to compute the McCabe
 +cyclomatic complexity of Python source code.")
      (license license:expat)))
  
  (define-public python2-mccabe
@@@ -9519,11 -9576,14 +9521,11 @@@ unnecessary plus operators for explici
               (substitute* "setup.cfg"
                 (("\\[pytest\\]")
                  "[tool:pytest]"))
 -
 -             (setenv "PYTHONPATH"
 -                     (string-append (getcwd) "/build/lib:"
 -                                    (getenv "PYTHONPATH")))
               (invoke "py.test" "-v"))))))
 +    (propagated-inputs
 +     `(("python-flake8" ,python-flake8)))
      (native-inputs
 -     `(("python-flake8" ,python-flake8)
 -       ("python-mock" ,python-mock)
 +     `(("python-mock" ,python-mock)
         ("python-pep8" ,python-pep8)
         ("python-pycodestyle" ,python-pycodestyle)
         ("python-pytest" ,python-pytest)))
@@@ -9562,14 -9622,14 +9564,14 @@@ files."
  (define-public python-flake8-pyi
    (package
      (name "python-flake8-pyi")
 -    (version "20.5.0")
 +    (version "20.10.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "flake8-pyi" version))
         (sha256
          (base32
 -         "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
 +         "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-attrs" ,python-attrs)
@@@ -10016,7 -10076,14 +10018,7 @@@ third-party code."
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (let ((cwd (getcwd)))
 -               (setenv "PYTHONPATH"
 -                       (string-append cwd "/build/"
 -                                      (find (cut string-prefix? "lib" <>)
 -                                            (scandir (string-append cwd "/build")))
 -                                      ":"
 -                                      (getenv "PYTHONPATH")))
 -             (invoke "pytest" "-v" "test")))))))
 +             (invoke "pytest" "-v" "test"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (synopsis "MessagePack (de)serializer")
@@@ -10783,7 -10850,6 +10785,7 @@@ is binding LibSass."
      (build-system python-build-system)
      (arguments
       `(#:tests? #f))          ;circular dependency with python-aiohttp
 +    (propagated-inputs `(("python-idna" ,python-idna)))
      (home-page "https://github.com/aio-libs/idna-ssl")
      (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
      (description "Patch @code{ssl.match_hostname} for Unicode(idna)
@@@ -11100,7 -11166,7 +11102,7 @@@ JSON Reference and JSON Pointer."
          ("python-json-spec" ,python-json-spec)
          ("python-jsonschema" ,python-jsonschema)
          ("python-pylint" ,python-pylint)
 -        ("python-pytest" ,python-pytest-6)
 +        ("python-pytest" ,python-pytest)
          ("python-pytest-benchmark"
           ,python-pytest-benchmark)
          ("python-pytest-cache" ,python-pytest-cache)
@@@ -11366,25 -11432,25 +11368,25 @@@ time."
         ("python-pytest" ,python-pytest)
         ("python-pytest-cov" ,python-pytest-cov)
         ("python-pytest-dependency" ,python-pytest-dependency)
 -       ("texlive" ,(texlive-union (list texlive-adjustbox
 -                                        texlive-amsfonts/patched
 +       ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
 +                                        texlive-amsfonts
                                          texlive-booktabs
                                          texlive-caption
                                          texlive-eurosym
                                          texlive-fonts-rsfs
                                          texlive-generic-ulem
 -                                        texlive-iftex
 +                                        texlive-generic-iftex
                                          texlive-jknappen
                                          texlive-latex-amsmath
                                          texlive-latex-enumitem
                                          texlive-latex-fancyvrb
                                          texlive-latex-float
 -                                        texlive-latex-fontspec
 +                                        texlive-fontspec
                                          texlive-latex-geometry
 -                                        texlive-latex-hyperref
 +                                        texlive-hyperref
                                          texlive-latex-jknapltx
                                          texlive-latex-ms
 -                                        texlive-latex-oberdiek
 +                                        texlive-oberdiek
                                          texlive-latex-parskip
                                          texlive-latex-trimspaces
                                          texlive-latex-upquote
@@@ -11736,8 -11802,7 +11738,8 @@@ automatically detect a wide range of fi
         (file-name (git-file-name name version))
         (sha256
          (base32
 -         "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
 +         "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
 +       (patches (search-patches "python-docopt-pytest6-compat.patch"))))
      (build-system python-build-system)
      (native-inputs
       `(("python-pytest" ,python-pytest)))
       `(#:phases
         (modify-phases %standard-phases
           (replace 'check
 -           (lambda _ (invoke "py.test"))))))
 +           (lambda* (#:key tests? #:allow-other-keys)
 +             (when tests?
 +               (invoke "py.test")))))))
      (home-page "http://docopt.org")
      (synopsis "Command-line interface description language for Python")
      (description "This library allows the user to define a command-line
@@@ -11961,15 -12024,14 +11963,15 @@@ tables."
  (define-public python-atomicwrites
    (package
      (name "python-atomicwrites")
 -    (version "1.3.0")
 +    (version "1.4.0")
      (source (origin
               (method url-fetch)
               (uri (pypi-uri "atomicwrites" version))
               (sha256
                (base32
 -               "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
 +               "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
      (build-system python-build-system)
 +    (arguments `(#:tests? #f))          ;avoid circular dependency with pytest
      (synopsis "Atomic file writes in Python")
      (description "Library for atomic file writes using platform dependent tools
  for atomic file system operations.")
@@@ -12150,11 -12212,6 +12152,11 @@@ pure Python module that works on virtua
                    (replace 'check
                      (lambda* (#:key inputs outputs tests? #:allow-other-keys)
                        (when tests?
 +                        ;; Unset PYTHONDONTWRITEBYTECODE to match the
 +                        ;; expectations of a test in
 +                        ;; 'testing/test_gateway.py'.
 +                        (unsetenv "PYTHONDONTWRITEBYTECODE")
 +
                          (add-installed-pythonpath inputs outputs)
                          (invoke "pytest" "-vv")))))))
      (native-inputs
@@@ -12550,6 -12607,8 +12552,6 @@@ text."
                        #t))
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH" (string-append "./build/lib:"
 -                                                          (getenv "PYTHONPATH")))
                        (invoke "pytest" "-vv" "-m" "not network"
                                ;; These tests require Docker.
                                "-k" "not test_terminate_job \
@@@ -13939,19 -13998,31 +13941,19 @@@ syntax highlighting, markdown and more 
  (define-public python-magic
    (package
      (name "python-magic")
 -    (version "0.4.15")
 +    (version "0.4.22")
 +    (home-page "https://github.com/ahupp/python-magic")
      (source
       (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "python-magic" version))
 +       (method git-fetch)
 +       (uri (git-reference (url home-page) (commit version)))
 +       (file-name (git-file-name name version))
         (sha256
          (base32
 -         "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
 -       (file-name (string-append name "-" version "-checkout"))))
 +         "0zbdjr5shijs0jayz7gycpx0kn6v2bh83dpanyajk2vmy47jvbd6"))))
      (build-system python-build-system)
      (arguments
 -     ;; The tests are unreliable, so don't run them.  The tests fail
 -     ;; under Python3 because they were written for Python2 and
 -     ;; contain import statements that do not work in Python3.  One of
 -     ;; the tests fails under Python2 because its assertions are
 -     ;; overly stringent; it relies on comparing output strings which
 -     ;; are brittle and can change depending on the version of
 -     ;; libmagic being used and the system on which the test is
 -     ;; running.  In my case, under GuixSD 0.10.0, only one test
 -     ;; failed, and it seems to have failed only because the version
 -     ;; of libmagic that is packaged in Guix outputs a slightly
 -     ;; different (but not wrong) string than the one that the test
 -     ;; expected.
 -     '(#:tests? #f
 -       #:phases (modify-phases %standard-phases
 +     '(#:phases (modify-phases %standard-phases
                    ;; Replace a specific method call with a hard-coded
                    ;; path to the necessary libmagic.so file in the
                    ;; store.  If we don't do this, then the method call
                    (add-before 'build 'hard-code-path-to-libmagic
                      (lambda* (#:key inputs #:allow-other-keys)
                        (let ((file (assoc-ref inputs "file")))
 -                        (substitute* "magic.py"
 -                          (("ctypes.util.find_library\\('magic'\\)")
 -                           (string-append "'" file "/lib/libmagic.so'")))
 -                        #t)))
 -                  (add-before 'install 'disable-egg-compression
 -                    (lambda _
 -                      (let ((port (open-file "setup.cfg" "a")))
 -                        (display "\n[easy_install]\nzip_ok = 0\n"
 -                                 port)
 -                        (close-port port)
 -                        #t))))))
 +                        (substitute* "magic/loader.py"
 +                          (("ctypes\\.util\\.find_library\\('magic'\\)")
 +                           (string-append "'" file "/lib/libmagic.so'"))))))
 +                  (replace 'check
 +                    (lambda* (#:key tests? #:allow-other-keys)
 +                      ;; The test suite mandates this variable.
 +                      (setenv "LC_ALL" "en_US.UTF-8")
 +                      (if tests?
 +                          (invoke "python" "./test/test.py")
 +                          (format #t "test suite not run~%")))))))
 +    (native-inputs
 +     `(("which" ,which)))
      (inputs
       ;; python-magic needs to be able to find libmagic.so.
       `(("file" ,file)))
 -    (home-page
 -     "https://github.com/ahupp/python-magic")
 -    (synopsis
 -     "File type identification using libmagic")
 +    (synopsis "File type identification using libmagic")
      (description
       "This module uses ctypes to access the libmagic file type
  identification library.  It makes use of the local magic database and
@@@ -14271,6 -14344,12 +14273,6 @@@ own code, responding to click events an
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             ;; Upstream runs tests after installation and the package itself
 -             ;; resides in a subdirectory. Extend PYTHONPATH so it will be
 -             ;; found.
 -             (setenv "PYTHONPATH"
 -                     (string-append (getcwd) "/build/lib:"
 -                                    (getenv "PYTHONPATH")))
               (invoke "py.test" "-vv" "tests" "README.rst"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)
@@@ -14433,6 -14512,13 +14435,6 @@@ graphviz."
                                      (string-join disabled-tests "\n")))))))
                    (replace 'check
                      (lambda _
 -                      ;; Make sure the build directory is on PYTHONPATH.
 -                      (setenv "PYTHONPATH"
 -                              (string-append
 -                               (getenv "PYTHONPATH") ":"
 -                               (getcwd) "/build/"
 -                               (car (scandir "build" (cut string-prefix? "lib." <>)))))
 -
                        ;; Use the build daemons configured number of workers.
                        (setenv "NWORKERS" (number->string (parallel-job-count)))
  
@@@ -14490,14 -14576,7 +14492,14 @@@ format."
                  "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
      (build-system python-build-system)
      (arguments
 -     '(#:tests? #f))                    ; FIXME: some tests fail
 +     '(#:tests? #f                    ; FIXME: some tests fail
 +       #:phases
 +       (modify-phases %standard-phases
 +         ;; Remove scripts, because they depend on [conch]
 +         (add-after 'unpack 'remove-entrypoint
 +           (lambda _
 +             (substitute* "src/twisted/python/_setup.py"
 +               (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
      (propagated-inputs
       `(("python-zope-interface" ,python-zope-interface)
         ("python-pyhamcrest" ,python-pyhamcrest)
@@@ -14712,8 -14791,7 +14714,8 @@@ etc."
                (uri (pypi-uri "chai" version))
                (sha256
                 (base32
 -                "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
 +                "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
 +              (patches (search-patches "python-chai-drop-python2.patch"))))
      (build-system python-build-system)
      (home-page "https://github.com/agoragames/chai")
      (synopsis "Mocking framework for Python")
  objects, patterned after the Mocha library for Ruby.")
      (license license:bsd-3)))
  
 -(define-public python2-chai
 -  (package-with-python2 python-chai))
 -
  (define-public python-inflection
    (package
      (name "python-inflection")
@@@ -15058,15 -15139,17 +15060,15 @@@ some degree most natural languages too.
               (delete-file "libcst/tests/test_pyre_integration.py")
               (delete-file "libcst/codemod/tests/test_codemod_cli.py")
               (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
 -             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
 -             #t))
 +             (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
           (add-before 'check 'generate-test-data
             (lambda _
 -             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
               (invoke "python" "-m" "libcst.codegen.generate" "visitors")
               (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
           (replace 'check
 -           (lambda _
 -             (invoke "python" "-m" "unittest")
 -             #t)))))
 +           (lambda* (#:key tests? #:allow-other-keys)
 +             (when tests?
 +               (invoke "python" "-m" "unittest")))))))
      (native-inputs
       `(("python-black" ,python-black)
         ("python-isort" ,python-isort)))
@@@ -15091,14 -15174,6 +15093,14 @@@ feels like an AST."
                     ;; libcst/_add_slots.py
                     license:asl2.0))))
  
 +(define-public python-libcst-minimal
 +  (hidden-package
 +   (package
 +     (inherit python-libcst)
 +     (name "python-libcst-minimal")
 +     (arguments '(#:tests? #f))
 +     (native-inputs '()))))
 +
  (define-public python-typing-inspect
    (package
      (name "python-typing-inspect")
                (uri (pypi-uri "typing_inspect" version))
                (sha256
                 (base32
 -                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
 +                "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
 +              (patches (search-patches "python-typing-inspect-fix.patch"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-mypy-extensions" ,python-mypy-extensions)
@@@ -15267,13 -15341,13 +15269,13 @@@ parsing UK postcodes."
  (define-public python-faker
    (package
    (name "python-faker")
 -  (version "4.0.2")
 +  (version "8.12.1")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "Faker" version))
              (sha256
               (base32
 -              "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
 +              "1f95g8adzdh97cbfq7j3482iy4yskbahhjma2cm2mrhrdmi5j241"))))
    (build-system python-build-system)
    (arguments
     '(#:phases
@@@ -15358,8 -15432,7 +15360,8 @@@ YAML-serialized data."
      (build-system python-build-system)
      (native-inputs
       `(("python-pytest" ,python-pytest)
 -       ("python-nose" ,python-nose)))
 +       ("python-nose" ,python-nose)
 +       ("python-toml" ,python-toml)))
      (propagated-inputs
       `(("python-simplejson" ,python-simplejson)))
      (home-page "https://github.com/sdispater/backpack")
@@@ -15443,77 -15516,40 +15445,77 @@@ characters, mouse support, and auto sug
    (package-with-python2 python-prompt-toolkit-1))
  
  (define-public python-jedi
 -  (package
 -    (name "python-jedi")
 -    (version "0.17.2")
 -    (source
 -     (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "jedi" version))
 -       (sha256
 -        (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
 -    (build-system python-build-system)
 -    (arguments
 -     `(#:phases
 -       (modify-phases %standard-phases
 -         (replace 'check
 -           (lambda* (#:key tests? #:allow-other-keys)
 -             (when tests?
 -               (setenv "HOME" "/tmp")
 -               (invoke "python" "-m" "pytest" "-vv"))
 -             #t)))))
 -    (native-inputs
 -     `(("python-pytest" ,python-pytest)
 -       ("python-docopt" ,python-docopt)))
 -    (propagated-inputs
 -     `(("python-parso" ,python-parso)))
 -    (home-page "https://github.com/davidhalter/jedi")
 -    (synopsis "Autocompletion and static analysis library for Python")
 -    (description
 -     "Jedi is a static analysis tool for Python that can be used in Integrated
 +  ;; The 0.18.0 release tests do not work with Python 3.9.6. Use a more
 +  ;; recent commit.
 +  (let ((commit "1d944943c311b2d71655432f8870d68b2cf7d44b")
 +        (revision "1"))
 +    (package
 +      (name "python-jedi")
 +      (version
 +       (git-version "0.18.0" revision commit))
 +      (source
 +       (origin
 +         (method git-fetch)
 +         (uri (git-reference
 +               (url "https://github.com/davidhalter/jedi")
 +               (commit commit)))
 +         (file-name (git-file-name name version))
 +         (sha256
 +          (base32
 +           "052szkbv2pf9hy21any6zb4dhx3c5w1v6b9hn5grlc84zfm350vq"))))
 +      (build-system python-build-system)
 +      (arguments
 +       `(#:phases
 +         (modify-phases %standard-phases
 +           (add-after 'unpack 'unpack-submodule-sources
 +             (lambda* (#:key inputs #:allow-other-keys)
 +               (copy-recursively (assoc-ref inputs "python-django-stubs")
 +                                 "jedi/third_party/django-stubs")
 +               (copy-recursively (assoc-ref inputs "python-typeshed")
 +                                 "jedi/third_party/typeshed")
 +               #t))
 +           (replace 'check
 +             (lambda* (#:key tests? #:allow-other-keys)
 +               (when tests?
 +                 (setenv "HOME" "/tmp")
 +                 ;; Disable the pytest tests that fail with pytest 6.  See:
 +                 ;; https://github.com/davidhalter/jedi/issues/1660.
 +                 (invoke "pytest" "-vv" "-k"
 +                         "not test_completion[pytest"))
 +               #t)))))
 +      (native-inputs
 +       `(("python-pytest" ,python-pytest)
 +         ("python-docopt" ,python-docopt)
 +         ("python-django-stubs"
 +          ,(origin
 +             (method git-fetch)
 +             (uri (git-reference
 +                   (url "https://github.com/davidhalter/django-stubs")
 +                   (commit "3d2534ea8d8300c4c9db8f18e300355d5fd5488b")))
 +             (file-name "django-stubs-checkout")
 +             (sha256
 +              (base32 "1fpvn4lcqkd2q18z29rcnwakm649fccw2k6jik5d64j7p6xns08r"))))
 +         ("python-typeshed"
 +          ,(origin
 +             (method git-fetch)
 +             (uri (git-reference
 +                   (url "https://github.com/davidhalter/typeshed")
 +                   (commit "ae9d4f4b21bb5e1239816c301da7b1ea904b44c3")))
 +             (file-name "typeshed-checkout")
 +             (sha256
 +              (base32 "02xdip4amj0a7z9xph2mj46x1k55bjxl8d0gkpy25575acyx1kjq"))))))
 +      (propagated-inputs
 +       `(("python-parso" ,python-parso)))
 +      (home-page "https://github.com/davidhalter/jedi")
 +      (synopsis "Autocompletion and static analysis library for Python")
 +      (description
 +       "Jedi is a static analysis tool for Python that can be used in Integrated
  Development Environments (@dfn{IDE}s) and text editors.  It understands Python
  on a deeper level than many other static analysis frameworks for Python.
  
  Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
  well.")
 -    (license license:expat)))
 +      (license license:expat))))
  
  (define-public python2-jedi
    (package-with-python2 python-jedi))
@@@ -15641,12 -15677,6 +15643,12 @@@ documentation to argparse configuration
      (arguments
       `(#:phases
         (modify-phases %standard-phases
 +         (add-after 'unpack 'fix-tests
 +           ;; See https://github.com/torproject/stem/issues/56
 +           (lambda _
 +             (substitute* "run_tests.py"
 +               (("test\\.task\\.MOCK_VERSION,")
 +                ""))))
           (replace 'check
             (lambda _
               (invoke "./run_tests.py" "--unit")
@@@ -15714,7 -15744,9 +15716,7 @@@ and/or Xon/Xoff.  The port is accessed 
           (add-after 'patch-generated-file-shebangs 'set-sdl-paths
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "KIVY_SDL2_PATH"
 -                     (string-append (assoc-ref inputs "sdl-union")
 -                                    "/include/SDL2"))
 -             #t)))))
 +                     (search-input-directory inputs "/include/SDL2")))))))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("python-cython" ,python-cython)))
@@@ -15790,9 -15822,14 +15792,9 @@@ binary or text."
      (arguments
       `(#:phases
         (modify-phases %standard-phases
 -         (add-before 'check 'set-pythonpath
 +         (add-before 'check 'set-home
             (lambda _
 -             (setenv "PYTHONPATH"
 -                     (string-append
 -                      (getcwd) "/src/"
 -                      ":" (getenv "PYTHONPATH")))
 -             (setenv "HOME" "")
 -             #t)))))
 +             (setenv "HOME" ""))))))
      (native-inputs
       `(("python-coverage" ,python-coverage)
         ("python-nose" ,python-nose)))
@@@ -15940,6 -15977,8 +15942,6 @@@ discovery, monitoring and configuration
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH" (string-append "./build/lib:"
 -                                                 (getenv "PYTHONPATH")))
               (invoke "pytest" "-vv"))))))
      (build-system python-build-system)
      (native-inputs
@@@ -15961,23 -16000,33 +15963,20 @@@ Python to manipulate OpenDocument 1.2 f
  (define-public python-natsort
    (package
      (name "python-natsort")
-     (version "7.0.1")
+     (version "7.1.1")
      (source (origin
                (method url-fetch)
                (uri (pypi-uri "natsort" version))
                (sha256
                 (base32
-                 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
+                 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((guix build utils)
 -                  (guix build python-build-system)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26)
 -                  (ice-9 ftw))
 -       #:phases
 +     `(#:phases
         (modify-phases %standard-phases
-          (add-before 'check 'set-cachedir
-            ;; Tests require write access to $HOME by default
-            (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
           (replace 'check
             (lambda _
 -             (let ((cwd (getcwd)))
 -               (setenv "PYTHONPATH"
 -                       (string-append
 -                        cwd "/build/"
 -                        (find (cut string-prefix? "lib" <>)
 -                              (scandir (string-append cwd "/build")))
 -                        ":"
 -                        (getenv "PYTHONPATH")))
 -               (invoke "pytest" "-v")))))))
 +             (invoke "pytest" "-v"))))))
      (native-inputs
       `(("python-hypothesis" ,python-hypothesis)
         ("python-pytest-cov" ,python-pytest-cov)
@@@ -15996,23 -16045,7 +15995,7 @@@ on a list such as @code{[@code{a20}, @c
  identifies numbers and sorts them separately from strings.  It can also sort
  version numbers, real numbers, mixed types and more, and comes with a shell
  command @command{natsort} that exposes this functionality in the command line.")
-     (license license:expat)
-     (properties `((python2-variant . ,(delay python2-natsort))))))
- ;; Natsort 6.x are the last versions with support for Python 2.
- (define-public python2-natsort
-   (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
-     (package (inherit base)
-              (version "6.2.1")
-              (source (origin
-                        (method url-fetch)
-                        (uri (pypi-uri "natsort" version))
-                        (sha256
-                         (base32
-                          "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
-              (native-inputs
-               `(("python2-pathlib" ,python2-pathlib)
-                 ,@(package-native-inputs base))))))
+     (license license:expat)))
  
  (define-public glances
    (package
@@@ -16185,9 -16218,7 +16168,9 @@@ focus on building massively scalable we
                (uri (pypi-uri "random2" version ".zip"))
                (sha256
                 (base32
 -                "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
 +                "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
 +              (patches
 +               (search-patches "python-random2-getrandbits-test.patch"))))
      (build-system python-build-system)
      (native-inputs `(("unzip" ,unzip)))
      (home-page "http://pypi.python.org/pypi/random2")
@@@ -16311,6 -16342,10 +16294,6 @@@ is used by PostgreSQL and the OpenSSH S
               (delete-file "tests/__init__.py")))
           (replace 'check
             (lambda _
 -             ;; Extend PYTHONPATH so the built package will be found.
 -             (setenv "PYTHONPATH"
 -                     (string-append (getcwd) "/build/lib:"
 -                                    (getenv "PYTHONPATH")))
               (invoke "py.test" "-vv" ))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
@@@ -16339,6 -16374,16 +16322,6 @@@ useful as a validator for JSON data."
          (base32
           "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
      (build-system python-build-system)
 -    (arguments
 -     `(#:phases
 -       (modify-phases %standard-phases
 -         (add-before 'check 'set-pythonpath
 -           (lambda _
 -             (setenv "PYTHONPATH"
 -                     (string-append
 -                      (getcwd) "/test/"
 -                      ":" (getenv "PYTHONPATH")))
 -             #t)))))
      (home-page
       "https://github.com/eliben/pyelftools")
      (synopsis
@@@ -16367,7 -16412,8 +16350,7 @@@ Record Format (DWARF)."
         (modify-phases %standard-phases
           (add-after 'unpack 'patch
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((libev (string-append (assoc-ref inputs "libev")
 -                                         "/lib/libev.so.4")))
 +             (let ((libev (search-input-file inputs "/lib/libev.so.4")))
                 (substitute* "setup.py"
                   (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
                    (string-append "libev_dll_name = \"" libev "\"")))))))))
@@@ -16601,25 -16647,43 +16584,25 @@@ possible on all supported Python versio
             "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((guix build utils)
 -                  (guix build python-build-system)
 -                  (ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26))
 -       #:phases (modify-phases %standard-phases
 +     `(#:phases (modify-phases %standard-phases
                    (add-after 'unpack 'use-absolute-python
                      (lambda _
                        (substitute* "Cheetah/CheetahWrapper.py"
                          (("#!/usr/bin/env python")
 -                         (string-append "#!" (which "python"))))
 -                      #t))
 +                         (string-append "#!" (which "python"))))))
                    (add-after 'unpack 'fix-tests
                      (lambda _
                        (substitute* "Cheetah/Tests/ImportHooks.py"
                          (("os.path.dirname\\(__file__\\)")
 -                         (string-append "'" (getcwd) "/Cheetah/Tests'")))
 -                      #t))
 +                         (string-append "'" (getcwd) "/Cheetah/Tests'")))))
                    (replace 'check
                      (lambda _
 -                      (let ((cwd (getcwd)))
 -                        (setenv "PYTHONPATH"
 -                                (string-append
 -                                 cwd "/build/"
 -                                 (find (cut string-prefix? "lib" <>)
 -                                       (scandir (string-append cwd "/build")))
 -                                 ":" (getenv "PYTHONPATH")))
 -                        (setenv "PATH"
 -                                (string-append (getenv "PATH")
 -                                               ":" cwd "/bin"))
 -                        (setenv "TMPDIR" "/tmp")
 -
 -                        (substitute* "Cheetah/Tests/Test.py"
 -                          (("unittest.TextTestRunner\\(\\)")
 -                           "unittest.TextTestRunner(verbosity=2)"))
 -
 -                        (invoke "python" "Cheetah/Tests/Test.py")))))))
 +                      (setenv "TMPDIR" "/tmp")
 +                      (substitute* "Cheetah/Tests/Test.py"
 +                        (("unittest.TextTestRunner\\(\\)")
 +                         "unittest.TextTestRunner(verbosity=2)"))
 +
 +                      (invoke "python" "Cheetah/Tests/Test.py"))))))
      (propagated-inputs
       `(("python-markdown" ,python-markdown)))    ;optional
      (home-page "https://cheetahtemplate.org/")
@@@ -16715,6 -16779,9 +16698,6 @@@ protocols written in pure Python."
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH"
 -                     (string-append (getcwd) "/build/lib:"
 -                                    (getenv "PYTHONPATH")))
               (invoke "python" "test/test_pbkdf2.py"))))))
      (propagated-inputs
       `(("python-pycrypto" ,python-pycrypto)))  ; optional
@@@ -17050,15 -17117,7 +17033,15 @@@ instead of servers and network commands
      ;; python-twisted depends on python-automat.  Twisted is optional, but the
      ;; tests fail if it is not available.  Also see
      ;; <https://github.com/glyph/automat/issues/71>.
 -    (arguments '(#:tests? #f))
 +    (arguments
 +     `(#:tests? #f
 +       #:phases
 +       (modify-phases %standard-phases
 +         ;; Remove script, because it depends on python-twisted.
 +         (add-after 'unpack 'remove-entrypoint
 +           (lambda _
 +             (substitute* "setup.py"
 +               (("\"automat-visualize = automat._visualize:tool\"") "")))))))
      (native-inputs
       `(("python-m2r" ,python-m2r)
         ("python-setuptools-scm" ,python-setuptools-scm)
@@@ -17135,17 -17194,33 +17118,17 @@@ and bit flag values."
                  "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((guix build utils)
 -                  (guix build python-build-system)
 -                  (ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26))
 -       #:phases
 -       (modify-phases %standard-phases
 -         (replace 'check
 -           (lambda* (#:key tests? #:allow-other-keys)
 -             (when tests?
 -               (let ((cwd (getcwd)))
 -                 (setenv "PYTHONPATH"
 -                         (string-append
 -                          cwd "/build/"
 -                          (find (cut string-prefix? "lib" <>)
 -                                (scandir (string-append cwd "/build")))
 -                          ":"
 -                          (getenv "PYTHONPATH")))
 -                 (invoke "python" "-m" "pytest"))))))))
 +     `(#:phases (modify-phases %standard-phases
 +                  (replace 'check
 +                    (lambda* (#:key tests? #:allow-other-keys)
 +                      (when tests?
 +                        (invoke "pytest")))))))
      (native-inputs
       `(("python-coverage" ,python-coverage)
         ("python-hypothesis" ,python-hypothesis)
         ("python-pympler" ,python-pympler)
         ("python-pytest" ,python-pytest)
 -       ("python-six" ,python-six)
 -       ("python-sphinx" ,python-sphinx)
 -       ("python-zope-interface" ,python-zope-interface)))
 +       ("python-six" ,python-six)))
      (home-page "https://github.com/python-attrs/attrs/")
      (synopsis "Attributes without boilerplate")
      (description "@code{attrs} is a Python package with class decorators that
@@@ -17160,6 -17235,13 +17143,6 @@@ protocols."
    (package
      (inherit python-attrs)
      (name "python-attrs-bootstrap")
 -    (version "19.3.0")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (pypi-uri "attrs" version))
 -              (sha256
 -               (base32
 -                "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
      (native-inputs `())
      (arguments `(#:tests? #f))))
  
@@@ -17267,22 -17349,28 +17250,22 @@@ happens using the @code{logging} librar
  (define-public python-astroid
    (package
      (name "python-astroid")
 -    (version "2.4.2")
 +    (version "2.6.6")
      (source
       (origin
 -       (method url-fetch)
 -       (uri (pypi-uri "astroid" version))
 +       (method git-fetch)
 +       (uri (git-reference
 +             (url "https://github.com/PyCQA/astroid")
 +             (commit (string-append "v" version))))
 +       (file-name (git-file-name name version))
         (sha256
 -        (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
 -       (modules '((guix build utils)))
 -       (snippet
 -        '(begin
 -           ;; Check to see if the version pinning has been removed.
 -           (substitute* "astroid/__pkginfo__.py"
 -             (("==1\\.4\\.\\*") ">=1.4.0"))
 -           #t))))
 +        (base32 "1amzf996inwmh4r3mlpzmch60xs6lrg86vppfnwl1y0l8r0y7zxh"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
 -       ("python-six" ,python-six)
         ("python-wrapt" ,python-wrapt)))
      (native-inputs
 -     `(("python-dateutil" ,python-dateutil)
 -       ("python-pytest" ,python-pytest)
 +     `(("python-pytest" ,python-pytest)
         ("python-pytest-runner" ,python-pytest-runner)))
      (home-page "https://github.com/PyCQA/astroid")
      (synopsis "Common base representation of python source code for pylint and
@@@ -17358,77 -17446,23 +17341,77 @@@ version, is suitable to be include as 
  (define-public python-isort
    (package
      (name "python-isort")
 -    (version "4.3.4")
 +    (version "5.7.0")
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
 -              ;; Tests pass only from the Github sources
 -              (url "https://github.com/timothycrosley/isort")
 -              (commit version)))
 +             ;; Tests pass only from the Github sources
 +             (url "https://github.com/timothycrosley/isort")
 +             (commit version)))
         (file-name (git-file-name name version))
 +       (modules '((guix build utils)))
 +       (snippet '(for-each delete-file (find-files "." "\\.whl$")))
         (sha256
          (base32
 -         "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
 +         "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
      (build-system python-build-system)
 +    (arguments
 +     `(#:phases
 +       (modify-phases %standard-phases
 +         ;; A foretaste of what our future python-build-system will need to
 +         ;; do.
 +         (replace 'build
 +           (lambda _
 +             (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
 +         (replace 'install
 +           (lambda* (#:key outputs #:allow-other-keys)
 +             (let ((out (assoc-ref outputs "out"))
 +                   (whl (car (find-files "dist" "\\.whl$"))))
 +               (invoke "pip" "--no-cache-dir" "--no-input"
 +                       "install" "--no-deps" "--prefix" out whl))))
 +         (add-after 'install 'install-example-plugins
 +           (lambda* (#:key outputs #:allow-other-keys)
 +             (let ((out (assoc-ref outputs "out")))
 +               ;; Patch to use the core poetry API.
 +               (substitute* '("example_isort_formatting_plugin/pyproject.toml"
 +                              "example_shared_isort_profile/pyproject.toml")
 +                 (("poetry>=0.12")
 +                  "poetry-core>=1.0.0")
 +                 (("poetry.masonry.api")
 +                  "poetry.core.masonry.api"))
 +               ;; Build the example plugins.
 +               (for-each (lambda (source-directory)
 +                           (invoke "python" "-m" "build" "--wheel"
 +                                   "--no-isolation" "--outdir=dist"
 +                                   source-directory))
 +                         '("example_isort_formatting_plugin"
 +                           "example_shared_isort_profile"))
 +               ;; Install them to temporary storage, for the test.
 +               (setenv "HOME" (getcwd))
 +               (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
 +                 (apply invoke "pip" "--no-cache-dir" "--no-input"
 +                        "install"  "--user" "--no-deps" example-whls)))))
 +         (replace 'check
 +           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
 +             (when tests?
 +               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
 +                 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
 +               (add-installed-pythonpath inputs outputs)
 +               (invoke "pytest" "-vv" "tests/unit/"
 +                       "--ignore=tests/unit/test_deprecated_finders.py")))))))
      (native-inputs
 -     `(("python-mock" ,python-mock)
 +     `(("git" ,git-minimal)
 +       ("python-black" ,python-black)
 +       ("python-colorama" ,python-colorama)
 +       ("python-hypothesmith" ,python-hypothesmith)
 +       ("python-libcst" ,python-libcst-minimal)
 +       ("python-poetry-core" ,python-poetry-core)
 +       ("python-pylama" ,python-pylama)
 +       ("python-pypa-build" ,python-pypa-build)
 +       ("python-pytest-mock" ,python-pytest-mock)
         ("python-pytest" ,python-pytest)))
 -    (home-page "https://github.com/timothycrosley/isort")
 +    (home-page "https://github.com/PyCQA/isort")
      (synopsis "Python utility/library to sort python imports")
      (description "@code{python-isort} is a python utility/library to sort
  imports alphabetically, and automatically separated into sections.  It
@@@ -17800,6 -17834,9 +17783,6 @@@ of corner cases, factory_boy allows yo
  current test, while only declaring the test-specific fields")
      (license license:expat)))
  
 -(define-public python2-factory-boy
 -  (package-with-python2 python-factory-boy))
 -
  (define-public python-translate-toolkit
    (package
      (name "python-translate-toolkit")
@@@ -17889,17 -17926,10 +17872,17 @@@ information."
     (package/inherit
      python-packaging
      (name "python-packaging-bootstrap")
 +    (arguments
 +      (substitute-keyword-arguments (package-arguments python-packaging)
 +        ((#:phases phases)
 +         `(modify-phases ,phases
 +            (add-after 'unpack 'fix-dependencies
 +              (lambda* (#:key tests? #:allow-other-keys)
 +                (substitute* "setup.py" (("\"six\"") ""))))))
 +         ((#:tests? _ #f) #f)))
      (native-inputs '())
      (propagated-inputs
 -     `(("python-pyparsing" ,python-pyparsing)))
 -    (arguments '(#:tests? #f)))))
 +     `(("python-pyparsing" ,python-pyparsing))))))
  
  (define-public python2-packaging-bootstrap
    (hidden-package
      (name "python2-packaging-bootstrap")
      (native-inputs '())
      (propagated-inputs
 -     `(("python-pyparsing" ,python2-pyparsing)))
 +     `(("python-pyparsing" ,python2-pyparsing)
 +       ("python-six" ,python2-six-bootstrap)))
      (arguments
       `(#:tests? #f
         ,@(package-arguments python2-packaging))))))
  (define-public python-relatorio
    (package
      (name "python-relatorio")
-     (version "0.8.0")
+     (version "0.10.0")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "relatorio" version))
         (sha256
          (base32
-          "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
+          "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-lxml" ,python-lxml)
@@@ -17955,13 -17984,6 +17938,13 @@@ for more filetypes can be easily added 
      (build-system python-build-system)
      (arguments
       `(#:phases (modify-phases %standard-phases
 +                  (add-after 'unpack 'relax-requirements
 +                    (lambda _
 +                      (substitute* "setup.py"
 +                        ((".*'future'.*")
 +                         "")
 +                        (("colorama==0.4.1")
 +                         "colorama>=0.4.1"))))
                    (replace 'check
                      (lambda _
                        (invoke "python" "radon/tests/run.py"))))))
@@@ -18195,11 -18217,23 +18178,11 @@@ applying JSON Patches according to RFC 
                  "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((guix build utils)
 -                  (guix build python-build-system)
 -                  (ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26))
 -       #:phases
 +     `(#:phases
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (let ((cwd (getcwd)))
 -               (setenv "PYTHONPATH"
 -                       (string-append cwd "/build/"
 -                                      (find (cut string-prefix? "lib" <>)
 -                                            (scandir (string-append cwd "/build")))
 -                                      ":"
 -                                      (getenv "PYTHONPATH")))
 -             (invoke "pytest" "-v")))))))
 +             (invoke "pytest" "-v"))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (home-page "https://rfc3986.readthedocs.io/")
@@@ -18513,13 -18547,19 +18496,13 @@@ complex datatypes to and from native Py
      (build-system python-build-system)
      (arguments
       '(#:phases (modify-phases %standard-phases
 -                  (add-after 'unpack 'disable-prance-tests
 -                    (lambda _
 -                      ;; Disable validation tests since they require the
 -                      ;; optional 'prance' library which is not yet in Guix.
 -                      (substitute* "tests/test_ext_marshmallow_openapi.py"
 -                        (("def test_openapi_tools_validate.*" all)
 -                         (string-append "@pytest.mark.xfail\n" all)))))
                    (replace 'check
                      (lambda _
 -                      (setenv "PYTHONPATH"
 -                              (string-append "./build/lib:"
 -                                             (getenv "PYTHONPATH")))
 -                      (invoke "pytest" "-vv"))))))
 +                      (invoke "pytest" "-vv"
 +                              ;; Disable validation tests since they require
 +                              ;; the optional 'prance' library which is not
 +                              ;; yet in Guix.
 +                              "-k" "not openapi_tools_validate"))))))
      (propagated-inputs
       `(("python-pyyaml" ,python-pyyaml)))
      (native-inputs
@@@ -18554,6 -18594,9 +18537,6 @@@ as Swagger."
               (substitute* "Makefile"
                 (("flake8 flasgger --ignore=F403")
                  "flake8 flasgger --ignore=E731,F403"))
 -             (setenv "PYTHONPATH" (string-append (getcwd)
 -                                                 ":"
 -                                                 (getenv "PYTHONPATH")))
               (invoke "py.test"))))))
      (propagated-inputs
       `(("python-flask" ,python-flask)
@@@ -18940,26 -18983,25 +18923,26 @@@ ignoring formatting changes."
  (define-public python-tqdm
    (package
      (name "python-tqdm")
 -    (version "4.43.0")
 +    (version "4.60.0")
      (source
        (origin
          (method url-fetch)
          (uri (pypi-uri "tqdm" version))
           (sha256
             (base32
 -             "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
 +             "1bjpy4mjg6ryp0ijvqi77vgs76l5hh3zrv3x4vmcwxrlbswvvppb"))))
      (build-system python-build-system)
      (arguments
       '(#:phases (modify-phases %standard-phases
                    (replace 'check
 -                    (lambda* (#:key inputs outputs #:allow-other-keys)
 -                      (add-installed-pythonpath inputs outputs)
 -                      ;; This invokation is taken from tox.ini.
 -                      (invoke "nosetests" "--ignore-files=\"test_perf.py\""
 -                              "-d" "-v" "tqdm/"))))))
 +                    (lambda _
 +                      (invoke "pytest" "-vv" "-k" "not perf"))))))
      (native-inputs
 -     `(("python-nose" ,python-nose)))
 +     `(("python-pytest" ,python-pytest)
 +       ("python-pytest-asyncio" ,python-pytest-asyncio)
 +       ("python-pytest-timeout" ,python-pytest-timeout)
 +       ("python-setuptools-scm" ,python-setuptools-scm)
 +       ("python-toml" ,python-toml)))
      (home-page "https://github.com/tqdm/tqdm")
      (synopsis "Fast, extensible progress meter")
      (description
@@@ -19083,8 -19125,7 +19066,8 @@@ lines are read from a single file."
      (native-inputs
       `(("python-pbr" ,python-pbr-minimal)))
      (propagated-inputs
 -      `(("python-linecache2" ,python-linecache2)))
 +      `(("python-linecache2" ,python-linecache2)
 +        ("python-six" ,python-six)))
      (home-page
        "https://github.com/testing-cabal/traceback2")
      (synopsis "Backports of the traceback module")
@@@ -20024,7 -20065,7 +20007,7 @@@ source bytes using the UTF-8 encoding a
  (define-public python-typed-ast
    (package
      (name "python-typed-ast")
 -    (version "1.4.0")
 +    (version "1.4.2")
      (source
       (origin
         (method git-fetch)
               (url "https://github.com/python/typed_ast")
               (commit version)))
         (sha256
 -        (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
 +        (base32 "1wr6pkvvrq6rzjjw88pd5xy8fy06msam4hlxbkglvdmwh4c083l0"))
         (file-name (git-file-name name version))))
      (build-system python-build-system)
      (arguments
 -     `(#:modules ((guix build utils)
 -                  (guix build python-build-system)
 -                  (ice-9 ftw)
 -                  (srfi srfi-1)
 -                  (srfi srfi-26))
 -       #:phases
 +     `(#:phases
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (let ((cwd (getcwd)))
 -               (setenv "PYTHONPATH"
 -                       (string-append cwd "/build/"
 -                                      (find (cut string-prefix? "lib" <>)
 -                                            (scandir (string-append cwd "/build")))
 -                                      ":"
 -                                      (getenv "PYTHONPATH"))))
 -             (invoke "pytest")
 -             #t)))))
 +             (invoke "pytest"))))))
      (native-inputs `(("python-pytest" ,python-pytest)))
      (home-page "https://github.com/python/typed_ast")
      (synopsis "Fork of Python @code{ast} modules with type comment support")
@@@ -20174,13 -20228,13 +20157,13 @@@ Included are implementations of
  (define-public bpython
    (package
      (name "bpython")
 -    (version "0.20.1")
 +    (version "0.21")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "bpython" version))
         (sha256
 -        (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
 +        (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
      (build-system python-build-system)
      (arguments
       `(#:phases
         ("python-curtsies" ,python-curtsies)
         ("python-greenlet" ,python-greenlet)
         ("python-six" ,python-six)
 -       ("python-wcwidth" ,python-wcwidth)
 +       ("python-cwcwidth" ,python-cwcwidth)
 +       ("python-pyxdg" ,python-pyxdg)
         ;; optional dependencies
         ("python-urwid" ,python-urwid)   ; for bpython-urwid only
         ("python-watchdog" ,python-watchdog)
         ("python-jedi" ,python-jedi)))
      (native-inputs
       `(("python-sphinx" ,python-sphinx)
 -       ("python-mock" ,python-mock)))
 +       ("python-mock" ,python-mock)
 +       ("python-tox" ,python-tox)
 +       ("python-wheel" ,python-wheel)))
      (home-page "https://bpython-interpreter.org/")
      (synopsis "Fancy interface to the Python interpreter")
      (description "Bpython is a fancy interface to the Python
@@@ -20414,13 -20465,13 +20397,13 @@@ time-based (TOTP) passwords."
  (define-public python-parso
    (package
      (name "python-parso")
 -    (version "0.7.1")
 +    (version "0.8.2")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "parso" version))
         (sha256
 -        (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
 +        (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
      (native-inputs
       `(("python-pytest" ,python-pytest)))
      (build-system python-build-system)
@@@ -20749,7 -20800,8 +20732,7 @@@ user-space file systems in Python."
                 (("pytest < 5") "pytest < 7"))
               ;; We don't care about a coverage report.
               (substitute* "test/requirements.txt"
 -               (("coverage.*") "coverage\n"))
 -             #t))
 +               (("coverage.*") "coverage\n"))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
                 (delete-file "test/test_js_client.py")
                 (delete-file "test/test_tsd_types.py")
                 (delete-file "test/test_python_gen.py")
 -               (setenv "PYTHONPATH"
 -                       (string-append (getcwd) ":"
 -                                      (getenv "PYTHONPATH")))
 -               (invoke "pytest"))
 -             #t)))))
 +               (invoke "pytest")))))))
      (propagated-inputs
       `(("python-ply" ,python-ply)
         ("python-six" ,python-six)))
@@@ -20920,12 -20976,9 +20903,12 @@@ library to allow local file system acce
      (arguments
       `(#:phases
         (modify-phases %standard-phases
 +         ;; system-error "utime" "~A" ("No such file or directory")
 +         (delete 'ensure-no-mtimes-pre-1980)
           (replace 'check
 -           (lambda _
 -             (invoke "pytest" "-vv"))))))
 +           (lambda* (#:key tests? #:allow-other-keys)
 +             (when tests?
 +               (invoke "pytest" "-vv")))))))
      (native-inputs
       `(("python-coverage" ,python-coverage)
         ("python-pytest" ,python-pytest)))
@@@ -21576,6 -21629,13 +21559,6 @@@ data."
      (arguments
       '(#:phases
         (modify-phases %standard-phases
 -         (add-before 'check 'do-not-override-PYTHONPATH
 -           (lambda _
 -             ;; Append to PYTHONPATH instead of overriding it so
 -             ;; that dependencies from Guix can be found.
 -             (substitute* "tests/testutils.py"
 -               (("env\\['PYTHONPATH'\\] = pythonpath")
 -                "env['PYTHONPATH'] += os.pathsep + pythonpath"))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (if tests?
@@@ -21998,13 -22058,13 +21981,13 @@@ distribution."
  (define-public python-gast
    (package
      (name "python-gast")
 -    (version "0.3.3")
 +    (version "0.5.2")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "gast" version))
         (sha256
 -        (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
 +        (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-astunparse" ,python-astunparse)))
@@@ -22356,6 -22416,28 +22339,28 @@@ processes may share the same data."
  format.")
      (license license:expat)))
  
+ (define-public python-crontab
+   (package
+     (name "python-crontab")
+     (version "2.5.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri name version))
+        (sha256
+         (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
+     (build-system python-build-system)
+     (arguments
+      ;; Comptability tests fail so they are disabled.
+      `(#:tests? #f))
+     (inputs
+      `(("python-dateutil" ,python-dateutil)))
+     (home-page "https://gitlab.com/doctormo/python-crontab/")
+     (synopsis "Module for reading and writing crontab files")
+     (description "This Python module can read, write crontab files, and
+ access the system cron automatically and simply using a direct API.")
+     (license license:lgpl3+)))
  (define-public python-pylzma
    (package
      (name "python-pylzma")
@@@ -22474,13 -22556,14 +22479,13 @@@ compatible)."
  (define-public python-bsddb3
    (package
      (name "python-bsddb3")
 -    (version "6.2.6")
 +    (version "6.2.9")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "bsddb3" version))
         (sha256
 -        (base32
 -         "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
 +        (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
      (build-system python-build-system)
      (inputs
       `(("bdb" ,bdb)))
@@@ -23137,6 -23220,8 +23142,6 @@@ essential tools are located."
         (modify-phases %standard-phases
           (replace 'check
             (lambda _
 -             (setenv "PYTHONPATH"
 -                     (string-append (getcwd) ":" (getenv "PYTHONPATH")))
               (invoke "python" "./tests/__main__.py"))))))
      (propagated-inputs
       `(("python-dill" ,python-dill)
@@@ -23844,10 -23929,7 +23849,10 @@@ Python."
          (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
      (build-system python-build-system)
      (arguments
 -     '(#:tests? #f)) ; TODO: package dependencies required for tests.
 +     ;; TODO: package dependencies required for tests.
 +     '(#:tests? #f
 +       #:phases (modify-phases %standard-phases
 +                  (delete 'sanity-check))))
      (synopsis "Interface for Open Geospatial Consortium web service")
      (description
       "OWSLib is a Python package for client programming with Open Geospatial
@@@ -24679,7 -24761,8 +24684,7 @@@ be necessary when using @code{cmd}."
         (modify-phases %standard-phases
           (add-before 'build 'qualify-libtidy
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((libtidy (string-append (assoc-ref inputs "tidy")
 -                                           "/lib/libtidy.so")))
 +             (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
                 (substitute* "tidylib/tidy.py"
                   (("ctypes\\.util\\.find_library\\('tidy'\\)")
                    (format #f "'~a'" libtidy)))
@@@ -25087,8 -25170,9 +25092,8 @@@ It adds a simple and readable way to pr
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "TZ" "UTC")
               (setenv "TZDIR"
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))
 -             #t)))))
 +                     (search-input-directory inputs
 +                                             "share/zoneinfo")))))))
      (home-page "https://github.com/scrapinghub/dateparser")
      (synopsis
       "Date parsing library designed to parse dates from HTML pages")
@@@ -25206,10 -25290,10 +25211,10 @@@ By default it uses the open Python vuln
      (propagated-inputs
       `(("wheel" ,python-wheel)))
      (native-inputs
 -     `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
 +     `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
                                          texlive-fonts-ec
 -                                        texlive-latex-hyperref
 -                                        texlive-latex-oberdiek
 +                                        texlive-hyperref
 +                                        texlive-oberdiek
                                          texlive-lm
                                          texlive-xcolor)))))
      (arguments
               (substitute* "tests.py"
                 (("test_basic_conversion_from_http_url")
                  "skip_test_basic_conversion_from_http_url"))
 -             ;; Needed by texlive-union to generate fonts
 -             (setenv "HOME" "/tmp")
               #t)))))
      (home-page "https://github.com/bebraw/pypandoc")
      (synopsis "Python wrapper for pandoc")
@@@ -25540,16 -25626,10 +25545,16 @@@ process."
      (inputs
       `(("libpng" ,libpng)
         ("libtiff" ,libtiff)
 -       ("python2-wxpython" ,python2-wxpython)
         ("zlib" ,zlib)))
      (arguments
 -     `(#:python ,python-2))
 +     `(#:python ,python-2
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-after 'unpack 'disable-wx-support
 +           (lambda _
 +             (substitute* "setup.py"
 +               (("no_wx = False")
 +                "no_wx = True")))))))
      (synopsis "Framework for building document analysis applications")
      (description
       "Gamera is a toolkit for building document image recognition systems.")
@@@ -26404,55 -26484,6 +26409,55 @@@ application binary interfaces (ABIs); i
  supports x86_64 instructions up to AVX-512 and SHA.")
        (license license:bsd-2))))
  
 +(define-public python-sgmllib3k
 +  (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
 +        (revision "1"))
 +    (package
 +      (name "python-sgmllib3k")
 +      (version
 +       (git-version "1.0.0" revision commit))
 +      (source
 +       (origin
 +         (method git-fetch)
 +         (uri (git-reference
 +               (url "https://github.com/hsoft/sgmllib")
 +               (commit commit)))
 +         (file-name (git-file-name name version))
 +         (sha256
 +          (base32
 +           "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
 +      (build-system python-build-system)
 +      (home-page "https://github.com/hsoft/sgmllib")
 +      (synopsis "Python 3 port of sgmllib")
 +      (description "This package is a port of sgmllib that is no longer part
 +of Python 3.")
 +      (license license:bsd-3))))
 +
 +(define-public python-cwcwidth
 +  (package
 +    (name "python-cwcwidth")
 +    (version "0.1.4")
 +    (source
 +     (origin
 +       (method url-fetch)
 +       (uri (pypi-uri "cwcwidth" version))
 +       (sha256
 +        (base32
 +         "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
 +    (build-system python-build-system)
 +    (native-inputs
 +     `(("python-cython" ,python-cython)
 +       ("python-pytest" ,python-pytest)
 +       ("python-setuptools-scm" ,python-setuptools-scm)
 +       ("python-toml" ,python-toml)
 +       ("python-wheel" ,python-wheel)))
 +    (home-page
 +     "https://github.com/sebastinas/cwcwidth")
 +    (synopsis "Python bindings for wc(s)width")
 +    (description "This package provides bindings for wcwidth and wcswidth
 +functions defined in POSIX.1-2001 and POSIX.1-2008.")
 +    (license license:expat)))
 +
  (define-public python-pyan3
    (package
      (name "python-pyan3")
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
                 ;; Extend PYTHONPATH so the built package will be found.
 -               (setenv "PYTHONPATH"
 -                       (string-append (getcwd) ":" (getenv "PYTHONPATH")))
 +               (setenv "GUIX_PYTHONPATH"
 +                       (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
                 (invoke "pytest")))))))
      (native-inputs
       `(("python-pytest" ,python-pytest)
@@@ -34,6 -34,7 +34,7 @@@
    #:use-module (guix download)
    #:use-module (guix git-download)
    #:use-module (guix packages)
+   #:use-module (gnu packages admin)
    #:use-module (gnu packages compression)
    #:use-module (gnu packages crates-io)
    #:use-module (gnu packages crates-graphics)
@@@ -42,6 -43,7 +43,7 @@@
    #:use-module (gnu packages fontutils)
    #:use-module (gnu packages gtk)
    #:use-module (gnu packages jemalloc)
+   #:use-module (gnu packages linux)
    #:use-module (gnu packages ssh)
    #:use-module (gnu packages pcre)
    #:use-module (gnu packages pkg-config)
@@@ -392,7 -394,8 +394,7 @@@ characters, ASCII whitespace characters
            "0m5lrvx6wwkxqdc5digm1k4diiaqcg5j4pia77s5nw1aam7k51hy"))))
      (build-system cargo-build-system)
      (arguments
 -     `(#:rust ,rust-1.46
 -       #:modules ((guix build cargo-build-system)
 +     `(#:modules ((guix build cargo-build-system)
                    (guix build utils)
                    (srfi srfi-26))
         #:cargo-inputs
@@@ -644,6 -647,60 +646,60 @@@ gitignore rules."
           (base32
            "13jzbmjz1bmmfr0i80hw6ar484mgabx3hbpb2ynhk0ddqi0yr58m"))))))
  
+ (define-public sniffglue
+   (package
+     (name "sniffglue")
+     (version "0.12.1")
+     (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "sniffglue" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1q1kwkw1hq38qgvc6j4b5l9m85a6lpn1jls4bm27c5kha9cg8l24"))))
+     (build-system cargo-build-system)
+     (arguments
+      `(#:cargo-inputs
+        (("rust-ansi-term" ,rust-ansi-term-0.12)
+         ("rust-anyhow" ,rust-anyhow-1)
+         ("rust-atty" ,rust-atty-0.2)
+         ("rust-base64" ,rust-base64-0.13)
+         ("rust-dhcp4r" ,rust-dhcp4r-0.2)
+         ("rust-dirs-next" ,rust-dirs-next-2)
+         ("rust-dns-parser" ,rust-dns-parser-0.8)
+         ("rust-env-logger" ,rust-env-logger-0.8)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-nix" ,rust-nix-0.20)
+         ("rust-nom" ,rust-nom-6)
+         ("rust-num-cpus" ,rust-num-cpus-1)
+         ("rust-pcap-sys" ,rust-pcap-sys-0.1)
+         ("rust-pktparse" ,rust-pktparse-0.5)
+         ("rust-reduce" ,rust-reduce-0.1)
+         ("rust-serde" ,rust-serde-1)
+         ("rust-serde-derive" ,rust-serde-derive-1)
+         ("rust-serde-json" ,rust-serde-json-1)
+         ("rust-sha2" ,rust-sha2-0.9)
+         ("rust-structopt" ,rust-structopt-0.3)
+         ("rust-syscallz" ,rust-syscallz-0.15)
+         ("rust-tls-parser" ,rust-tls-parser-0.10)
+         ("rust-toml" ,rust-toml-0.5)
+         ("rust-users" ,rust-users-0.11))
+        #:cargo-development-inputs
+        (("rust-boxxy" ,rust-boxxy-0.11))))
+     (inputs
+      `(("libpcap" ,libpcap)
+        ("libseccomp" ,libseccomp)))
+     (home-page "https://github.com/kpcyrd/sniffglue")
+     (synopsis "Secure multithreaded packet sniffer")
+     (description
+      "This package provides a network sniffer written in Rust.  Packets
+ are parsed concurrently using a thread pool to utilize all cpu cores.  A goal
+ of the project is to be runnable on untrusted networks without crashing.")
+     (license license:gpl3)))
  (define-public tectonic
    (package
      (name "tectonic")
diff --combined gnu/packages/ssh.scm
@@@ -1,5 -1,5 +1,5 @@@
  ;;; GNU Guix --- Functional package management for GNU
 -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
  ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
@@@ -15,7 -15,7 +15,7 @@@
  ;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
  ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
 -;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 +;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
  ;;;
  ;;; This file is part of GNU Guix.
@@@ -313,12 -313,11 +313,12 @@@ Additionally, various channel-specific 
                (uri (git-reference
                      (url home-page)
                      (commit (string-append "v" version))))
 -              (file-name (string-append name "-" version ".tar.gz"))
 +              (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1xpxkvgj7wgcl450djkcrmrf957mcy2f36hfs5g6kpla1gax2d1g"))
 -              (modules '((guix build utils)))))
 +              (patches (search-patches "guile-ssh-fix-test-suite.patch"
 +                                       "guile-ssh-read-error.patch"))))
      (build-system gnu-build-system)
      (outputs '("out" "debug"))
      (arguments
@@@ -384,9 -383,6 +384,9 @@@ libssh library."
    (package
      (inherit guile-ssh)
      (name "guile2.0-ssh")
 +    (source (origin
 +              (inherit (package-source guile-ssh))
 +              (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
      (native-inputs
       `(("guile" ,guile-2.0) ;needed when cross-compiling.
         ,@(alist-delete "guile" (package-native-inputs guile-ssh))))
    (package
      (inherit guile-ssh)
      (name "guile2.2-ssh")
 +    (source (origin
 +              (inherit (package-source guile-ssh))
 +              (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
      (native-inputs
       `(("guile" ,guile-2.2) ;needed when cross-compiling.
         ,@(alist-delete "guile" (package-native-inputs guile-ssh))))
@@@ -797,14 -790,14 +797,14 @@@ shell services and remote host selectio
  (define-public python-asyncssh
    (package
      (name "python-asyncssh")
-     (version "2.5.0")
+     (version "2.7.1")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "asyncssh" version))
         (sha256
          (base32
-          "02xpzir9rmw7b7k07m3f912h6jvy9yzan9yn3ckrmqx2ffpy4r8b"))))
+          "0lnhh2h1mj79j66ni883s9f3xldnbjb10vh80g24b7m003mm524c"))))
      (build-system python-build-system)
      (propagated-inputs
       `(("python-cryptography" ,python-cryptography)
@@@ -190,7 -190,7 +190,7 @@@ a task."
  (define-public blanket
    (package
      (name "blanket")
-     (version "0.3.1")
+     (version "0.4.1")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "13xip9b2p2ai2jchkck71c849s2rlxzfvlbsgpraw9hswi0rk0jg"))))
+         (base32 "1rk9xxiflj8rf75q56s907xp3jzxc7r88njlmxg07gl6i35mmcmi"))))
      (build-system meson-build-system)
      (arguments
       `(#:glib-or-gtk? #t
               (let* ((out               (assoc-ref outputs "out"))
                      (gi-typelib-path   (getenv "GI_TYPELIB_PATH"))
                      (gst-plugin-path   (getenv "GST_PLUGIN_SYSTEM_PATH"))
 -                    (python-path       (getenv "PYTHONPATH")))
 +                    (python-path       (getenv "GUIX_PYTHONPATH")))
                 (wrap-program (string-append out "/bin/blanket")
                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
 -                 `("PYTHONPATH" ":" prefix (,python-path))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
               #t)))))
      (native-inputs
       `(("desktop-file-utils" ,desktop-file-utils)
diff --combined gnu/packages/tex.scm
@@@ -8,7 -8,7 +8,7 @@@
  ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
  ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 -;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
 +;;; Copyright © 2017, 2020, 2021 Marius Bakke <marius@gnu.org>
  ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
  ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
@@@ -19,7 -19,6 +19,7 @@@
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
  ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
 +;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -40,7 -39,6 +40,7 @@@
    #:use-module ((guix licenses) #:prefix license:)
    #:use-module (guix packages)
    #:use-module (guix download)
 +  #:use-module (guix build-system copy)
    #:use-module (guix build-system gnu)
    #:use-module (guix build-system perl)
    #:use-module (guix build-system python)
@@@ -48,7 -46,6 +48,7 @@@
    #:use-module (guix build-system trivial)
    #:use-module (guix build-system texlive)
    #:use-module (guix utils)
 +  #:use-module (guix deprecation)
    #:use-module (guix git-download)
    #:use-module (guix svn-download)
    #:use-module (gnu packages)
@@@ -125,7 -122,7 +125,7 @@@ copied to their outputs; otherwise the 
                            (string-append doc "/doc")))
                         '())
                   (mkdir-p out)
 -                 (copy-recursively (assoc-ref inputs "source") out)
 +                 (copy-recursively "." out)
                   ,@(if with-documentation?
                         '((delete-file-recursively (string-append out "/doc")))
                         '())
                                "-checkout"))
      (sha256
       (base32
 -      "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83"))))
 +      "04xzf5gr3ylyh3ls09imrx4mwq3qp1k97r9njzlan6hlff875rx2"))))
  
  (define (texlive-hyphen-package name code locations hash)
    "Return a TeX Live hyphenation package with the given NAME, using source
@@@ -227,101 -224,111 +227,101 @@@ files from LOCATIONS with expected chec
  (define texlive-extra-src
    (origin
      (method url-fetch)
 -    (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-extra.tar.xz")
 +    (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-extra.tar.xz")
      (sha256 (base32
 -             "13ncf2an4nlqv18lki6y2p6pcsgs1i54zqkhfwprax5j53bk70j8"))))
 +             "171kg1n9zapw3d2g47d8l0cywa99bl9m54xkqvp9625ks22z78s6"))))
  
  (define texlive-texmf-src
    (origin
      (method url-fetch)
 -    (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-texmf.tar.xz")
 +    (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-texmf.tar.xz")
      (sha256 (base32
 -             "00n4qh9fj8v9zzy3y488hpfq1g3dnnh72y4yjsaikfcqpi59gv62"))))
 +             "070gczcm1h9rx29w2f02xd3nhd84c4k28nfmm8qgp69yq8vd84pz"))))
  
  (define-public texlive-bin
    (package
 -   (name "texlive-bin")
 -   (version "20190410")
 -   (source
 -    (origin
 -      (method url-fetch)
 -      (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/"
 -                          "texlive-" version "-source.tar.xz"))
 -      (sha256
 -       (base32
 -        "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj"))
 -      (patches
 -       (let ((arch-patch
 -              (lambda (name revision hash)
 -                (origin
 -                  (method url-fetch)
 -                  (uri (string-append "https://raw.githubusercontent.com"
 -                                      "/archlinux/svntogit-packages/" revision
 -                                      "/repos/extra-x86_64/" name))
 -                  (file-name (string-append "texlive-bin-" name))
 -                  (sha256 (base32 hash)))))
 -             (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c"))
 -         (list
 -          (arch-patch "pdftex-poppler0.76.patch" arch-revision
 -                      "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax")
 -          (search-patch "texlive-bin-poppler-0.83.patch")
 -          (arch-patch "texlive-poppler-0.84.patch" arch-revision
 -                      "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")
 -          (search-patch "texlive-bin-poppler-0.86.patch"))))
 -      (modules '((guix build utils)
 -                 (ice-9 ftw)))
 -      (snippet
 -       '(begin
 -          (with-directory-excursion "libs"
 -            (let ((preserved-directories '("." ".." "lua53" "luajit")))
 -              ;; Delete bundled software, except Lua which cannot easily be
 -              ;; used as an external dependency.
 -              (for-each delete-file-recursively
 -                        (scandir "."
 -                                 (lambda (file)
 -                                   (and (not (member file preserved-directories))
 -                                        (eq? 'directory (stat:type (stat file)))))))))
 -          ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
 -          #t))))
 -   (build-system gnu-build-system)
 -   (inputs
 -    `(("texlive-extra-src" ,texlive-extra-src)
 -      ("texlive-scripts"
 -       ,(origin
 -          (method svn-fetch)
 -          (uri (svn-reference
 -                (url (string-append "svn://www.tug.org/texlive/tags/"
 -                                    %texlive-tag "/Master/texmf-dist/"
 -                                    "/scripts/texlive"))
 -                (revision %texlive-revision)))
 -          (file-name (string-append "texlive-scripts-"
 -                                    (number->string %texlive-revision)
 -                                    "-checkout"))
 -          (sha256
 -           (base32
 -            "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh"))))
 -      ("cairo" ,cairo)
 -      ("fontconfig" ,fontconfig)
 -      ("fontforge" ,fontforge)
 -      ("freetype" ,freetype)
 -      ("gd" ,gd)
 -      ("gmp" ,gmp)
 -      ("ghostscript" ,ghostscript)
 -      ("graphite2" ,graphite2)
 -      ("harfbuzz" ,harfbuzz)
 -      ("icu4c" ,icu4c)
 -      ("libpaper" ,libpaper)
 -      ("libpng" ,libpng)
 -      ("libxaw" ,libxaw)
 -      ("libxt" ,libxt)
 -      ("mpfr" ,mpfr)
 -      ("perl" ,perl)
 -      ("pixman" ,pixman)
 -      ("poppler" ,poppler)
 -      ("potrace" ,potrace)
 -      ("python" ,python-2) ; incompatible with Python 3 (print syntax)
 -      ("ruby" ,ruby)
 -      ("tcsh" ,tcsh)
 -      ("teckit" ,teckit)
 -      ("zlib" ,zlib)
 -      ("zziplib" ,zziplib)))
 -   (native-inputs
 -    `(("pkg-config" ,pkg-config)))
 -   (arguments
 -    `(#:out-of-source? #t
 -      #:configure-flags
 +    (name "texlive-bin")
 +    (version "20210325")
 +    (source
 +     (origin
 +       (method url-fetch)
 +       (uri (string-append "ftp://tug.org/historic/systems/texlive/2021/"
 +                           "texlive-" version "-source.tar.xz"))
 +       (sha256
 +        (base32
 +         "0jsq1p66l46k2qq0gbqmx25flj2nprsz4wrd1ybn286p11kdkvvs"))
 +       (modules '((guix build utils)
 +                  (ice-9 ftw)))
 +       (snippet
 +        '(begin
 +           (with-directory-excursion "libs"
 +             (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" "xpdf")))
 +               ;; Delete bundled software, except Lua which cannot easily be
 +               ;; used as an external dependency, pplib and xpdf which aren't
 +               ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
 +               (for-each delete-file-recursively
 +                         (scandir "."
 +                                  (lambda (file)
 +                                    (and (not (member file preserved-directories))
 +                                         (eq? 'directory (stat:type (stat file)))))))))
 +           ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
 +           #t))))
 +    (build-system gnu-build-system)
 +    (inputs
 +     `(("texlive-extra-src" ,texlive-extra-src)
 +       ("config" ,config)
 +       ("texlive-scripts"
 +        ,(origin
 +           (method svn-fetch)
 +           (uri (svn-reference
 +                 (url (string-append "svn://www.tug.org/texlive/tags/"
 +                                     %texlive-tag "/Master/texmf-dist/"
 +                                     "/scripts/texlive"))
 +                 (revision %texlive-revision)))
 +           (file-name (string-append "texlive-scripts-"
 +                                     (number->string %texlive-revision)
 +                                     "-checkout"))
 +           (sha256
 +            (base32
 +             "10xpa4nnz1biap7qfv7fb0zk6132ki5g1j8w0bqwkggfncdfl07d"))))
 +       ("cairo" ,cairo)
 +       ("fontconfig" ,fontconfig)
 +       ("fontforge" ,fontforge)
 +       ("freetype" ,freetype)
 +       ("gd" ,gd)
 +       ("gmp" ,gmp)
 +       ("ghostscript" ,ghostscript)
 +       ("graphite2" ,graphite2)
 +       ("harfbuzz" ,harfbuzz)
 +       ("icu4c" ,icu4c)
 +       ("libpaper" ,libpaper)
 +       ("libpng" ,libpng)
 +       ("libxaw" ,libxaw)
 +       ("libxt" ,libxt)
 +       ("mpfr" ,mpfr)
 +       ("perl" ,perl)
 +       ("pixman" ,pixman)
 +       ("potrace" ,potrace)
 +       ("python" ,python)
 +       ("ruby" ,ruby)
 +       ("tcsh" ,tcsh)
 +       ("teckit" ,teckit)
 +       ("zlib" ,zlib)
 +       ("zziplib" ,zziplib)))
 +    (native-inputs
 +     `(("pkg-config" ,pkg-config)))
 +    (arguments
 +     `(#:modules ((guix build gnu-build-system)
 +                  (guix build utils)
 +                  (ice-9 ftw)
 +                  (srfi srfi-1)
 +                  (srfi srfi-26))
 +       #:out-of-source? #t
 +       #:configure-flags
         '("--disable-static"
           "--disable-native-texlive-build"
 +         "--enable-shared"
 +         "--with-banner-add=/GNU Guix"
           "--with-system-cairo"
           "--with-system-freetype2"
           "--with-system-gd"
           "--with-system-libpng"
           "--with-system-mpfr"
           "--with-system-pixman"
 -         "--with-system-poppler"
           "--with-system-potrace"
           "--with-system-teckit"
 -         "--with-system-xpdf"
           "--with-system-zlib"
           "--with-system-zziplib"
           ;; LuaJIT is not ported to powerpc64le* yet.
           ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
                                                   (%current-system)))
                 '("--disable-luajittex"
 +                 "--disable-luajithbtex"
                   "--disable-mfluajit")
                 '()))
  
                             (string-prefix? "mips64" s)
                             (string-prefix? "powerpc64le" s))))
  
 -      #:phases
 -      (modify-phases %standard-phases
 -        (add-after 'unpack 'configure-ghostscript-executable
 -          ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
 -          ;; and the "gs" ghostscript executable on Unix. It detects Unix by
 -          ;; checking for the existence of the /usr/bin directory. Since
 -          ;; Guix System does not have /usr/bin, it is also detected as Windows.
 -          (lambda* (#:key inputs #:allow-other-keys)
 -            (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
 -              (("gswin32c") "gs"))
 -            (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
 -              (("\"gs\"")
 -               (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
 -            #t))
 -        (add-after 'unpack 'use-code-for-new-poppler
 -          (lambda _
 -            (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
 -                       "texk/web2c/pdftexdir/pdftoepdf.cc")
 -            (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
 -                       "texk/web2c/pdftexdir/pdftosrc.cc")
 -            #t))
 -        (add-after 'unpack 'patch-dvisvgm-build-files
 -          (lambda _
 -            ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
 -            ;; the appropriate linker flags are not added.
 -            (substitute* "texk/dvisvgm/configure"
 -              (("^have_libgs=yes" all)
 -               (string-append all "\nHAVE_LIBGS=1")))
 -            #t))
 -        (add-after 'unpack 'disable-failing-test
 -          (lambda _
 -            ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
 -            ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
 -            (substitute* "texk/web2c/omegafonts/check.test"
 -              (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
 -               "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
 -            #t))
 -        (add-after 'install 'postint
 -          (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
 -            (let* ((out (assoc-ref outputs "out"))
 -                   (share (string-append out "/share"))
 -                   (texlive-extra (assoc-ref inputs "texlive-extra-src"))
 -                   (unpack (assoc-ref %standard-phases 'unpack))
 -                   (patch-source-shebangs
 -                    (assoc-ref %standard-phases 'patch-source-shebangs)))
 -              (substitute* (string-append share "/texmf-dist/web2c/texmf.cnf")
 -                ;; Don't truncate lines.
 -                (("^error_line = .*$") "error_line = 254\n")
 -                (("^half_error_line = .*$") "half_error_line = 238\n")
 -                (("^max_print_line = .*$") "max_print_line = 1000\n"))
 -              ;; Create symbolic links for the latex variants and their
 -              ;; man pages.
 -              (with-directory-excursion (string-append out "/bin/")
 -                (for-each symlink
 -                          '("pdftex" "pdftex"   "xetex"   "luatex")
 -                          '("latex"  "pdflatex" "xelatex" "lualatex")))
 -              (with-directory-excursion (string-append share "/man/man1/")
 -                (symlink "luatex.1" "lualatex.1"))
 -              ;; Unpack texlive-extra and install tlpkg.
 -              (mkdir "texlive-extra")
 -              (with-directory-excursion "texlive-extra"
 -                (apply unpack (list #:source texlive-extra))
 -                (apply patch-source-shebangs (list #:source texlive-extra))
 -                (invoke "mv" "tlpkg" share))
 -              (let ((scripts (string-append share "/texmf-dist/scripts/texlive/")))
 -                (mkdir-p scripts)
 -                (copy-recursively (assoc-ref inputs "texlive-scripts") scripts)
 -                ;; Make sure that fmtutil can find its Perl modules.
 -                (substitute* (string-append scripts "fmtutil.pl")
 -                  (("\\$TEXMFROOT/") (string-append share "/"))))
 -
 -              ;; texlua shebangs are not patched by the patch-source-shebangs
 -              ;; phase because the texlua executable does not exist at that
 -              ;; time.
 -              (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
 -              (with-directory-excursion out
 -                (patch-source-shebangs))))))))
 -   (native-search-paths
 -    (list (search-path-specification
 -           (variable "TEXMF")
 -           (files '("share/texmf-dist"))
 -           (separator #f))
 -          (search-path-specification
 -           (variable "TEXMFCNF")
 -           (files '("share/texmf-dist/web2c"))
 -           (separator #f))))
 -   (synopsis "TeX Live, a package of the TeX typesetting system")
 -   (description
 -    "TeX Live provides a comprehensive TeX document production system.
 +       #:phases
 +       (modify-phases %standard-phases
 +         (add-after 'unpack 'configure-ghostscript-executable
 +           ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
 +           ;; and the "gs" ghostscript executable on Unix. It detects Unix by
 +           ;; checking for the existence of the /usr/bin directory. Since
 +           ;; Guix System does not have /usr/bin, it is also detected as Windows.
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
 +               (("gswin32c") "gs"))
 +             (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
 +               (("\"gs\"")
 +                (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
 +             #t))
 +         (add-after 'unpack 'patch-dvisvgm-build-files
 +           (lambda _
 +             ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
 +             ;; the appropriate linker flags are not added.
 +             (substitute* "texk/dvisvgm/configure"
 +               (("^have_libgs=yes" all)
 +                (string-append all "\nHAVE_LIBGS=1")))
 +             #t))
 +         (add-after 'unpack 'disable-failing-test
 +           (lambda _
 +             ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
 +             ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
 +             (substitute* "texk/web2c/omegafonts/check.test"
 +               (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
 +                "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
 +             #t))
 +         ,@(if (target-ppc32?)
 +             ;; Some mendex tests fail on some architectures.
 +             `((add-after 'unpack 'skip-mendex-tests
 +                 (lambda _
 +                   (substitute* '("texk/mendexk/tests/mendex.test"
 +                                  "texk/upmendex/tests/upmendex.test")
 +                     (("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| exit 1")
 +                      "srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 77")))))
 +             '())
 +         (add-after 'unpack 'unpack-texlive-extra
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (mkdir "texlive-extra")
 +             (with-directory-excursion "texlive-extra"
 +               (apply (assoc-ref %standard-phases 'unpack)
 +                      (list #:source (assoc-ref inputs "texlive-extra-src"))))))
 +         (add-after 'unpack-texlive-extra 'unpack-texlive-scripts
 +           (lambda* (#:key inputs #:allow-other-keys)
 +             (mkdir "texlive-scripts")
 +             (with-directory-excursion "texlive-scripts"
 +               (apply (assoc-ref %standard-phases 'unpack)
 +                      (list #:source (assoc-ref inputs "texlive-scripts"))))))
 +         (add-after 'unpack-texlive-scripts 'patch-scripts
 +           (lambda _
 +             (let* ((scripts (append (find-files "texk/kpathsea" "^mktex")
 +                                     (find-files "texk/texlive/linked_scripts"
 +                                                 "\\.sh$")
 +                                     (find-files "texlive-scripts" "\\.sh$")))
 +                    (commands '("awk" "basename" "cat" "grep" "mkdir" "rm"
 +                                "sed" "sort" "uname"))
 +                    (command-regexp (format #f "\\b(~a)\\b"
 +                                            (string-join commands "|")))
 +                    (iso-8859-1-encoded-scripts
 +                     '("texk/texlive/linked_scripts/texlive-extra/rubibtex.sh"
 +                       "texk/texlive/linked_scripts/texlive-extra/rumakeindex.sh")))
 +
 +               (define (substitute-commands scripts)
 +                 (substitute* scripts
 +                   ((command-regexp dummy command)
 +                    (which command))))
 +
 +               (substitute-commands (lset-difference string= scripts
 +                                                     iso-8859-1-encoded-scripts))
 +
 +               (with-fluids ((%default-port-encoding "ISO-8859-1"))
 +                 (substitute-commands iso-8859-1-encoded-scripts))
 +
 +               #t)))
 +         (add-after 'check 'customize-texmf.cnf
 +           ;; The default texmf.cnf is provided by this package, texlive-bin.
 +           ;; Every variable of interest is set relatively to the GUIX_TEXMF
 +           ;; environment variable defined via a search path specification
 +           ;; further below.  The configuration file is patched after the test
 +           ;; suite has run, as it relies on the default configuration to find
 +           ;; its paths (and the GUIX_TEXMF variable isn't set yet).
 +           (lambda _
 +             ;; The current directory is build/ because of the out-of-tree
 +             ;; build.
 +             (let* ((source    (first (scandir ".." (cut string-suffix?
 +                                                         "source" <>))))
 +                    (texmf.cnf (string-append "../" source
 +                                              "/texk/kpathsea/texmf.cnf")))
 +               (substitute* texmf.cnf
 +                 (("^TEXMFROOT = .*")
 +                  "TEXMFROOT = {$GUIX_TEXMF}/..\n")
 +                 (("^TEXMF = .*")
 +                  "TEXMF = {$GUIX_TEXMF}\n")
 +                 (("^%TEXMFCNF = .*")
 +                  "TEXMFCNF = {$GUIX_TEXMF}/web2c\n")
 +                 ;; Don't truncate lines.
 +                 (("^error_line = .*$") "error_line = 254\n")
 +                 (("^half_error_line = .*$") "half_error_line = 238\n")
 +                 (("^max_print_line = .*$") "max_print_line = 1000\n")))
 +             #t))
 +         (add-after 'install 'post-install
 +           (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
 +             (let* ((out (assoc-ref outputs "out"))
 +                    (patch-source-shebangs (assoc-ref %standard-phases
 +                                                      'patch-source-shebangs))
 +                    (share (string-append out "/share"))
 +                    (scripts (string-append share
 +                                            "/texmf-dist/scripts/texlive"))
 +                    (source (string-append
 +                             "../" (first (scandir ".." (cut string-suffix?
 +                                                             "source" <>)))))
 +                    (tl-extra-root (string-append source "/texlive-extra"))
 +                    (tl-extra-dir (first
 +                                   (scandir tl-extra-root
 +                                            (negate
 +                                             (cut member <> '("." ".."))))))
 +                    (tlpkg-src (string-append tl-extra-root "/" tl-extra-dir
 +                                              "/tlpkg"))
 +                    (config.guess (search-input-file inputs
 +                                                     "/bin/config.guess")))
 +
 +               ;; Create symbolic links for the latex variants and their
 +               ;; man pages.
 +               (with-directory-excursion (string-append out "/bin/")
 +                 (for-each symlink
 +                           '("pdftex" "pdftex"   "xetex"   "luatex")
 +                           '("latex"  "pdflatex" "xelatex" "lualatex")))
 +               (with-directory-excursion (string-append share "/man/man1/")
 +                 (symlink "luatex.1" "lualatex.1"))
 +
 +               ;; Install tlpkg.
 +               (copy-recursively tlpkg-src (string-append share "/tlpkg"))
 +
 +               ;; Install texlive-scripts.
 +               (copy-recursively (string-append
 +                                  source "/texlive-scripts/source/")
 +                                 scripts)
 +
 +               ;; Make sure that fmtutil can find its Perl modules.
 +               (substitute* (string-append scripts "/fmtutil.pl")
 +                 (("\\$TEXMFROOT/")
 +                  (string-append share "/")))
 +
 +               ;; Likewise for updmap.pl.
 +               (substitute* (string-append scripts "/updmap.pl")
 +                 (("\\$TEXMFROOT/tlpkg")
 +                  (string-append share "/tlpkg")))
 +
 +               ;; Likewise for the tlmgr.
 +               (substitute* (string-append scripts "/tlmgr.pl")
 +                 ((".*\\$::installerdir = \\$Master.*" all)
 +                  (format #f "  $Master = ~s;~%~a" share all)))
 +
 +               ;; Install the config.guess script, required by tlmgr.
 +               (with-directory-excursion share
 +                 (mkdir-p "tlpkg/installer/")
 +                 (symlink config.guess "tlpkg/installer/config.guess"))
 +
 +               ;; texlua shebangs are not patched by the patch-source-shebangs
 +               ;; phase because the texlua executable does not exist at that
 +               ;; time.
 +               (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
 +               (with-directory-excursion out
 +                 (patch-source-shebangs))))))))
 +    (native-search-paths
 +     (list (search-path-specification
 +            (variable "GUIX_TEXMF")
 +            (files '("share/texmf-dist")))))
 +    (synopsis "TeX Live, a package of the TeX typesetting system")
 +    (description
 +     "TeX Live provides a comprehensive TeX document production system.
  It includes all the major TeX-related programs, macro packages, and fonts
  that are free software, including support for many languages around the
  world.
  
  This package contains the binaries.")
 -   (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
 -   (home-page "https://www.tug.org/texlive/")))
 +    (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
 +    (home-page "https://www.tug.org/texlive/")))
  
  (define-public texlive-libkpathsea
    (package/inherit texlive-bin
      (description "kpathsea is a library, whose purpose is to return a filename
  from a list of user-specified directories similar to how shells look up
  executables.  It is maintained as a part of TeX Live.")))
 +
 +(define-syntax-rule (define-deprecated-package old-name name)
 +  "Define OLD-NAME as a deprecated package alias for NAME."
 +  (define-deprecated/public old-name name
 +    (deprecated-package (symbol->string 'old-name) name)))
 +
  \f
  (define texlive-docstrip
    (package
                "texlive-docstrip"
                (list "/tex/latex/base/docstrip.tex")
                (base32
 -               "1f9sx1lp7v34zwm186msf03q2h28rrg0lh65z59zc0cvqffs6dvb")
 +               "1pxbqbia0727vg01xv8451szm55z2w8sb0vv3kf4iqx5ibb6m0d2")
                #:trivial? #t))
      (home-page "https://www.ctan.org/texlive")
      (synopsis "Utility to strip documentation from TeX files.")
@@@ -598,7 -515,7 +598,7 @@@ documentation from TeX files.  It is pa
                (list "/tex/generic/unicode-data/"
                      "/doc/generic/unicode-data/")
                (base32
 -               "0zy4v9y667cka5fi4dnc6x500907812y7pcaf63s5qxi8l7khxxy")
 +               "1d41zvjsig7sqf2j2m89dnbv3gicpb16r04b4ikps4gabhbky83k")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/unicode-data")
      (synopsis "Unicode data and loaders for TeX")
@@@ -613,7 -530,8 +613,7 @@@ set up and one for initializing XeTeX c
  out to date by @code{unicode-letters.tex}. ")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-generic-unicode-data
 -  (deprecated-package "texlive-generic-unicode-data" texlive-unicode-data))
 +(define-deprecated-package texlive-generic-unicode-data texlive-unicode-data)
  
  (define-public texlive-hyphen-base
    (package
                      "/tex/generic/hyphen/hypht1.tex"
                      "/tex/generic/hyphen/zerohyph.tex")
                (base32
 -               "0f19nml4hdx9lh7accqdk1b9ismwfm2523l5zsc4kb4arysgcakz")
 +               "1sagn9aybs34m1s6m3zwya5g5kbiwfnw8ifcgxssygmzzs88dgjp")
                #:trivial? #t))
      (home-page "https://tug.org/texlive/")
      (synopsis "Core hyphenation support files")
@@@ -651,7 -569,7 +651,7 @@@ default versions of those), etc."
                      "/fonts/enc/dvips/base/"
                      "/tex/generic/dvips/")
                (base32
 -               "1qr7h0ahycmz5wmpv54glfss9jqdmmyymj6kim626d1c8v9bmg86")
 +               "0rns1hpjy4fmsskmkwx197j8qbgdmyj0j9214sq9vhpa6nv7czm3")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/dvips")
      (synopsis "DVI to PostScript drivers")
@@@ -676,24 -594,24 +676,24 @@@ allow existing format source files to b
  to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
      (license license:public-domain)))
  
 -(define-public texlive-generic-tex-ini-files
 -  (deprecated-package "texlive-generic-tex-ini-files" texlive-tex-ini-files))
 +(define-deprecated-package texlive-generic-tex-ini-files texlive-tex-ini-files)
  
 -(define-public texlive-metafont-base
 +(define-public texlive-metafont
    (package
 -    (name "texlive-metafont-base")
 +    (name "texlive-metafont")
      (version (number->string %texlive-revision))
      (source (origin
 -              (method svn-fetch)
 -              (uri (svn-reference
 +              (method svn-multi-fetch)
 +              (uri (svn-multi-reference
                      (url (string-append "svn://www.tug.org/texlive/tags/"
 -                                        %texlive-tag "/Master/texmf-dist/"
 -                                        "/metafont"))
 +                                        %texlive-tag "/Master/texmf-dist"))
 +                    (locations '("/metafont/"
 +                                 "/fonts/source/public/modes/"))
                      (revision %texlive-revision)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
 +                "17y72xmz5a36vdsq7pfrwj0j4c7llrm9j5kcq349cpaas7r32lmb"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f ; no test target
           (delete 'configure)
           (replace 'build
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((cwd (getcwd)))
 +             (let* ((cwd (getcwd))
 +                    (mf (string-append cwd "/metafont"))
 +                    (modes (string-append cwd "/fonts/source/public/modes")))
                 (setenv "MFINPUTS"
 -                       (string-append cwd "/base:"
 -                                      cwd "/misc:"
 -                                      cwd "/roex:"
 -                                      cwd "/feynmf:"
 -                                      cwd "/mfpic:"
 -                                      cwd "/config")))
 +                       (string-append modes ":"
 +                                      mf "/base:"
 +                                      mf "/misc:"
 +                                      mf "/roex:"
 +                                      mf "/feynmf:"
 +                                      mf "/mfpic:"
 +                                      mf "/config")))
               (mkdir "build")
               (with-directory-excursion "build"
                 (invoke "inimf" "mf.mf"))))
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out  (assoc-ref outputs "out"))
                      (base (string-append out "/share/texmf-dist/web2c"))
 -                    (mf   (string-append out "/share/texmf-dist/metafont/base")))
 +                    (mf   (string-append out "/share/texmf-dist/metafont/")))
                 (mkdir-p base)
                 (mkdir-p mf)
                 (install-file "build/mf.base" base)
 -               (copy-recursively "base" mf)
 -               #t))))))
 +               (with-directory-excursion "metafont"
 +                 (for-each (lambda (where)
 +                             (copy-recursively where (string-append mf where)))
 +                           (list "base" "misc" "config")))))))))
      (native-inputs
       `(("texlive-bin" ,texlive-bin)))
      (home-page "https://www.ctan.org/pkg/metafont")
  build fonts using the Metafont system.")
      (license license:knuth)))
  
 +(define-deprecated-package texlive-metafont-base texlive-metafont)
 +
  (define-public texlive-fontinst
    (let ((template (simple-texlive-package
                     "texlive-fontinst"
                           "/tex/fontinst/latinetx/"
                           "/tex/fontinst/latinmtx/"
                           "/tex/fontinst/mathmtx/"
 -                         "/tex/fontinst/smblmtx/"
 -
 -                         "/scripts/texlive/fontinst.sh")
 +                         "/tex/fontinst/smblmtx/")
                     (base32
 -                    "0lprwib7n2ygfxvrw675vhif7ghyip2x6k70kqs9syp8lqxiizf8")
 +                    "195jsijrpv828pqy99gm13j31nsc8bsa58zlbln2r0h5j9l44b5g")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -826,7 -739,8 +826,7 @@@ metrics (and related information) for 
  typesetting in these fonts.")
        (license license:lppl1.1+))))
  
 -(define-public texlive-tex-fontinst-base
 -  (deprecated-package "texlive-tex-fontinst-base" texlive-fontinst))
 +(define-deprecated-package texlive-tex-fontinst-base texlive-fontinst)
  
  (define-public texlive-fontname
    (package
                (list "/doc/fonts/fontname/fontname.texi"
                      "/fonts/map/fontname/")
                (base32
 -               "0h5im5rnhycrrkd6z10f17m2caa8lv594wf482b68qjmnxfrqnxj")
 +               "009qvjpw48lajp0gxpvdk10n5qw3q41cpq05ycns67mxwkcaywq6")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/fontname")
      (synopsis "Scheme for naming fonts in TeX")
@@@ -852,7 -766,7 +852,7 @@@ documents."
                           "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
                           "/doc/fonts/cm/")
                     (base32
 -                    "09mvl94qrwlb9b4pkigi151l256v3djhwl4m5lgvk6yhn5y75zrp")
 +                    "1ky4gvcn8qn3d61bvb39512b8r92igv6il7vh02hw04223yj6q8i")
                     #:trivial? #t)))
      (package
        (inherit template)
            `(modify-phases ,phases
               (replace 'build
                 (lambda* (#:key inputs #:allow-other-keys)
 -                 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 +                 (let ((mf (assoc-ref inputs "texlive-metafont")))
                     ;; Tell mf where to find mf.base
                     (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                     ;; Tell mf where to look for source files
                     #t)))))))
        (native-inputs
         `(("texlive-bin" ,texlive-bin)
 -         ("texlive-metafont-base" ,texlive-metafont-base)))
 +         ("texlive-metafont" ,texlive-metafont)))
        (home-page "https://www.ctan.org/pkg/cm")
        (synopsis "Computer Modern fonts for TeX")
        (description "This package provides the Computer Modern fonts by Donald
@@@ -919,7 -833,8 +919,7 @@@ display, and mathematical fonts in a ra
  8A.")
        (license license:knuth))))
  
 -(define-public texlive-fonts-cm
 -  (deprecated-package "texlive-fonts-cm" texlive-cm))
 +(define-deprecated-package texlive-fonts-cm texlive-cm)
  
  (define-public texlive-cm-super
    (let ((template (simple-texlive-package
@@@ -953,7 -868,8 +953,7 @@@ originals."
        ;; With font exception
        (license license:gpl2+))))
  
 -(define-public texlive-fonts-cm-super
 -  (deprecated-package "texlive-fonts-cm-super" texlive-cm-super))
 +(define-deprecated-package texlive-fonts-cm-super texlive-cm-super)
  
  (define-public texlive-courier
    (package
                      "/tex4ht/ht-fonts/alias/adobe/courier/"
                      "/tex4ht/ht-fonts/unicode/adobe/courier/")
                (base32
 -               "1hfgisdi7mjf5156ax6d6zsbiq42zkmp1x5lg17rgzf61k6d6z1y")
 +               "05lglavi073glj26k9966351hka5ac22g4vim61dkfy001vz4i7r")
                #:trivial? #t))
      (home-page "https://ctan.org/pkg/urw-base35")
      (synopsis "URW Base 35 font pack for LaTeX")
@@@ -982,45 -898,6 +982,45 @@@ font from Adobe's basic set."
      ;; No license version specified.
      (license license:gpl3+)))
  
 +(define-public texlive-tex-gyre
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-tex-gyre"
 +              '("/doc/fonts/tex-gyre/GUST-FONT-LICENSE.txt"
 +                "/fonts/afm/public/tex-gyre/"
 +                "/fonts/enc/dvips/tex-gyre/"
 +                "/fonts/map/dvips/tex-gyre/"
 +                "/fonts/opentype/public/tex-gyre/"
 +                "/fonts/tfm/public/tex-gyre/"
 +                "/fonts/type1/public/tex-gyre/"
 +                "/tex/latex/tex-gyre/")
 +              (base32
 +               "1ldnlmclghm3gnyv02r8a6cqybygz2ifq07mhykhf43h1pw3aq7k")
 +              #:trivial? #t))
 +    (home-page "https://ctan.org/pkg/tex-gyre")
 +    (synopsis "TeX fonts extending URW fonts")
 +    (description
 +     "The TeX-GYRE bundle consist of multiple font families:
 +@itemize @bullet
 +@item Adventor, based on the URW Gothic L family of fonts;
 +@item Bonum, based on the URW Bookman L family;
 +@item Chorus, based on URW Chancery L Medium Italic;
 +@item Cursor, based on URW Nimbus Mono L;
 +@item Heros, based on URW Nimbus Sans L;
 +@item Pagella, based on URW Palladio L;
 +@item Schola, based on the URW Century Schoolbook L family;
 +@item Termes, based on the URW Nimbus Roman No9 L family of fonts.
 +@end itemize
 +
 +The constituent standard faces of each family have been greatly extended
 +(though Chorus omits Greek support and has no small-caps family).  Each
 +family is available in Adobe Type 1 and Open Type formats, and LaTeX
 +support (for use with a variety of encodings) is provided.")
 +    ;; The GUST font license (GFL) is legally identical to the LaTeX Project
 +    ;; Public License (LPPL), version 1.3c or later, but comes with an
 +    ;; additional but not legally binding clause.
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-lm
    (package
      (inherit (simple-texlive-package
                      "/fonts/type1/public/lm/"
                      "/tex/latex/lm/")
                (base32
 -               "0i1hwr8rp0jqyvs4qyplrirscd4w7lsgwsncyv3yzy80bsa56jq5")
 +               "0yyk0dr4yms82mwy4dc03zf5igyhgcb65icdah042rk23rlpxygv")
                #:trivial? #t))
      (home-page "http://www.gust.org.pl/projects/e-foundry/latin-modern/")
      (synopsis "Latin Modern family of fonts")
@@@ -1047,70 -924,76 +1047,70 @@@ Computers & Typesetting series."
      ;; additional but not legally binding clause.
      (license license:lppl1.3c+)))
  
 -(define-public texlive-fonts-lm
 -  (deprecated-package "texlive-fonts-lm" texlive-lm))
 +(define-deprecated-package texlive-fonts-lm texlive-lm)
  
 -(define-public texlive-fonts-knuth-lib
 -  (package
 -    (name "texlive-fonts-knuth-lib")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (svn-reference
 -                    (url (string-append "svn://www.tug.org/texlive/tags/"
 -                                        %texlive-tag "/Master/texmf-dist/"
 -                                        "/fonts/source/public/knuth-lib"))
 -                    (revision %texlive-revision)))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
 -    (build-system gnu-build-system)
 -    (arguments
 -     `(#:modules ((guix build gnu-build-system)
 -                  (guix build utils)
 -                  (srfi srfi-26))
 -       #:tests? #f ; no tests
 -       #:phases
 -       (modify-phases %standard-phases
 -         (delete 'configure)
 -         (replace 'build
 -           (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 -               ;; Tell mf where to find mf.base
 -               (setenv "MFBASES"
 -                       (string-append mf "/share/texmf-dist/web2c"))
 -               ;; Tell mf where to look for source files
 -               (setenv "MFINPUTS"
 -                       (string-append (getcwd) ":"
 -                                      mf "/share/texmf-dist/metafont/base")))
 -             (mkdir "build")
 -             (for-each (lambda (font)
 -                         (format #t "building font ~a\n" font)
 -                         (invoke "mf" "-progname=mf"
 -                                 "-output-directory=build"
 -                                 (string-append "\\"
 -                                                "mode:=ljfour; "
 -                                                "mag:=1; "
 -                                                "batchmode; "
 -                                                "input " font)))
 -                       (find-files "." "(manfnt|logo.+)\\.mf$"))
 -             #t))
 -         (replace 'install
 -           (lambda* (#:key outputs #:allow-other-keys)
 -             (let* ((out (assoc-ref outputs "out"))
 -                    (tfm (string-append
 -                          out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
 -                    (mf  (string-append
 -                          out "/share/texmf-dist/fonts/source/public/knuth-lib")))
 -               (for-each (cut install-file <> tfm)
 -                         (find-files "build" "\\.*"))
 -               (for-each (cut install-file <> mf)
 -                         (find-files "." "\\.mf"))
 -               #t))))))
 -    (native-inputs
 -     `(("texlive-bin" ,texlive-bin)
 -       ("texlive-metafont-base" ,texlive-metafont-base)))
 -    (home-page "https://www.ctan.org/pkg/knuth-lib")
 -    (synopsis "Small library of METAFONT sources")
 -    (description "This is a collection of core TeX and METAFONT macro files
 +(define-public texlive-knuth-lib
 +  (let ((template (simple-texlive-package
 +                   "texlive-knuth-lib"
 +                   (list "/fonts/source/public/knuth-lib/"
 +                         "/tex/generic/knuth-lib/"
 +                         "/tex/plain/knuth-lib/")
 +                   (base32
 +                    "1cxyqqprp8sj2j4zp9l0wry8cq2awpz3a8i5alzpc4ndg7a6pgdf")
 +                   #:trivial? #t)))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:modules _ '())
 +          '((guix build gnu-build-system)
 +            (guix build utils)
 +            (srfi srfi-26)))
 +         ((#:phases phases '())
 +          `(modify-phases ,phases
 +             (replace 'build
 +               (lambda* (#:key inputs #:allow-other-keys)
 +                 (with-directory-excursion "fonts/source/public/knuth-lib"
 +                   (let ((mf (assoc-ref inputs "texlive-metafont")))
 +                     ;; Tell mf where to find mf.base
 +                     (setenv "MFBASES"
 +                             (string-append mf "/share/texmf-dist/web2c"))
 +                     ;; Tell mf where to look for source files
 +                     (setenv "MFINPUTS"
 +                             (string-append (getcwd) ":"
 +                                            mf "/share/texmf-dist/metafont/base")))
 +                   (mkdir "build")
 +                   (for-each (lambda (font)
 +                               (format #t "building font ~a\n" font)
 +                               (invoke "mf" "-progname=mf"
 +                                       "-output-directory=build"
 +                                       (string-append "\\"
 +                                                      "mode:=ljfour; "
 +                                                      "mag:=1; "
 +                                                      "batchmode; "
 +                                                      "input " font)))
 +                             (find-files "." "(manfnt|logo.+)\\.mf$")))
 +                 #t))
 +             (add-after 'install 'install-fonts
 +               (lambda* (#:key outputs #:allow-other-keys)
 +                 (with-directory-excursion "fonts/source/public/knuth-lib"
 +                   (let* ((out (assoc-ref outputs "out"))
 +                          (tfm (string-append
 +                                out "/share/texmf-dist/fonts/tfm/public/knuth-lib")))
 +                     (for-each (cut install-file <> tfm)
 +                               (find-files "build" "\\.tfm"))
 +                     #t))))))))
 +      (native-inputs
 +       `(("texlive-bin" ,texlive-bin)
 +         ("texlive-metafont" ,texlive-metafont)))
 +      (home-page "https://www.ctan.org/pkg/knuth-lib")
 +      (synopsis "Small library of METAFONT sources")
 +      (description "This is a collection of core TeX and METAFONT macro files
  from Donald Knuth, including the plain format, plain base, and the MF logo
  fonts.")
 -    (license license:knuth)))
 +      (license license:knuth))))
 +
 +(define-deprecated-package texlive-fonts-knuth-lib texlive-knuth-lib)
  
  (define-public texlive-fonts-latex
    (package
           (delete 'configure)
           (replace 'build
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 +             (let ((mf (assoc-ref inputs "texlive-metafont")))
                 ;; Tell mf where to find mf.base
                 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                 ;; Tell mf where to look for source files
                 #t))))))
      (native-inputs
       `(("texlive-bin" ,texlive-bin)
 -       ("texlive-metafont-base" ,texlive-metafont-base)
 +       ("texlive-metafont" ,texlive-metafont)
         ("texlive-cm" ,texlive-cm)))
      (home-page "https://www.ctan.org/pkg/latex-fonts")
      (synopsis "Collection of fonts used in LaTeX distributions")
@@@ -1188,80 -1071,27 +1188,80 @@@ class), line and circle fonts (for use 
  symbol fonts.")
      (license license:lppl1.2+)))
  
 -(define-public texlive-latex-mflogo
 -  (package
 -    (name "texlive-latex-mflogo")
 -    (version (number->string %texlive-revision))
 -    (source
 -     (origin
 -       (method svn-fetch)
 -       (uri (texlive-ref "latex" "mflogo"))
 -       (file-name (string-append name "-" version "-checkout"))
 -       (sha256
 -        (base32
 -         "15i2ib6nvhf31g1b92c6njf7n0g29znlq7hbfp9ii7qabhcwwvrj"))))
 -    (build-system texlive-build-system)
 -    (arguments '(#:tex-directory "latex/mflogo"))
 -    (home-page "http://www.ctan.org/pkg/mflogo")
 -    (synopsis "LaTeX support for Metafont logo fonts")
 -    (description
 -     "This package provides LaTeX and font definition files to access the
 +(define-public texlive-mflogo
 +  (let ((template (simple-texlive-package
 +                   "texlive-mflogo"
 +                   (list "/doc/latex/mflogo/"
 +                         "/source/latex/mflogo/"
 +                         "/fonts/source/public/mflogo/logosl8.mf")
 +                   (base32
 +                    "1vb4mg7fh4k54g7nqwiw3qm4iir8whpfnspis76l4sddzar1amh7"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:modules _ '())
 +          '((guix build texlive-build-system)
 +            (guix build utils)
 +            (srfi srfi-1)
 +            (srfi srfi-26)))
 +         ((#:tex-directory _ #t)
 +          "latex/mflogo")
 +         ((#:phases phases '())
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _
 +                 (chdir "source/latex/mflogo") #t))
 +             (add-after 'build 'build-font-metrics
 +               (lambda* (#:key inputs #:allow-other-keys)
 +                 (let ((root "../../..")
 +                       (mf (assoc-ref inputs "texlive-metafont"))
 +                       (kl (assoc-ref inputs "texlive-knuth-lib")))
 +                   ;; Tell mf where to find mf.base
 +                   (setenv "MFBASES"
 +                           (string-append mf "/share/texmf-dist/web2c"))
 +                   ;; Tell mf where to look for source files
 +                   (setenv "MFINPUTS"
 +                           (string-append root ":"
 +                                          mf "/share/texmf-dist/metafont/base:"
 +                                          kl "/share/texmf-dist/fonts/source/public/knuth-lib:"
 +                                          root "/fonts/source/public/mflogo/"))
 +                   (for-each (lambda (font)
 +                               (format #t "building font ~a\n" font)
 +                               (invoke "mf" "-progname=mf"
 +                                       "-output-directory=build"
 +                                       (string-append "\\"
 +                                                      "mode:=ljfour; "
 +                                                      "mag:=1; "
 +                                                      "scrollmode; "
 +                                                      "input " (basename font))))
 +                             (find-files (string-append root
 +                                                        "/fonts/source/public/mflogo/")
 +                                         "\\.mf$")))
 +                 #t))
 +             (add-before 'install 'install-fonts
 +               (lambda* (#:key outputs #:allow-other-keys)
 +                 (let* ((out (assoc-ref outputs "out"))
 +                        (tfm (string-append
 +                              out "/share/texmf-dist/fonts/tfm/public/mflogo")))
 +                   (for-each (lambda (file)
 +                               (install-file file tfm)
 +                               (delete-file file))
 +                             (find-files "build" "\\.tfm"))
 +                   #t)))))))
 +      (native-inputs
 +       `(("texlive-bin" ,texlive-bin)
 +         ("texlive-metafont" ,texlive-metafont)
 +         ("texlive-knuth-lib" ,texlive-knuth-lib)))
 +      (home-page "http://www.ctan.org/pkg/mflogo")
 +      (synopsis "LaTeX support for Metafont logo fonts")
 +      (description
 +       "This package provides LaTeX and font definition files to access the
  Knuthian mflogo fonts described in The Metafontbook and to typeset Metafont
  logos in LaTeX documents.")
 -    (license license:lppl)))
 +      (license license:lppl))))
 +
 +(define-deprecated-package texlive-latex-mflogo texlive-mflogo)
  
  (define-public texlive-mflogo-font
    (package
@@@ -1284,7 -1114,8 +1284,7 @@@ source; they have since been autotrace
  Taco Hoekwater.")
      (license license:knuth)))
  
 -(define-public texlive-fonts-mflogo-font
 -  (deprecated-package "texlive-fonts-mflogo-font" texlive-mflogo-font))
 +(define-deprecated-package texlive-fonts-mflogo-font texlive-mflogo-font)
  
  (define-public texlive-amsfonts
    (let ((template (simple-texlive-package
            `(modify-phases ,phases
               (add-before 'build 'build-fonts
                 (lambda* (#:key inputs #:allow-other-keys)
 -                 (let ((mf  (assoc-ref inputs "texlive-union"))
 -                       (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
 -                   ;; Make METAFONT reproducible
 -                   (setenv "SOURCE_DATE_EPOCH" "1")
 -                   ;; Tell mf where to find mf.base
 -                   (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
 -                   ;; Tell mf where to look for source files
 -                   (setenv "MFINPUTS"
 -                           (string-append src ":"
 -                                          src "/cmextra:"
 -                                          src "/cyrillic:"
 -                                          src "/dummy:"
 -                                          src "/symbols:"
 -                                          mf "/share/texmf-dist/metafont/base:"
 -                                          (assoc-ref inputs "texlive-cm")
 -                                          "/share/texmf-dist/fonts/source/public/cm")))
 -                 (let ((build (string-append (getcwd) "/build-fonts")))
 -                   (mkdir-p build)
 -                   (with-directory-excursion "fonts/source/public/amsfonts"
 -                     (for-each (lambda (font)
 -                                 (format #t "building font ~a\n" (basename font ".mf"))
 -                                 (with-directory-excursion (dirname font)
 -                                   (invoke "mf" "-progname=mf"
 -                                           (string-append "-output-directory=" build)
 -                                           (string-append "\\"
 -                                                          "mode:=ljfour; "
 -                                                          "mag:=1; "
 -                                                          "nonstopmode; "
 -                                                          "input "
 -                                                          (getcwd) "/"
 -                                                          (basename font ".mf")))))
 -                               (find-files "." "[0-9]+\\.mf$"))))
 -
 -                 ;; There are no metafont sources for the Euler fonts, so we
 -                 ;; convert the afm files instead.
 -                 (let ((build (string-append (getcwd) "/build-fonts/euler")))
 -                   (mkdir build)
 -                   (with-directory-excursion "fonts/afm/public/amsfonts/"
 -                     (for-each (lambda (font)
 -                                 (format #t "converting afm font ~a\n" (basename font ".afm"))
 -                                 (invoke "afm2tfm" font
 -                                         (string-append build "/"
 -                                                        (basename font ".tfm"))))
 -                               (find-files "." "\\.afm$")))
 -
 -                   ;; Frustratingly, not all fonts can be created this way.  To
 -                   ;; generate eufm8.tfm, for example, we first scale down
 -                   ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
 -                   ;; the pl file.
 -                   (setenv "TEXINPUTS"
 -                           (string-append build "//:"
 -                                          (getcwd) "/fonts/afm/public/amsfonts//:"
 -                                          (getcwd) "/source/latex/amsfonts//:"
 -                                          (assoc-ref inputs "texlive-union") "//"))
 -                   (with-directory-excursion build
 -                     (for-each (match-lambda
 -                                 (((target-base target-size)
 -                                   (source-base source-size))
 -                                  (let ((factor (number->string
 -                                                 (truncate/ (* 1000 target-size)
 -                                                            source-size))))
 -                                    (invoke "tex"
 -                                            "-interaction=scrollmode"
 -                                            (string-append "\\input fontinst.sty "
 -                                                           "\\transformfont{" target-base "}"
 -                                                           "{\\scalefont{" factor "}"
 -                                                           "{\\fromafm{" source-base "}}} "
 -                                                           "\\bye")))
 -                                  (invoke "pltotf"
 -                                          (string-append target-base ".pl")
 -                                          (string-append target-base ".tfm"))
 -                                  (delete-file (string-append target-base ".pl"))))
 -
 -                               '((("eufm8" 8) ("eufm10" 10))
 +                 ;; Allow self fonts sources and other resources to be
 +                 ;; discovered.
 +                 (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF")
 +                                                     ":" (getcwd)))
  
 -                                 (("eufb6" 6) ("eufb7" 7))
 -                                 (("eufb8" 8) ("eufb10" 10))
 -                                 (("eufb9" 9) ("eufb10" 10))
 -
 -                                 (("eufm6" 6) ("eufb7" 7))
 -                                 (("eufm9" 9) ("eufb10" 10))
 -
 -                                 (("eurb6" 6) ("eurb7" 7))
 -                                 (("eurb8" 8) ("eurb10" 10))
 -                                 (("eurb9" 9) ("eurb10" 10))
 -
 -                                 (("eurm6" 6) ("eurm7" 7))
 -                                 (("eurm8" 8) ("eurm10" 10))
 -                                 (("eurm9" 9) ("eurm10" 10))))))
 -                 #t))
 -             (add-after 'install 'install-generated-fonts
 -               (lambda* (#:key inputs outputs #:allow-other-keys)
 -                 (copy-recursively "build-fonts"
 -                                   (string-append
 -                                    (assoc-ref outputs "out")
 -                                    "/share/texmf-dist/fonts/tfm/public/amsfonts"))
 -                 #t))))))
 -      (native-inputs
 -       `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
 -                                                texlive-cm
 -                                                texlive-metafont-base)))))
 -      (home-page "https://www.ctan.org/pkg/amsfonts")
 -      (synopsis "TeX fonts from the American Mathematical Society")
 -      (description
 -       "This package provides an extended set of fonts for use in mathematics,
 -including: extra mathematical symbols; blackboard bold letters (uppercase
 -only); fraktur letters; subscript sizes of bold math italic and bold Greek
 -letters; subscript sizes of large symbols such as sum and product; added sizes
 -of the Computer Modern small caps font; cyrillic fonts (from the University of
 -Washington); Euler mathematical fonts.  All fonts are provided as Adobe Type 1
 -files, and all except the Euler fonts are provided as Metafont source.  The
 -distribution also includes the canonical Type 1 versions of the Computer
 -Modern family of fonts.  The Euler fonts are supported by separate packages;
 -details can be found in the documentation.")
 -      (license license:silofl1.1))))
 -
 -;; XXX: we can only change texlive-amsfonts on the core-updates branch.  This
 -;; patched version generates only tfm files for fonts provided by the source
 -;; files of this package, not variants of the fonts provided by texlive-cm.
 -(define-public texlive-amsfonts/patched
 -  (let ((template (simple-texlive-package
 -                   "texlive-amsfonts"
 -                   (list "/source/latex/amsfonts/"
 -                         "/fonts/source/public/amsfonts/"
 -                         "/fonts/type1/public/amsfonts/"
 -                         "/fonts/afm/public/amsfonts/"
 -                         "/fonts/map/dvips/amsfonts/"
 -                         "/tex/plain/amsfonts/"
 -                         "/doc/fonts/amsfonts/")
 -                   (base32
 -                    "15q70nkjf8wqzbd5ivcdx3i2sdgqxjb38q0qn9a2qw9i0qcnx6zw"))))
 -    (package
 -      (inherit template)
 -      (arguments
 -       (substitute-keyword-arguments (package-arguments template)
 -         ((#:build-targets _ #t)
 -          '(list "amsfonts.ins"))
 -         ((#:tex-directory _ #t)
 -          "latex/amsfonts")
 -         ((#:modules modules '())
 -          `((guix build texlive-build-system)
 -            (guix build utils)
 -            (ice-9 match)
 -            (srfi srfi-1)
 -            (srfi srfi-26)))
 -         ((#:phases phases)
 -          `(modify-phases ,phases
 -             (add-before 'build 'build-fonts
 -               (lambda* (#:key inputs #:allow-other-keys)
 -                 (let ((mf  (assoc-ref inputs "texlive-union"))
 -                       (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
 -                   ;; Make METAFONT reproducible
 -                   (setenv "SOURCE_DATE_EPOCH" "1")
 -                   ;; Tell mf where to find mf.base
 -                   (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
 -                   ;; Tell mf where to look for source files
 -                   (setenv "MFINPUTS"
 -                           (string-append src ":"
 -                                          src "/cmextra:"
 -                                          src "/cyrillic:"
 -                                          src "/dummy:"
 -                                          src "/symbols:"
 -                                          mf "/share/texmf-dist/metafont/base:"
 -                                          (assoc-ref inputs "texlive-cm")
 -                                          "/share/texmf-dist/fonts/source/public/cm")))
                   (let ((build (string-append (getcwd) "/build-fonts")))
                     (mkdir-p build)
                     (with-directory-excursion "fonts/source/public/amsfonts"
                   ;; convert the afm files instead.
                   (let ((build (string-append (getcwd) "/build-fonts/euler")))
                     (mkdir build)
 -                   (with-directory-excursion "fonts/afm/public/amsfonts/"
 +                   (with-directory-excursion "fonts/afm/public/amsfonts/euler"
                       (for-each (lambda (font)
                                   (format #t "converting afm font ~a\n" (basename font ".afm"))
                                   (invoke "afm2tfm" font
                     ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
                     ;; the pl file.
                     (setenv "TEXINPUTS"
 -                           (string-append build "//:"
 +                           (string-append ":" build "//:"
                                            (getcwd) "/fonts/afm/public/amsfonts//:"
 -                                          (getcwd) "/source/latex/amsfonts//:"
 -                                          (assoc-ref inputs "texlive-union") "//"))
 +                                          (getcwd) "/source/latex/amsfonts//:"))
                     (with-directory-excursion build
                       (for-each (match-lambda
                                   (((target-base target-size)
  
                                   (("eurm6" 6) ("eurm7" 7))
                                   (("eurm8" 8) ("eurm10" 10))
 -                                 (("eurm9" 9) ("eurm10" 10))))))
 -                 #t))
 +                                 (("eurm9" 9) ("eurm10" 10))))))))
               (add-after 'install 'install-generated-fonts
                 (lambda* (#:key inputs outputs #:allow-other-keys)
                   (copy-recursively "build-fonts"
                                     (string-append
                                      (assoc-ref outputs "out")
 -                                    "/share/texmf-dist/fonts/tfm/public/amsfonts"))
 -                 #t))))))
 +                                    "/share/texmf-dist/fonts/tfm/public/amsfonts"))))))))
        (native-inputs
 -       `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
 -                                                texlive-cm
 -                                                texlive-metafont-base)))))
 +       `(("texlive-updmap.cfg" ,(texlive-updmap.cfg
 +                                 (list texlive-fontinst)))))
        (home-page "https://www.ctan.org/pkg/amsfonts")
        (synopsis "TeX fonts from the American Mathematical Society")
        (description
@@@ -1418,9 -1413,11 +1418,9 @@@ Modern family of fonts.  The Euler font
  details can be found in the documentation.")
        (license license:silofl1.1))))
  
 -(define-public texlive-fonts-amsfonts
 -  (deprecated-package "texlive-fonts-amsfonts" texlive-amsfonts))
 +(define-deprecated-package texlive-fonts-amsfonts texlive-amsfonts)
  
 -(define-public texlive-latex-amsfonts
 -  (deprecated-package "texlive-latex-amsfonts" texlive-amsfonts))
 +(define-deprecated-package texlive-latex-amsfonts texlive-amsfonts)
  
  (define-public texlive-mkpattern
    (package
@@@ -1464,7 -1461,7 +1464,7 @@@ output encodings, and features generati
               ;; Build tfm font.
               (replace 'build
                 (lambda* (#:key inputs #:allow-other-keys)
 -                 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 +                 (let ((mf (assoc-ref inputs "texlive-metafont")))
                     ;; Tell mf where to find mf.base
                     (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                     ;; Tell mf where to look for source files
                   #t))))))
        (native-inputs
         `(("texlive-bin" ,texlive-bin)
 -         ("texlive-metafont-base" ,texlive-metafont-base)
 +         ("texlive-metafont" ,texlive-metafont)
           ("texlive-cm" ,texlive-cm)))
        (home-page "https://www.ctan.org/pkg/etex")
        (synopsis "Extended version of TeX")
@@@ -1508,7 -1505,7 +1508,7 @@@ incorporates the e-TeX extensions."
                "texlive-tex-plain"
                (list "/tex/plain/")
                (base32
 -               "1m4qpaszwfv7j8a85rlwl7rs4iv5nlj67c1vvn6ysly72h9gjydb")
 +               "0gwygkm8i2jmpf7bfg6fb6824rl7fq4a2s0wni73v0fz6s4chr1n")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/plain")
      (synopsis "Plain TeX format and supporting files")
@@@ -1615,9 -1612,11 +1615,9 @@@ language."
    (package
      (inherit (texlive-hyphen-package
                "texlive-hyphen-bulgarian" "bg"
 -              (list "/doc/generic/hyph-utf8/bg/azbukaExtended.pdf"
 -                    "/doc/generic/hyph-utf8/bg/azbukaExtended.tex"
 -                    "/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
 +              '("/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
                (base32
 -               "0ngrgw2rmipxss76rgfk62x9nnsgwmaxxna2jqxxhybai3q39mx5")))
 +               "0m254y71j3qrb71klvfalfmic3kjy31l85b9cgpdm5yznlsq3i8d")))
      (synopsis "Hyphenation patterns for Bulgarian")
      (description "The package provides hyphenation patterns for the Bulgarian
  language in T2A and UTF-8 encodings.")
@@@ -1641,10 -1640,9 +1641,10 @@@ T1/EC and UTF-8 encodings."
    (package
      (inherit (texlive-hyphen-package
                "texlive-hyphen-chinese" "zh-latn-pinyin"
 -              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
 +              '("/tex/generic/hyph-utf8/patterns/ptex/hyph-zh-latn-pinyin.ec.tex"
 +                "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
                (base32
 -               "1j68mry2zy91m1kbzwhin5q2jajf6xh48npdds8wvp1sqmzih2a3")))
 +               "1hhh30hcjymm2igpllly04cavsfmd6xrjkd9zax6b2wdxn3ka4pm")))
      (synopsis "Hyphenation patterns for unaccented Chinese pinyin")
      (description "The package provides hyphenation patterns for unaccented
  Chinese pinyin T1/EC and UTF-8 encodings.")
@@@ -1786,24 -1784,12 +1786,24 @@@ be replaced by files tailored to indivi
                "texlive-hyphen-finnish" "fi"
                (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi.tex")
                (base32
 -               "1f72b4ydb4zddvw2i004948khmwzigxkdkwfym5v1kkq0183sfpj")))
 +               "1pa8sjs9zvnv1y6dma4s60sf9cr4zrvhxwm6i8cnshm84q16w4bc")))
      (synopsis "Hyphenation patterns for Finnish")
      (description "The package provides hyphenation patterns for Finnish in
  T1/EC and UTF-8 encodings.")
      (license license:public-domain)))
  
 +(define-public texlive-hyphen-schoolfinnish
 +  (package
 +    (inherit (texlive-hyphen-package
 +              "texlive-hyphen-schoolfinnish" "fi-x-school"
 +              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi-x-school.tex")
 +              (base32
 +               "1w5n6gaclgifbbnafg32vz3mfaibyldvh4yh1ya3sq9fwfmv035c")))
 +    (synopsis "Hyphenation patterns for Finnish for school")
 +    (description "The package provides hyphenation patterns for Finnish for
 +school in T1/EC and UTF-8 encodings.")
 +    (license license:public-domain)))
 +
  (define-public texlive-hyphen-french
    (package
      (inherit (texlive-hyphen-package
@@@ -1865,7 -1851,7 +1865,7 @@@ T8M, T8K, and UTF-8 encodings."
                      "/tex/generic/dehyph/dehyphtex.tex"
                      "/tex/generic/dehyph/README")
                (base32
 -               "0wp5by5kkf4ac6li5mbppqzw11500wa7f22p5vpz3m1kwd15zavw")))
 +               "17cc5hd0fr3ykpgly9nxaiz4sik3kmfn2wyxz1fkdnqqhl3i41a0")))
      (synopsis "Hyphenation patterns for German")
      (description "This package provides hyphenation patterns for German in
  T1/EC and UTF-8 encodings, for traditional and reformed spelling, including
@@@ -1895,10 -1881,10 +1895,10 @@@ in monotonic and polytonic spelling in 
      (inherit (texlive-hyphen-package
                "texlive-hyphen-hungarian" "hu"
                (list "/doc/generic/huhyphen/"
 -                    "/doc/generic/hyph-utf8/hu/"
 +                    "/doc/generic/hyph-utf8/languages/hu/"
                      "/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex")
                (base32
 -               "1j1b8kksg9r8nmjyjvvz8fr3hgcrjj6jlybf9p06nwrrwm2r8j8f")))
 +               "006d2290lcsqzh9ljansbaj9k52s17zgkw0kpsspn5l7a8n00zcl")))
      (synopsis "Hyphenation patterns for Hungarian")
      (description "This package provides hyphenation patterns for Hungarian in
  T1/EC and UTF-8 encodings.")
@@@ -2010,12 -1996,11 +2010,12 @@@ Europe, in T1/EC and UTF-8 encodings."
    (package
      (inherit (texlive-hyphen-package
                "texlive-hyphen-latin" '("la-x-classic" "la-x-liturgic" "la")
 -              (list "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex"
 -                    "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex"
 -                    "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex")
 +              '("/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex"
 +                "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex"
 +                "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex"
 +                "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-la-x-classic.ec.tex")
                (base32
 -               "0rxg8a4s5cpj8vlkz5a74a036axda5jqgvr3f9aj2cc2x9f2f3w9")))
 +               "119rf6sk1f639ky6zr9njn21nsxzgfmjci94y26745qs8w08ilkl")))
      (synopsis "Liturgical Latin hyphenation patterns")
      (description "This package provides hyphenation patterns for Latin in
  T1/EC and UTF-8 encodings, mainly in modern spelling (u when u is needed and v
@@@ -2057,19 -2042,6 +2057,19 @@@ L7X and UTF-8 encodings."
      ;; the hyph-utf8 package we choose the LPPL license.
      (license license:lppl)))
  
 +(define-public texlive-hyphen-macedonian
 +  (package
 +    (inherit (texlive-hyphen-package
 +              "texlive-hyphen-macedonian" "mk"
 +              '("/tex/generic/hyph-utf8/patterns/tex/hyph-mk.tex"
 +                "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-mk.macedonian.tex")
 +              (base32
 +               "1fv6y8gpic5ciw8cclfxc8h3wr5xir1j0a7shixja1pmdyz7db2b")))
 +    (synopsis "Macedonian hyphenation patterns")
 +    (description "This package provides hypenation patterns for Macedonian.")
 +    ;; XXX: License just says 'GPL'.  Assume GPL2 since the file predates GPL3.
 +    (license license:gpl2+)))
 +
  (define-public texlive-hyphen-mongolian
    (package
      (inherit (texlive-hyphen-package
@@@ -2208,10 -2180,10 +2208,10 @@@ T2A and UTF-8 encodings."
    (package
      (inherit (texlive-hyphen-package
                "texlive-hyphen-sanskrit" "sa"
 -              (list "/doc/generic/hyph-utf8/sa/hyphenmin.txt"
 +              (list "/doc/generic/hyph-utf8/languages/sa/hyphenmin.txt"
                      "/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")
                (base32
 -               "0gi2qk0wf388h9n25gzhv0cdz67ph83wal8h3iz2sqnpdjsw8kpc")))
 +               "1bkzj8swj4lbswf1vr4pb1jg6dixzs7p8h8zm8s8as52h442aida")))
      (synopsis "Sanskrit hyphenation patterns")
      (description "This package provides hyphenation patterns for Sanskrit and
  Prakrit in longdesc transliteration, and in Devanagari, Bengali, Kannada,
@@@ -2269,7 -2241,7 +2269,7 @@@ T1/EC and UTF-8 encodings."
                "texlive-hyphen-spanish" "es"
                (list "/tex/generic/hyph-utf8/patterns/tex/hyph-es.tex")
                (base32
 -               "1h3yg9vcq0lf7hxv0ahkqmyg269dxjs8m2mz8sgz5l1fxmvahvaj")))
 +               "05lbvjkj304xxghyihk8js0kmg97ddlgijld3bp81bc28h4cav0v")))
      (synopsis "Hyphenation patterns for Spanish")
      (description "The package provides hyphenation patterns for Spanish in
  T1/EC and UTF-8 encodings.")
@@@ -2389,7 -2361,7 +2389,7 @@@ T1/EC and UTF-8 encodings."
                      "/doc/generic/hyph-utf8/img/miktex-languages.png"
                      "/doc/generic/hyph-utf8/img/texlive-collection.png")
                (base32
 -               "1bar5mc808ch20anhqrdxcwiych359qsvr7mggxpg2l2kq5xdyq0")))
 +               "0rgp0zn36gwzqwpmjb9h01ns3m19v3r7lpw1h0pc9bx115w6c9jx")))
      (outputs '("out" "doc"))
      (build-system gnu-build-system)
      (arguments
               (setenv "TFMFONTS"
                       (string-append (assoc-ref inputs "texlive-cm")
                                      "/share/texmf-dist/fonts/tfm/public/cm:"
 -                                    (assoc-ref inputs "texlive-fonts-knuth-lib")
 +                                    (assoc-ref inputs "texlive-knuth-lib")
                                      "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
               ;; ...and find all tex files in this environment.
               (setenv "TEXINPUTS"
         ;; for a working "tex".
         ("texlive-tex-plain" ,texlive-tex-plain)
         ("texlive-cm" ,texlive-cm)
 -       ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
 +       ("texlive-knuth-lib" ,texlive-knuth-lib)
         ("texlive-hyphen-base" ,texlive-hyphen-base)))
      (home-page "https://ctan.org/pkg/hyph-utf8")
      (synopsis "Hyphenation patterns expressed in UTF-8")
@@@ -2512,7 -2484,8 +2512,7 @@@ converters, will completely supplant th
                     license:public-domain
                     license:wtfpl2))))
  
 -(define-public texlive-generic-hyph-utf8
 -  (deprecated-package "texlive-generic-hyph-utf8" texlive-hyph-utf8))
 +(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyph-utf8)
  
  (define-public texlive-dehyph-exptl
    (package
                (list "/tex/generic/dehyph-exptl/"
                      "/doc/generic/dehyph-exptl/")
                (base32
 -               "1fnqc63gz8gvdyfz45bx8dxn1r1rwrypahs3bqd2vlc8ff76xp86")
 +               "0l57a0r4gycp94kz6lrxqvh9m57j2shmbr2laf5zjb0qnrisq46d")
                #:trivial? #t))
      (propagated-inputs
       `(("texlive-hyphen-base" ,texlive-hyphen-base)
@@@ -2536,7 -2509,8 +2536,7 @@@ bundle."
      ;; under LPPL.
      (license (list license:expat license:lppl))))
  
 -(define-public texlive-generic-dehyph-exptl
 -  (deprecated-package "texlive-generic-dehyph-exptl" texlive-dehyph-exptl))
 +(define-deprecated-package texlive-generic-dehyph-exptl texlive-dehyph-exptl)
  
  (define-public texlive-ukrhyph
    (package
@@@ -2627,7 -2601,7 +2627,7 @@@ UCY (Omega Unicode Cyrillic), LCY, LWN 
                      "/web2c/tcvn-t5.tcx"
                      "/web2c/viscii-t5.tcx")
                (base32
 -               "191i8n3g46p53bb9dkx2ggwpzy7skgg0pbklsrpx8x4ayd86wcaf")
 +               "00q2nny7lw7jxyln6ch4h0alygbrzk8yynliyc291m53kds1h0mr")
                #:trivial? #t))
      (home-page "https://www.tug.org/texlive/")
      (synopsis "Files related to the path searching library for TeX")
@@@ -2643,7 -2617,7 +2643,7 @@@ mechanism.  This package provides suppo
                "texlive-latexconfig"
                (list "/tex/latex/latexconfig/")
                (base32
 -               "1wa7yhdpnz1nyidwgli68fyr33jn951bnniqrih5lj98k09rqc3h")
 +               "10ynmd8b9b9l1wl1mva23yz4zir53p6r5z31s39wmxz19pj12qvx")
                #:trivial? #t))
      (home-page "https://www.tug.org/")
      (synopsis "Configuration files for LaTeX-related formats")
@@@ -2669,7 -2643,7 +2669,7 @@@ formats."
                           "/tex/latex/base/testpage.tex"
                           "/tex/latex/base/texsys.cfg")
                     (base32
 -                    "0m0gjb4hbsf2iqkkx3px4f28r2scjvsjv4zb2whkbnb44apyw1f0")
 +                    "0msyjz0937rc7hs77v6la152sdiwd73qj41z1mlyh0m3dns9qz4g")
                     #:trivial? #t)))
      (package
        (inherit template)
                                 '(("texlive-etex" . "/etex")
                                   ("texlive-cm" . "/cm")
                                   ("texlive-fonts-latex" . "/latex-fonts")
 -                                 ("texlive-fonts-knuth-lib" . "/knuth-lib")))
 +                                 ("texlive-knuth-lib" . "/knuth-lib")))
                            ":"))
                   (let ((cwd (getcwd)))
                     (setenv "TEXINPUTS"
                              cwd "/build:"
                              (string-join
                               (map (match-lambda ((_ . dir) dir)) inputs)
 -                             "//:"))))
 +                             "//:")))
 +                   (setenv "LUAINPUTS" (string-append cwd "/build:")))
  
                   ;; This is the actual build step.
                   (mkdir "build")
                   (let ((disabled-formats
                          '("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
                            "eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
 +                          "platex-dev eptex" "uplatex-dev euptex"
                            "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
 -                          "luacsplain luatex"
 -                          ,@(if (string-prefix? "powerpc64le"
 -                                                (or (%current-target-system)
 -                                                    (%current-system)))
 -                              '("luajittex") '())
 +                          "luacsplain luatex" "optex luatex"
 +                          ;; LuaJIT is not ported to powerpc64le* yet and
 +                          ;; building these fail on powerpc.
 +                          ,@(if (target-powerpc?)
 +                              '("luajittex" "luajithbtex" "mfluajit") '())
                            "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
                            "pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
                            "mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
                     (make-file-writable "web2c/fmtutil.cnf")
                     (substitute* "web2c/fmtutil.cnf"
                       (((string-append "^(" (string-join disabled-formats "|") ")") m)
 -                      (string-append "#! " m))))
 +                      (string-append "#! " m))
 +                     (("translate-file=cp227")
 +                      (format #f "translate-file=~a/share/texmf-dist/web2c/cp227"
 +                              (assoc-ref inputs "texlive-kpathsea")))))
                   (invoke "fmtutil-sys" "--all"
                           "--fmtdir=web2c"
                           (string-append "--cnffile=web2c/fmtutil.cnf"))
           ("texlive-kpathsea" ,texlive-kpathsea)
           ("texlive-cm" ,texlive-cm)
           ("texlive-fonts-latex" ,texlive-fonts-latex)
 -         ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
 +         ("texlive-knuth-lib" ,texlive-knuth-lib)
           ("texlive-luatexconfig"
            ,(texlive-origin
              "texlive-luatexconfig" (number->string %texlive-revision)
                    "/tex/generic/config/luatexiniconfig.tex"
                    "/web2c/texmfcnf.lua")
              (base32
 -             "1gi87wy12r8w8fhx9ajcid382dmqzf6b9070b5nndvbbjrvhwf23")))))
 +             "0yjx7nw9mgfgnq1givkzbxh7z7ncw1liaddjgm7n2nwn0aw6xfdg")))))
        (propagated-inputs
         `(("texlive-dehyph-exptl" ,texlive-dehyph-exptl)
           ("texlive-etex" ,texlive-etex)
           ("texlive-hyphen-estonian" ,texlive-hyphen-estonian)
           ("texlive-hyphen-ethiopic" ,texlive-hyphen-ethiopic)
           ("texlive-hyphen-finnish" ,texlive-hyphen-finnish)
 +         ("texlive-hyphen-schoolfinnish" ,texlive-hyphen-schoolfinnish)
           ("texlive-hyphen-french" ,texlive-hyphen-french)
           ("texlive-hyphen-friulan" ,texlive-hyphen-friulan)
           ("texlive-hyphen-galician" ,texlive-hyphen-galician)
           ("texlive-hyphen-latin" ,texlive-hyphen-latin)
           ("texlive-hyphen-latvian" ,texlive-hyphen-latvian)
           ("texlive-hyphen-lithuanian" ,texlive-hyphen-lithuanian)
 +         ("texlive-hyphen-macedonian" ,texlive-hyphen-macedonian)
           ("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian)
           ("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian)
           ("texlive-hyphen-occitan" ,texlive-hyphen-occitan)
           ("texlive-unicode-data" ,texlive-unicode-data)
           ("texlive-ukrhyph" ,texlive-ukrhyph)
           ("texlive-ruhyphen" ,texlive-ruhyphen)
 +         ("texlive-latex-l3kernel" ,texlive-latex-l3kernel)
 +         ("texlive-latex-l3backend" ,texlive-latex-l3backend)
 +         ;; TODO: This dependency isn't needed for LaTeX version 2021-06-01
 +         ;; and later. See:
 +         ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
 +         ("texlive-latex-l3packages" ,texlive-latex-l3packages)
           ("texlive-latexconfig" ,texlive-latexconfig)))
        (home-page "https://www.ctan.org/pkg/latex-base")
        (synopsis "Base sources of LaTeX")
@@@ -2884,60 -2845,6 +2884,60 @@@ with the required packages, constitute
  contain.")
        (license license:lppl1.3c+))))
  
 +(define-public texlive-latex-atveryend
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-atveryend"
 +              '("/doc/latex/atveryend/README.md"
 +                "/tex/latex/atveryend/")
 +              (base32
 +               "1gz5ssxjlqa53a8blsmdk2qjahzc910ldh26xjxfxgqnqb03rqx7")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/atveryend")
 +    (synopsis "Hooks at the very end of a document")
 +    (description
 +     "This LaTeX packages provides two hooks for @code{\\end@{document@}}
 +that are executed after the hook of @code{\\AtEndDocument}:
 +@code{\\AfterLastShipout} can be used for code that is to be executed right
 +after the last @code{\\clearpage} before the @file{.aux} file is closed.
 +@code{\\AtVeryEndDocument} is used for code after closing and final reading
 +of the @file{.aux} file.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-latex-auxhook
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-auxhook"
 +              '("/doc/latex/auxhook/README.md"
 +                "/tex/latex/auxhook/")
 +              (base32
 +               "1xh445shr00rh43nnz03xh8k2mdrxgsr03lllqpgvwhm6yzsydkf")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/auxhook")
 +    (synopsis "Hooks for auxiliary files")
 +    (description
 +     "This package provides hooks for adding code at the beginning of
 +@file{.aux} files.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-latex-epstopdf-pkg
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-epstopdf-pkg"
 +              '("/doc/latex/epstopdf-pkg/"
 +                "/tex/latex/epstopdf-pkg/")
 +              (base32
 +               "0zl6jiyp2cvvyqx3lwxdkcvvnkqgbwj4issq07cagf61gljq6fns")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/epstopdf-pkg")
 +    (synopsis "Call @command{epstopdf} \"on the fly\"")
 +    (description
 +     "The package adds support for EPS files in the @code{graphicx} package
 +when running under pdfTeX.  If an EPS graphic is detected, the package
 +spawns a process to convert the EPS to PDF, using the script
 +@command{epstopdf}.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-filecontents
    (package
      (name "texlive-latex-filecontents")
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1h78zw0vhldx478zs4v86ajg7vpkysd1kg3npc480qqls3q6ba40"))))
 +                "1cmfigg5jx3hmdyh4gv8kwxi7dg076ldkxmr46s05xvhzjig1z9x"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/filecontents"))
      (home-page "https://www.ctan.org/pkg/filecontents")
@@@ -2963,6 -2870,31 +2963,6 @@@ overwrite existing files and letting yo
  @code{filecontents*} anywhere.")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-generic-ifxetex
 -  (package
 -    (name "texlive-generic-ifxetex")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "generic" "ifxetex"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     '(#:tex-directory "generic/ifxetex"
 -       #:tex-format "xelatex"))
 -    (inputs
 -     `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
 -    (home-page "https://www.ctan.org/pkg/ifxetex")
 -    (synopsis "Am I running under XeTeX?")
 -    (description
 -     "This is a simple package which provides an @code{\\ifxetex} conditional,
 -so that other code can determine that it is running under XeTeX.  The package
 -requires the e-TeX extensions to the TeX primitive set.")
 -    (license license:lppl1.3c+)))
 -
  (define-public texlive-epsf
    (package
      (inherit (simple-texlive-package
@@@ -2983,7 -2915,8 +2983,7 @@@ bundle of packages.  (The latex-graphic
  users, via its Plain TeX version.)")
      (license license:public-domain)))
  
 -(define-public texlive-generic-epsf
 -  (deprecated-package "texlive-generic-epsf" texlive-epsf))
 +(define-deprecated-package texlive-generic-epsf texlive-epsf)
  
  (define-public texlive-latex-fancyvrb
    (package
                (list "/doc/latex/fancyvrb/README"
                      "/tex/latex/fancyvrb/")
                (base32
 -               "1dwkcradz9nwpjwmv1sjzn77lvw25ypr0rrgmf1kd8pd2mw7dxcn")
 +               "0pdilgpw4zc0ipp4z9kdi61nymifyjy2mfpk74xk2cw9vhynkk3w")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/fancyvrb")
      (synopsis "Sophisticated verbatim text")
@@@ -3012,10 -2945,8 +3012,10 @@@ verbatim source)."
                (list "/doc/latex/graphics-def/README.md"
                      "/tex/latex/graphics-def/")
                (base32
 -               "0zrbn9cwfnnrrl3b2zsd74ldksp9jwpvjh7z93ild1m75crpb39a")
 +               "0b66fy06safyrd717rfr476g1gz6nqfv1vqvam7ac2yy0g0djb17")
                #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-latex-epstopdf-pkg" ,texlive-latex-epstopdf-pkg)))
      (home-page "https://www.ctan.org/pkg/latex-graphics")
      (synopsis "Color and graphics option files")
      (description
@@@ -3051,7 -2982,7 +3051,7 @@@ set default \"driver\" options for the 
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0nlfhn55ax89rcvpkrl9570671b62kcr4c9l5ch3w5zw9vmi00dz"))))
 +                "0fgjl58f25zvagssz4dwmmsclzw8cr7mx00kdrbx2kcnamcb7h8d"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/graphics"))
      (propagated-inputs
@@@ -3066,22 -2997,6 +3066,22 @@@ documents.  It comprises the packages c
  keyval, and lscape.")
      (license license:lppl1.3c+)))
  
 +(define-public texlive-latex-hycolor
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-hycolor"
 +              (list "/doc/latex/hycolor/README.md"
 +                    "/tex/latex/hycolor/")
 +              (base32
 +               "026lfb4l7b3q8g6zc68siqandhb1x98cbycn7njknqva6s99aiqn")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/latex-graphics")
 +    (synopsis "Color for hyperref and bookmark")
 +    (description
 +     "This package provides the code for the @code{color} option that is
 +used by @code{hyperref} and @code{bookmark}.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-xcolor
    (let ((template (simple-texlive-package
                     "texlive-xcolor"
@@@ -3119,122 -3034,32 +3119,122 @@@ row colors plus repeated non-aligned ma
  tables.")
        (license license:lppl1.2+))))
  
 -(define-public texlive-latex-xcolor
 -  (deprecated-package "texlive-latex-xcolor" texlive-xcolor))
 +(define-deprecated-package texlive-latex-xcolor texlive-xcolor)
  
 -(define-public texlive-latex-hyperref
 -  (package
 -    (name "texlive-latex-hyperref")
 -    (version "6.84a2")
 -    ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
 -    ;; so we fetch the release from GitHub.
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "https://github.com/ho-tex/hyperref/"
 -                                  "archive/release-" version ".tar.gz"))
 -              (file-name (string-append name "-" version ".tar.gz"))
 -              (sha256
 -               (base32
 -                "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
 -    (build-system texlive-build-system)
 -    (arguments '(#:tex-directory "latex/hyperref"))
 -    (propagated-inputs
 -     `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek) ; for ltxcmds.sty
 -       ("texlive-latex-url" ,texlive-latex-url)))
 -    (home-page "https://www.ctan.org/pkg/hyperref")
 -    (synopsis "Extensive support for hypertext in LaTeX")
 -    (description
 -     "The @code{hyperref} package is used to handle cross-referencing commands
 +(define-public texlive-xmltex
 +  (let ((template (simple-texlive-package
 +                   "texlive-xmltex"
 +                   (list
 +                    "/doc/otherformats/xmltex/"
 +                    "/tex/xmltex/")
 +                   (base32
 +                    "023gv9axq05vwqz50fnkig24dzahwlc4raks2s8xc4pzrv2dv1zy"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "tex/xmltex/base")
 +         ((#:phases phases '%standard-phases)
 +          `(modify-phases ,phases
 +             (add-before 'install 'generate-formats
 +               (lambda* (#:key inputs #:allow-other-keys)
 +                 (mkdir "web2c")
 +                 (for-each (lambda (f)
 +                             (copy-file f (basename f)))
 +                           (find-files "tex" "\\.(ini|tex)$"))
 +                 (invoke "fmtutil-sys" "--byfmt" "xmltex"
 +                         "--fmtdir=web2c")
 +                 (invoke "fmtutil-sys" "--byfmt" "pdfxmltex"
 +                         "--fmtdir=web2c")))
 +             (add-after 'install 'install-formats-and-wrappers
 +               (lambda* (#:key inputs outputs #:allow-other-keys)
 +                 (let* ((out (assoc-ref outputs "out"))
 +                        (texlive-bin (assoc-ref inputs "texlive-bin"))
 +                        (pdftex (string-append texlive-bin "/bin/pdftex"))
 +                        (web2c (string-append out "/share/texmf-dist/web2c")))
 +                   (mkdir-p web2c)
 +                   (copy-recursively "web2c" web2c)
 +                   ;; Create convenience command wrappers.
 +                   (mkdir-p (string-append out "/bin"))
 +                   (symlink pdftex (string-append out "/bin/xmltex"))
 +                   (symlink pdftex (string-append out "/bin/pdfxmltex"))
 +                   #t)))))))
 +      (propagated-inputs
 +       ;; The following fonts are propagated as a texlive-updmap.cfg as the font
 +       ;; maps need to be recreated for the fonts to be usable.  They are
 +       ;; required by xmltex through mlnames.sty and unicode.sty.
 +       `(("texlive" ,(texlive-updmap.cfg
 +                      (list
 +                       texlive-amsfonts
 +                       texlive-babel
 +                       texlive-courier
 +                       texlive-helvetic
 +                       texlive-hyperref
 +                       texlive-symbol
 +                       texlive-tipa
 +                       texlive-times
 +                       texlive-zapfding
 +                       ;; The following fonts, while not required, are used if
 +                       ;; available:
 +                       texlive-stmaryrd
 +                       texlive-wasy)))))
 +      (native-inputs
 +       `(("texlive-tex-ini-files" ,texlive-tex-ini-files)))
 +      (home-page "https://www.ctan.org/pkg/xmltex/")
 +      (synopsis "Support for parsing XML documents")
 +      (description "The package provides an implementation of a parser for
 +documents matching the XML 1.0 and XML Namespace Recommendations.  Element and
 +attribute names, as well as character data, may use any characters allowed in
 +XML, using UTF-8 or a suitable 8-bit encoding.")
 +      (license license:lppl1.0+))))        ;per xmltex/base/readme.txt
 +
 +(define-public texlive-hyperref
 +  (let ((template (simple-texlive-package
 +                   "texlive-hyperref"
 +                   (list "/doc/latex/hyperref/"
 +                         "/source/latex/hyperref/"
 +                         ;; These files are not generated from the sources
 +                         "/tex/latex/hyperref/minitoc-hyper.sty"
 +                         "/tex/latex/hyperref/ntheorem-hyper.sty"
 +                         "/tex/latex/hyperref/xr-hyper.sty")
 +                   (base32
 +                    "0nmbxaq676m2y9fgdji0bxqchmrli4hwhspijaszx51b3ki6bj2h"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "latex/hyperref")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/hyperref") #t))))))
 +      (propagated-inputs
 +       `(("texlive-generic-atbegshi" ,texlive-generic-atbegshi)
 +         ("texlive-generic-bitset" ,texlive-generic-bitset)
 +         ("texlive-generic-etexcmds" ,texlive-generic-etexcmds)
 +         ("texlive-generic-gettitlestring" ,texlive-generic-gettitlestring)
 +         ("texlive-generic-iftex" ,texlive-generic-iftex)
 +         ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
 +         ("texlive-generic-intcalc" ,texlive-generic-intcalc)
 +         ("texlive-generic-kvdefinekeys" ,texlive-generic-kvdefinekeys)
 +         ("texlive-generic-kvsetkeys" ,texlive-generic-kvsetkeys)
 +         ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)
 +         ("texlive-generic-pdfescape" ,texlive-generic-pdfescape)
 +         ("texlive-latex-auxhook" ,texlive-latex-auxhook)
 +         ("texlive-latex-atveryend" ,texlive-latex-atveryend)
 +         ("texlive-latex-hycolor" ,texlive-latex-hycolor)
 +         ("texlive-latex-kvoptions" ,texlive-latex-kvoptions)
 +         ("texlive-latex-letltxmacro" ,texlive-latex-letltxmacro)
 +         ("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)
 +         ("texlive-latex-refcount" ,texlive-latex-refcount)
 +         ("texlive-latex-rerunfilecheck" ,texlive-latex-rerunfilecheck)
 +         ("texlive-latex-url" ,texlive-latex-url)))
 +      (home-page "https://www.ctan.org/pkg/hyperref")
 +      (synopsis "Extensive support for hypertext in LaTeX")
 +      (description
 +       "The @code{hyperref} package is used to handle cross-referencing commands
  in LaTeX to produce hypertext links in the document.  The package provides
  backends for the @code{\\special} set defined for HyperTeX DVI processors; for
  embedded @code{pdfmark} commands for processing by Acrobat
@@@ -3242,13 -3067,11 +3242,13 @@@ Distiller (@code{dvips} and Y&Y's @code
  for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
  pdf and HTML backends.  The package is distributed with the @code{backref} and
  @code{nameref} packages, which make use of the facilities of @code{hyperref}.")
 -    (license license:lppl1.3+)))
 +      (license license:lppl1.3+))))
 +
 +(define-deprecated-package texlive-latex-hyperref texlive-hyperref)
  
 -(define-public texlive-latex-oberdiek
 +(define-public texlive-oberdiek
    (package
 -    (name "texlive-latex-oberdiek")
 +    (name "texlive-oberdiek")
      (version (number->string %texlive-revision))
      (source (origin
                (method svn-fetch)
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0pi2d6gsddcs9wprdbar46s91kdc5fxl1m79g7xrbccsx8s9xbml"))))
 +                "1cadrkpdqs65gxsaszfgfd8wqp8pvpik2sjmlyq3hz5p9yna3p9m"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/oberdiek"
                 (("ifpdf.ins") "ifpdf.dtx"))
               #t)))))
      (propagated-inputs
 -     `(("texlive-generic-ifxetex" ,texlive-generic-ifxetex)))
 +     `(("texlive-generic-iftex" ,texlive-generic-iftex)))
      (home-page "https://www.ctan.org/pkg/oberdiek")
      (synopsis "Bundle of packages submitted by Heiko Oberdiek")
      (description
@@@ -3279,30 -3102,6 +3279,30 @@@ better accessibility support for PDF fi
  arrows; record information about document class(es) used; and many more.")
      (license license:lppl1.3+)))
  
 +(define-deprecated-package texlive-latex-oberdiek texlive-oberdiek)
 +
 +(define-public texlive-latex-rerunfilecheck
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-rerunfilecheck"
 +              '("/doc/latex/rerunfilecheck/"
 +                "/tex/latex/rerunfilecheck/")
 +              (base32
 +               "1myz0d5bxhxvl4220ikywh921qld8n324kk9kscqbc5iw4063g56")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
 +       ("texlive-generic-uniquecounter" ,texlive-generic-uniquecounter)
 +       ("texlive-latex-atveryend" ,texlive-latex-atveryend)
 +       ("texlive-latex-kvoptions" ,texlive-latex-kvoptions)
 +       ("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)))
 +    (home-page "https://www.ctan.org/pkg/rerunfilecheck")
 +    (synopsis "Checksum based rerun checks on auxiliary files")
 +    (description
 +     "This package provides additional rerun warnings if some auxiliary
 +files have changed.  It is based on MD5 checksum, provided by pdfTeX.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-tools
    (package
      (name "texlive-latex-tools")
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1wqvn4z0s92h5iqzrvxw7hinzp95avjk9v8lnqbqr4kz6nv4xb9l"))))
 +                "1vm5wfyd0vbmv31a29fc7k8y14xiw00msvdx9n7dzsn9zpfjflqs"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/tools"
 -       #:build-targets '("tools.ins")))
 +       #:build-targets '("tools.ins")
 +       #:phases (modify-phases %standard-phases
 +                  (add-after 'install 'provide-array-2016-10-06.sty
 +                    (lambda* (#:key outputs #:allow-other-keys)
 +                      ;; XXX: array.sty does:
 +                      ;;  "DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}"
 +                      ;; ...which causes some users (hypre) to look for that
 +                      ;; file specifically.  Provide it.
 +                      (with-directory-excursion (string-append
 +                                                 (assoc-ref outputs "out")
 +                                                 "/share/texmf-dist/tex"
 +                                                 "/latex/tools")
 +                        (symlink "array.sty" "array-2016-10-06.sty")))))))
      (home-page "https://www.ctan.org/pkg/latex-tools")
      (synopsis "LaTeX standard tools bundle")
      (description
@@@ -3364,7 -3151,8 +3364,7 @@@ of file names."
      ;; the latest version is 1.3c.
      (license license:lppl1.3c+)))
  
 -(define-public texlive-latex-url
 -  (deprecated-package "texlive-latex-url" texlive-url))
 +(define-deprecated-package texlive-latex-url texlive-url)
  
  (define-public texlive-tetex
    (package
@@@ -3393,15 -3181,10 +3393,15 @@@ Live distribution."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0s77z2cbv841l45qrpf0s8qhzfa4wi689lg7zkw88qg18nzvy0ly"))))
 +                "068xkinrkl6qjf8r6a9i0msvnzp4y7a3gnd2h12ws0km1dv19r20"))))
      (build-system texlive-build-system)
      (arguments
 -     '(#:tex-directory "latex/l3kernel"))
 +     '(#:tex-directory "latex/l3kernel"
 +       #:tex-engine "tex"
 +       #:tex-format #f
 +       #:texlive-latex-base #f))
 +    (native-inputs
 +     `(("texlive-docstrip" ,texlive-docstrip)))
      (home-page "https://www.ctan.org/pkg/l3kernel")
      (synopsis "LaTeX3 programmers’ interface")
      (description
@@@ -3412,59 -3195,20 +3412,59 @@@ code are built: it is an API for TeX pr
  that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-latex-l3packages
 +(define-public texlive-latex-l3backend
    (package
 -    (name "texlive-latex-l3packages")
 +    (name "texlive-latex-l3backend")
      (version (number->string %texlive-revision))
      (source (origin
                (method svn-fetch)
 -              (uri (texlive-ref "latex" "l3packages"))
 +              (uri (texlive-ref "latex" "l3backend"))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1cv4fk9pabh7mkxhfsdmh4k8xpmzg1psgcsvd11c869m7n3a629h"))))
 +                "0mlwyzssqn6wkyv9hzp24d40p8f20zrjqgvqyqs1rd7q7awan42a"))))
 +    (build-system texlive-build-system)
 +    (arguments
 +     '(#:tex-directory "latex/l3backend"
 +       #:tex-engine "tex"
 +       #:tex-format #f
 +       #:texlive-latex-base #f))
 +    (native-inputs
 +     `(("texlive-docstrip" ,texlive-docstrip)))
 +    (home-page "https://www.ctan.org/pkg/l3backend")
 +    (synopsis "LaTeX3 backend drivers")
 +    (description
 +     "This package forms parts of expl3, and contains the code used to
 +interface with backends (drivers) across the expl3 codebase. The functions
 +here are defined differently depending on the engine in use. As such, these
 +are distributed separately from l3kernel to allow this code to be updated on
 +an independent schedule.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-latex-l3packages
 +  (package
 +    (name "texlive-latex-l3packages")
 +    (version (number->string %texlive-revision))
 +    (source (texlive-origin name version
 +                            '("/source/latex/l3packages/"
 +                              ;; These files have been generated with a
 +                              ;; bespoke source tree and then modified by
 +                              ;; hand. It's unfeasible to recreate them. See:
 +                              ;; https://tug.org/pipermail/tex-live/2021-June/047188.html
 +                              "/tex/latex/l3packages/xparse/xparse-2018-04-12.sty"
 +                              "/tex/latex/l3packages/xparse/xparse-2020-10-01.sty"
 +
 +                              ;; TODO: This file can be removed when using
 +                              ;; LaTeX version 2021-06-01 or newer. See:
 +                              ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
 +                              "/tex/latex/l3packages/xparse/xparse-generic.tex")
 +                            (base32 "05rjxdqhhg7z1z2rmhmwj2qf09xygymayy3jzj9fdphk0pab3amm")))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/l3packages"
 +       #:tex-engine "tex"
 +       #:tex-format #f
 +       #:texlive-latex-base #f
         ;; build-targets must be specified manually since they are in
         ;; sub-directories.
         #:build-targets '("l3keys2e.ins" "xparse.ins" "xfrac.ins" "xfp.ins" "xtemplate.ins")
             (lambda _
               (let ((cwd (getcwd)))
                 (setenv "TEXINPUTS"
 -                       (string-append cwd "/l3keys2e:"
 -                                      cwd "/xparse:"
 -                                      cwd "/xfrac:"
 -                                      cwd "/xfp:"
 -                                      cwd "/xtemplate"
 +                       (string-append cwd "/source/latex/l3packages/l3keys2e:"
 +                                      cwd "/source/latex/l3packages/xparse:"
 +                                      cwd "/source/latex/l3packages/xfrac:"
 +                                      cwd "/source/latex/l3packages/xfp:"
 +                                      cwd "/source/latex/l3packages/xtemplate"
                                        ;; The terminating ":" is required to include the
                                        ;; l3kernel input as well.
                                        ":")))
 -             #t)))
 +             #t))
 +         (add-after 'install 'copy-generated-files
 +           (lambda* (#:key outputs #:allow-other-keys)
 +             (let ((dest (string-append (assoc-ref outputs "out")
 +                                        "/share/texmf-dist/tex/latex/l3packages")))
 +               (copy-recursively "tex/latex/l3packages/xparse" dest)))))
         ))
 +    (native-inputs
 +     `(("texlive-docstrip" ,texlive-docstrip)))
      (propagated-inputs
       `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
      (home-page "https://www.ctan.org/pkg/l3packages")
@@@ -3513,83 -3250,58 +3513,83 @@@ programming tools and kernel sup­port
  @end enumerate\n")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-latex-fontspec
 -  (package
 -    (name "texlive-latex-fontspec")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "latex" "fontspec"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "1223cw029n6zff7pqpwbsq1x8v3w63smczkmnybqxkw5h2za8gbz"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     '(#:tex-directory "latex/fontspec"
 -       #:phases
 -       (modify-phases %standard-phases
 -         (add-after 'install 'install-default-fontspec.cfg
 -           (lambda* (#:key outputs #:allow-other-keys)
 -             (with-output-to-file
 -                 (string-append (assoc-ref outputs "out")
 -                                "/share/texmf-dist/tex/latex/fontspec/fontspec.cfg")
 -               (lambda _
 -                 (display "\
 -%%% FONTSPEC.CFG %%%
 -%
 -% This configuration file sets up TeX Ligatures by default for all fonts loaded
 -% with `\\setmainfont` and `\\setsansfont`.
 -%
 -% In addition, `\\setmonofont` has default features to enforce \"monospace\"
 -% settings with regard to space stretchability and shrinkability.
 -
 -\\defaultfontfeatures
 - [\\rmfamily,\\sffamily]
 - {Ligatures=TeX}
 -
 -\\defaultfontfeatures
 - [\\ttfamily]
 - {WordSpace={1,0,0},
 -  HyphenChar=None,
 -  PunctuationSpace=WordSpace}
 -")))
 -             #t)))))
 -    (propagated-inputs
 -     `(("texlive-latex-l3packages" ,texlive-latex-l3packages)))
 -    (home-page "https://www.ctan.org/pkg/fontspec")
 -    (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
 -    (description
 -     "Fontspec is a package for XeLaTeX and LuaLaTeX.  It provides an
 +(define-public texlive-fontspec
 +  (let ((template (simple-texlive-package
 +                   "texlive-fontspec"
 +                   (list "/doc/latex/fontspec/"
 +                         "/source/latex/fontspec/"
 +                         "/tex/latex/fontspec/fontspec.cfg")
 +                   (base32
 +                    "06rms8dw1j67v3rgv6xmfykdmgbxi5rp78yxc782cy1sw07blgsg"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "latex/fontspec")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/fontspec/") #t))))))
 +      (propagated-inputs
 +       `(("texlive-latex-l3packages" ,texlive-latex-l3packages)))
 +      (home-page "https://www.ctan.org/pkg/fontspec")
 +      (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
 +      (description
 +       "Fontspec is a package for XeLaTeX and LuaLaTeX.  It provides an
  automatic and unified interface to feature-rich AAT and OpenType fonts through
  the NFSS in LaTeX running on XeTeX or LuaTeX engines.  The package requires
  the l3kernel and xparse bundles from the LaTeX 3 development team.")
 -    (license license:lppl1.3+)))
 +      (license license:lppl1.3+))))
 +
 +(define-deprecated-package texlive-latex-fontspec texlive-fontspec)
 +
 +(define-public texlive-l3build
 +  (let ((template (simple-texlive-package
 +                   "texlive-l3build"
 +                   (list "/doc/latex/l3build/"
 +                         "/doc/man/man1/l3build.1"
 +                         "/scripts/l3build/"
 +                         "/tex/latex/l3build/"
 +                         ;; TODO: The dtx file builds only the documentation.
 +                         ;; We avoid this for a simpler package definition,
 +                         ;; but it may be possible to exclude
 +                         ;; /doc/latex/l3build and the man page in the future.
 +                         "/source/latex/l3build/")
 +                   (base32
 +                    "1fcay05jj53qgp2b98jpawi0id298fs5xc4y1r5krrfr4sp4hd59")
 +                   #:trivial? #t)))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'install 'patch-shebangs-again
 +               (lambda* (#:key inputs outputs #:allow-other-keys)
 +                 ;; XXX: Since the 'patch-shebangs' phase cannot change the
 +                 ;; original source files patch the shebangs again here.
 +                 (let* ((coreutils (assoc-ref inputs "coreutils"))
 +                        (texlive-bin (assoc-ref inputs "texlive-bin"))
 +                        (path (list (string-append coreutils "/bin")
 +                                    (string-append texlive-bin "/bin"))))
 +                   (for-each (lambda (file)
 +                               (format #t "~a~%" file)
 +                               (patch-shebang file path))
 +                             (find-files (assoc-ref outputs "out")))
 +                   #t)))))))
 +      (inputs
 +       `(("coreutils" ,coreutils)
 +         ("texlive-bin" ,texlive-bin)))
 +      (home-page "https://github.com/latex3/luaotfload")
 +      (synopsis "Testing and building system for LaTeX")
 +      (description
 +       "The l3build module is designed to support the development of
 +high-quality LaTeX code by providing: a unit testing system, automated
 +typesetting of code sources, and a reliable packaging system for CTAN
 +releases.  The bundle consists of a Lua script to run the tasks and a
 +@code{.tex} file which provides the testing environment.")
 +      (license license:lppl1.3c+))))
  
  ;; The SVN directory contains little more than a dtx file that generates three
  ;; of the many lua files that should be installed as part of this package.
@@@ -3629,37 -3341,97 +3629,37 @@@ this bundle for use independent of ConT
      ;; GPL version 2 only
      (license license:gpl2)))
  
 -(define-public texlive-luatex-luaotfload
 -  (package
 -    (name "texlive-luatex-luaotfload")
 -    (version "2.8-fix-2")
 -    ;; The release tarball does not contain all source files.
 -    (source (origin
 -              (method git-fetch)
 -              (uri (git-reference
 -                    (url "https://github.com/lualatex/luaotfload")
 -                    (commit (string-append "v" version))))
 -              (file-name (git-file-name name version))
 -              (sha256
 -               (base32
 -                "0l5l7iq3dxcxl65qaghcpjg27yd9iw1sxa8pnd7xlvlm09dhfdnf"))))
 -    (build-system gnu-build-system)
 -    (arguments
 -     `(#:make-flags
 -       (list (string-append "DESTDIR="
 -                            (assoc-ref %outputs "out")
 -                            "/share/texmf-dist")
 -             "all")
 -       #:parallel-build? #f ; not supported
 -       #:phases
 -       (modify-phases %standard-phases
 -         (replace 'configure
 -           (lambda* (#:key inputs #:allow-other-keys)
 -             (substitute* "doc/Makefile"
 -               (("rst2man") "rst2man.py")
 -               ;; Don't build the PDF.  This requires more of LaTeX.
 -               (("\\$\\(DOCPDF\\)") ""))
 -
 -             (substitute* "Makefile"
 -               ;; We don't build the PDF, so don't attempt to install it.
 -               (("cp \\$\\(RESOURCES\\) \\$\\(DOCPDF\\)")
 -                "cp $(RESOURCES)")
 -               (("= \\$\\(DOCPDF\\)") "= ")
 -               ;; Fix name of fontloader file
 -               (("^LOADER.*= \\$\\(BUILDDIR\\)/fontloader-\\$\\(shell date \\+%F\\).lua")
 -                "LOADER = $(BUILDDIR)/fontloader.lua"))
 -
 -             (mkdir "build")
 -
 -             ;; Don't download this file.
 -             (copy-file (assoc-ref inputs "glyphlist")
 -                        "build/glyphlist.txt")
 -
 -             ;; Don't use git
 -             (let ((notes
 -                    `((committer . "Philipp Gesang <phg@phi-gamma.net>")
 -                      (description . ,version)
 -                      (loader . "fontloader.lua")
 -                      (revision . "ad480924393fffa2896156e1a32c22f5c61120dd")
 -                      (timestamp . "2019-01-01 00:00:00 +0000"))))
 -               (substitute* "scripts/mkstatus"
 -                 (("local notes.*=.*")
 -                  (string-append "local notes = {"
 -                                 (string-join
 -                                  (map (lambda (entry)
 -                                         (format "[\"~a\"]=\"~a\","
 -                                                 (symbol->string (car entry))
 -                                                 (cdr entry)))
 -                                       notes))
 -                                 "}"))))
 -             #t)))))
 -    (native-inputs
 -     `(("zip" ,zip)
 -       ("unzip" ,unzip)
 -       ("graphviz" ,graphviz)
 -       ("lualatex" ,(texlive-union (list texlive-luatex-lualibs
 -                                         texlive-context-base)))
 -       ("python-docutils" ,python-docutils)
 -       ("glyphlist"
 -        ,(origin
 -           (method url-fetch)
 -           (uri (string-append "https://raw.githubusercontent.com/adobe-type-tools/"
 -                               "agl-aglfn/b2a04cb906f9257cc06a2fe0ad4b3d663bc02136/"
 -                               "glyphlist.txt"))
 -           (sha256
 -            (base32 "1s6svfw23rqzdvflv8frgd4xrwvrmsj8szwzqgcd39dp9rpjafjp"))))))
 -    (propagated-inputs
 -     `(("texlive-luatex-lualibs" ,texlive-luatex-lualibs)))
 -    (home-page "https://github.com/lualatex/luaotfload")
 -    (synopsis "OpenType font loader for LuaTeX")
 -    (description
 -     "Luaotfload is an adaptation of the ConTeXt font loading system for the
 +;; TODO: We should be able to build this from the sources on Github with
 +;; texlive-l3build, but I haven't been able to get it to work.
 +(define-public texlive-luaotfload
 +  (let ((template (simple-texlive-package
 +                   "texlive-luaotfload"
 +                   (list "/doc/luatex/luaotfload/"
 +                         "/doc/man/man1/luaotfload-tool.1"
 +                         "/doc/man/man5/luaotfload.conf.5"
 +                         "/source/luatex/luaotfload/fontloader-reference-load-order.lua"
 +                         "/source/luatex/luaotfload/fontloader-reference-load-order.tex"
 +                         "/scripts/luaotfload/luaotfload-tool.lua"
 +                         "/tex/luatex/luaotfload/")
 +                   (base32
 +                    "10wznvxx3qsl88n560py5vyx5r3a3914anbqfhwcmhmwg097xxl4")
 +                   #:trivial? #t)))
 +    (package
 +      (inherit template)
 +      (propagated-inputs
 +       `(("texlive-luatex-lualibs" ,texlive-luatex-lualibs)))
 +      (home-page "https://github.com/lualatex/luaotfload")
 +      (synopsis "OpenType font loader for LuaTeX")
 +      (description
 +       "Luaotfload is an adaptation of the ConTeXt font loading system for the
  Plain and LaTeX formats.  It allows OpenType fonts to be loaded with font
  features accessible using an extended font request syntax while providing
  compatibilitywith XeTeX.  By indexing metadata in a database it facilitates
  loading fonts by their proper names instead of file names.")
 -    ;; GPL version 2 only
 -    (license license:gpl2)))
 +      ;; GPL version 2 only
 +      (license license:gpl2))))
 +
 +(define-deprecated-package texlive-luatex-luaotfload texlive-luaotfload)
  
  (define-public texlive-latex-amsmath
    (package
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0qgk2332dacsxn1z95qzp35gbs7wrzl1ipjdhnmk1r897msm4sf5"))))
 +                "172zybw7rp05jca8wl6x0mh6z6gncdyi1j9wdfyjnhbvqw0z4wi4"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/amsmath"))
      (home-page "https://www.ctan.org/pkg/amsmath")
@@@ -3690,84 -3462,64 +3690,84 @@@ mathematics, and @code{ntheoremntheorem
  definitions.")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-latex-amscls
 -  (package
 -    (name "texlive-latex-amscls")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "latex" "amscls"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "0c2j9xh4qpi0x1vvcxdjxq6say0zhyr569fryi5cmhp8bclh4kca"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     `(#:tex-directory "latex/amscls"))
 -    (home-page "https://www.ctan.org/pkg/amscls")
 -    (synopsis "AMS document classes for LaTeX")
 -    (description
 -     "This bundle contains three AMS classes: @code{amsartamsart} (for writing
 +(define-public texlive-amscls
 +  (let ((template (simple-texlive-package
 +                   "texlive-amscls"
 +                   (list "/doc/latex/amscls/"
 +                         "/source/latex/amscls/"
 +                         "/bibtex/bst/amscls/")
 +                   (base32
 +                    "0vw0b815slvfqfd8qffyfzb3xfvyv6k77m12xp0l67hs8p08s5b7"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "latex/amscls")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/amscls/") #t))))))
 +      (home-page "https://www.ctan.org/pkg/amscls")
 +      (synopsis "AMS document classes for LaTeX")
 +      (description
 +       "This bundle contains three AMS classes: @code{amsartamsart} (for writing
  articles for the AMS), @code{amsbookamsbook} (for books) and
  @code{amsprocamsproc} (for proceedings), together with some supporting
  material.  The material is made available as part of the AMS-LaTeX
  distribution.")
 -    (license license:lppl1.3c+)))
 +      (license license:lppl1.3c+))))
  
 -(define-public texlive-latex-babel
 -  (package
 -    (name "texlive-latex-babel")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "latex" "babel"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "1rwqq841i1rxywymzwkw0cw2yhgvxwjx5mgygfasvypwrwll6f6s"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     '(#:tex-directory "generic/babel"
 -       #:phases
 -       (modify-phases %standard-phases
 -         ;; This package tries to produce babel.aux twice but refuses to
 -         ;; overwrite the first one.
 -         (add-before 'build 'fix-ins
 -           (lambda _
 -             (substitute* "babel.ins"
 -               (("askonceonly") "askforoverwritefalse"))
 -             #t)))))
 -    (home-page "https://www.ctan.org/pkg/babel")
 -    (synopsis "Multilingual support for Plain TeX or LaTeX")
 -    (description
 -     "The package manages culturally-determined typographical (and other)
 +(define-deprecated-package texlive-latex-amscls texlive-amscls)
 +
 +(define-public texlive-babel
 +  (let ((template (simple-texlive-package
 +                   "texlive-babel"
 +                   (list "/doc/latex/babel/"
 +                         "/source/latex/babel/"
 +                         "/makeindex/babel/")
 +                   (base32
 +                    "0qr5vjp79g1c1l6k173qhfdfabgbky73wymzhm56pazx4a8r08wz"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "generic/babel")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/babel/") #t))
 +             ;; This package tries to produce babel.aux twice but refuses to
 +             ;; overwrite the first one.
 +             (add-before 'build 'fix-ins
 +               (lambda _
 +                 (substitute* "babel.ins"
 +                   (("askonceonly") "askforoverwritefalse"))
 +                 #t))
 +             (add-after 'install 'install-locales
 +               (lambda* (#:key outputs #:allow-other-keys)
 +                 (let ((locale-directory
 +                        (string-append (assoc-ref outputs "out")
 +                                       "/share/texmf-dist/tex/generic/babel/locale/")))
 +                   (mkdir-p locale-directory)
 +                   (invoke "unzip" "locale.zip" "-d"
 +                           locale-directory))))))))
 +      (native-inputs
 +       `(("unzip" ,unzip)))
 +      (home-page "https://www.ctan.org/pkg/babel")
 +      (synopsis "Multilingual support for Plain TeX or LaTeX")
 +      (description
 +       "The package manages culturally-determined typographical (and other)
  rules, and hyphenation patterns for a wide range of languages.  A document may
  select a single language to be supported, or it may select several, in which
  case the document may switch from one language to another in a variety of
  ways.  Babel uses contributed configuration files that provide the detail of
  what has to be done for each language.  Users of XeTeX are advised to use the
  polyglossia package rather than Babel.")
 -    (license license:lppl1.3+)))
 +      (license license:lppl1.3+))))
 +
 +(define-deprecated-package texlive-latex-babel texlive-babel)
  
  (define-public texlive-generic-babel-english
    (package
@@@ -3801,7 -3553,7 +3801,7 @@@ for Canadian and USA text."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "129f9w41cb6yyrr6kpv3zz9ml6334hyq1wcz7j9jn47p0hlxqfk8"))))
 +                "1x9hnr9gz5mqdb97cinivn9xjnfr4qi996aa4cnr2sm2dsbhqxnp"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "generic/babel-german"))
      (home-page "https://www.ctan.org/pkg/babel-german")
@@@ -3819,7 -3571,7 +3819,7 @@@ Swiss varieties of German."
                     "texlive-babel-swedish"
                     (list "/source/generic/babel-swedish/")
                     (base32
 -                    "0swdg2l5i7cbcvy4q4xgsnwwnbxiyvs6f5b72kiw7mjn24v27g8f"))))
 +                    "03rp4n9wkqyckman765r8v8j2pg5fg9frbfxsnhq0i2mr0yhbr6v"))))
      (package
        (inherit template)
        (arguments
@@@ -3862,133 -3614,67 +3862,133 @@@ T2* and X2 encodings. These encodings c
  language that is written in a Cyrillic alphabet.")
      (license license:lppl1.3c+)))
  
 -(define-public texlive-latex-psnfss
 -  (package
 -    (name "texlive-latex-psnfss")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "latex" "psnfss"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
 -    (build-system texlive-build-system)
 -    (arguments '(#:tex-directory "latex/psnfss"))
 -    (home-page "https://www.ctan.org/pkg/psnfss")
 -    (synopsis "Font support for common PostScript fonts")
 -    (description
 -     "The PSNFSS collection includes a set of files that provide a complete
 -working setup of the LaTeX font selection scheme (NFSS2) for use with common
 -PostScript fonts.  It covers the so-called \"Base\" fonts (which are built
 -into any Level 2 PostScript printing device and the Ghostscript interpreter)
 -and a number of free fonts.  It provides font definition files, macros and
 -font metrics.  The bundle as a whole is part of the LaTeX required set of
 -packages.")
 -    (license license:lppl1.2+)))
 -
 -;; TODO: this should supersede texlive-latex-psnfss, but we can't do this
 -;; before the next rebuild cycle.
  (define-public texlive-psnfss
    (let ((template (simple-texlive-package
                     "texlive-psnfss"
                     (list "/doc/latex/psnfss/"
                           "/source/latex/psnfss/"
                           "/fonts/map/dvips/psnfss/"
 -                         ;; Only the sty files are generated.  We need all the .fd
 -                         ;; files.
 -                         "/tex/latex/psnfss/")
 +
 +                         ;; Only the .sty files are generated from the sources.
 +                         "/tex/latex/psnfss/8rbch.fd"
 +                         "/tex/latex/psnfss/8rpag.fd"
 +                         "/tex/latex/psnfss/8rpbk.fd"
 +                         "/tex/latex/psnfss/8rpcr.fd"
 +                         "/tex/latex/psnfss/8rphv.fd"
 +                         "/tex/latex/psnfss/8rpnc.fd"
 +                         "/tex/latex/psnfss/8rppl.fd"
 +                         "/tex/latex/psnfss/8rptm.fd"
 +                         "/tex/latex/psnfss/8rput.fd"
 +                         "/tex/latex/psnfss/8rpzc.fd"
 +                         "/tex/latex/psnfss/omlbch.fd"
 +                         "/tex/latex/psnfss/omlpag.fd"
 +                         "/tex/latex/psnfss/omlpbk.fd"
 +                         "/tex/latex/psnfss/omlpcr.fd"
 +                         "/tex/latex/psnfss/omlphv.fd"
 +                         "/tex/latex/psnfss/omlpnc.fd"
 +                         "/tex/latex/psnfss/omlppl.fd"
 +                         "/tex/latex/psnfss/omlptm.fd"
 +                         "/tex/latex/psnfss/omlptmcm.fd"
 +                         "/tex/latex/psnfss/omlput.fd"
 +                         "/tex/latex/psnfss/omlpzc.fd"
 +                         "/tex/latex/psnfss/omlzplm.fd"
 +                         "/tex/latex/psnfss/omlzpple.fd"
 +                         "/tex/latex/psnfss/omlztmcm.fd"
 +                         "/tex/latex/psnfss/omsbch.fd"
 +                         "/tex/latex/psnfss/omspag.fd"
 +                         "/tex/latex/psnfss/omspbk.fd"
 +                         "/tex/latex/psnfss/omspcr.fd"
 +                         "/tex/latex/psnfss/omsphv.fd"
 +                         "/tex/latex/psnfss/omspnc.fd"
 +                         "/tex/latex/psnfss/omsppl.fd"
 +                         "/tex/latex/psnfss/omsptm.fd"
 +                         "/tex/latex/psnfss/omsput.fd"
 +                         "/tex/latex/psnfss/omspzc.fd"
 +                         "/tex/latex/psnfss/omspzccm.fd"
 +                         "/tex/latex/psnfss/omszplm.fd"
 +                         "/tex/latex/psnfss/omszpple.fd"
 +                         "/tex/latex/psnfss/omsztmcm.fd"
 +                         "/tex/latex/psnfss/omxpsycm.fd"
 +                         "/tex/latex/psnfss/omxzplm.fd"
 +                         "/tex/latex/psnfss/omxzpple.fd"
 +                         "/tex/latex/psnfss/omxztmcm.fd"
 +                         "/tex/latex/psnfss/ot1bch.fd"
 +                         "/tex/latex/psnfss/ot1pag.fd"
 +                         "/tex/latex/psnfss/ot1pbk.fd"
 +                         "/tex/latex/psnfss/ot1pcr.fd"
 +                         "/tex/latex/psnfss/ot1phv.fd"
 +                         "/tex/latex/psnfss/ot1pnc.fd"
 +                         "/tex/latex/psnfss/ot1ppl.fd"
 +                         "/tex/latex/psnfss/ot1pplj.fd"
 +                         "/tex/latex/psnfss/ot1pplx.fd"
 +                         "/tex/latex/psnfss/ot1ptm.fd"
 +                         "/tex/latex/psnfss/ot1ptmcm.fd"
 +                         "/tex/latex/psnfss/ot1put.fd"
 +                         "/tex/latex/psnfss/ot1pzc.fd"
 +                         "/tex/latex/psnfss/ot1zplm.fd"
 +                         "/tex/latex/psnfss/ot1zpple.fd"
 +                         "/tex/latex/psnfss/ot1ztmcm.fd"
 +                         "/tex/latex/psnfss/t1bch.fd"
 +                         "/tex/latex/psnfss/t1pag.fd"
 +                         "/tex/latex/psnfss/t1pbk.fd"
 +                         "/tex/latex/psnfss/t1pcr.fd"
 +                         "/tex/latex/psnfss/t1phv.fd"
 +                         "/tex/latex/psnfss/t1pnc.fd"
 +                         "/tex/latex/psnfss/t1ppl.fd"
 +                         "/tex/latex/psnfss/t1pplj.fd"
 +                         "/tex/latex/psnfss/t1pplx.fd"
 +                         "/tex/latex/psnfss/t1ptm.fd"
 +                         "/tex/latex/psnfss/t1put.fd"
 +                         "/tex/latex/psnfss/t1pzc.fd"
 +                         "/tex/latex/psnfss/ts1bch.fd"
 +                         "/tex/latex/psnfss/ts1pag.fd"
 +                         "/tex/latex/psnfss/ts1pbk.fd"
 +                         "/tex/latex/psnfss/ts1pcr.fd"
 +                         "/tex/latex/psnfss/ts1phv.fd"
 +                         "/tex/latex/psnfss/ts1pnc.fd"
 +                         "/tex/latex/psnfss/ts1ppl.fd"
 +                         "/tex/latex/psnfss/ts1pplj.fd"
 +                         "/tex/latex/psnfss/ts1pplx.fd"
 +                         "/tex/latex/psnfss/ts1ptm.fd"
 +                         "/tex/latex/psnfss/ts1put.fd"
 +                         "/tex/latex/psnfss/ts1pzc.fd"
 +                         "/tex/latex/psnfss/ufplm.fd"
 +                         "/tex/latex/psnfss/ufplmbb.fd"
 +                         "/tex/latex/psnfss/upsy.fd"
 +                         "/tex/latex/psnfss/upzd.fd")
                     (base32
 -                    "04y7v4bghpzky6c3l6qadx7s47m69jh1y615g91rxcn8z3r190di")
 -                   #:trivial? #false)))
 +                    "11f14dzhwsy4pli21acccip43d36nf3pac33ihjffnps1i2mhqkd"))))
      (package
        (inherit template)
        (arguments
         (substitute-keyword-arguments (package-arguments template)
 -         ((#:tex-directory _ '())
 +         ((#:tex-directory _ #t)
            "latex/psnfss")
           ((#:phases phases)
            `(modify-phases ,phases
               (add-after 'unpack 'chdir
 -               (lambda _ (chdir "source/latex/psnfss")))))))
 +               (lambda _
 +                 (chdir "source/latex/psnfss") #t))))))
 +      (native-inputs
 +       `(("texlive-cm" ,texlive-cm)))
        (home-page "https://www.ctan.org/pkg/psnfss")
        (synopsis "Font support for common PostScript fonts")
        (description
         "The PSNFSS collection includes a set of files that provide a complete
  working setup of the LaTeX font selection scheme (NFSS2) for use with common
 -PostScript fonts.  It covers the so-called \"Base\" fonts (which are built
 -into any Level 2 PostScript printing device and the Ghostscript interpreter)
 -and a number of free fonts.  It provides font definition files, macros and
 -font metrics.  The bundle as a whole is part of the LaTeX required set of
 -packages.")
 +PostScript fonts.  The base set of text fonts covered by PSNFSS includes the
 +AvantGarde, Bookman, Courier, Helvetica, New Century Schoolbook, Palatino,
 +Symbol, Times Roman and Zapf Dingbats fonts.  In addition, the fonts Bitstream
 +Charter and Adobe Utopia are covered.  Separate packages are provided to load
 +each font for use as the main text font.  The package @code{helvet} allows
 +Helvetica to be loaded with its size scaled to something more appropriate for
 +use as a Sans-Serif font to match Times, while @code{pifont} provides the
 +means to select single glyphs from symbol fonts.  The bundle as a whole is
 +part of the LaTeX required set of packages.")
        (license license:lppl1.2+))))
  
 +(define-deprecated-package texlive-latex-psnfss texlive-psnfss)
 +
  ;; For user profiles
  (define-public texlive-base
    (let ((default-packages
                  texlive-dvips
                  texlive-fontname
                  texlive-cm
 +                texlive-cm-super ; to avoid bitmap fonts
                  texlive-fonts-latex
 -                texlive-metafont-base
 +                texlive-metafont
                  texlive-latex-base
 +                texlive-kpathsea       ;for mktex.opt
                  ;; LaTeX packages from the "required" set.
                  texlive-latex-amsmath
 -                texlive-latex-amscls
 -                texlive-latex-babel
 +                texlive-amscls
 +                texlive-babel
                  texlive-generic-babel-english
                  texlive-latex-cyrillic
                  texlive-latex-graphics
 -                texlive-latex-psnfss
 +                texlive-psnfss
                  texlive-latex-tools
                  texlive-tetex)))
      (package
@@@ -4036,86 -3720,144 +4036,86 @@@ It includes little more than the requir
                       '()
                       default-packages)))))
  
 -(define-public texlive-default-updmap.cfg
 -  (origin
 -    (method url-fetch)
 -    (uri (string-append "https://tug.org/svn/texlive/tags/"
 -                        %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
 -                        "?revision=" (number->string %texlive-revision)))
 -    (file-name (string-append "updmap.cfg-"
 -                              (number->string %texlive-revision)))
 -    (sha256
 -     (base32
 -      "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))
 -
 -;; For use in package definitions only
 -(define-public texlive-union
 +;;; TODO: Add a TeX Live profile hook computing fonts maps (and others?)
 +;;; configuration from the packages in the profile, similar to what's done
 +;;; below.
 +(define-public texlive-updmap.cfg
    (lambda* (#:optional (packages '()))
 -    "Return 'texlive-union' package which is a union of PACKAGES and the
 -standard LaTeX packages."
 +    "Return a 'texlive-updmap.cfg' package which contains the fonts map
 +configuration of a base set of packages plus PACKAGES."
      (let ((default-packages (match (package-propagated-inputs texlive-base)
                                (((labels packages) ...) packages))))
 -      (package (inherit texlive-base)
 -        (name "texlive-union")
 -        (build-system trivial-build-system)
 +      (package
 +        (version (number->string %texlive-revision))
 +        (source (origin
 +                  (method url-fetch)
 +                  (uri (string-append "https://tug.org/svn/texlive/tags/"
 +                                      %texlive-tag
 +                                      "/Master/texmf-dist/web2c/updmap.cfg"
 +                                      "?revision=" version))
 +                  (file-name "updmap.cfg")
 +                  (sha256
 +                   (base32
 +                    "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
 +        (name "texlive-updmap.cfg")
 +        (build-system copy-build-system)
          (arguments
 -         '(#:modules ((guix build union)
 +         '(#:modules ((guix build copy-build-system)
                        (guix build utils)
 -                      (guix build texlive-build-system)
 -                      (guix build gnu-build-system)
 -                      (guix build gremlin)
 -                      (guix elf))
 -           #:builder
 -           (begin
 -             (use-modules (ice-9 match)
 -                          (ice-9 popen)
 -                          (srfi srfi-26)
 -                          (guix build union)
 -                          (guix build utils)
 -                          (guix build texlive-build-system))
 -             (let* ((out       (assoc-ref %outputs "out"))
 -                    (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
 -               ;; Build a modifiable union of all inputs (but exclude bash and
 -               ;; the updmap.cfg file)
 -               (match (filter (match-lambda
 -                                ((name . _)
 -                                 (not (member name '("bash"
 -                                                     "coreutils"
 -                                                     "sed"
 -                                                     "updmap.cfg")))))
 -                              %build-inputs)
 -                 (((names . directories) ...)
 -                  (union-build (assoc-ref %outputs "out")
 -                               directories
 -                               #:create-all-directories? #t
 -                               #:log-port (%make-void-port "w"))))
 -
 -               ;; The configuration file "texmf.cnf" is provided by the
 -               ;; "texlive-bin" package.  We take it and override only the
 -               ;; setting for TEXMFROOT and TEXMF.  This file won't be consulted
 -               ;; by default, though, so we still need to set TEXMFCNF.
 -               (substitute* texmf.cnf
 -                 (("^TEXMFROOT = .*")
 -                  (string-append "TEXMFROOT = " out "/share\n"))
 -                 (("^TEXMF = .*")
 -                  "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
 -               (setenv "PATH" (string-append
 -                               (assoc-ref %build-inputs "bash") "/bin:"
 -                               (assoc-ref %build-inputs "coreutils") "/bin:"
 -                               (assoc-ref %build-inputs "sed") "/bin:"
 -                               (string-append out "/bin")))
 -               (for-each
 -                (cut wrap-program <>
 -                     `("TEXMFCNF" ":" suffix (,(dirname texmf.cnf)))
 -                     `("TEXMF"    ":" suffix (,(string-append out "/share/texmf-dist"))))
 -                (find-files (string-append out "/bin") ".*"))
 -
 -               ;; Remove invalid maps from config file.
 -               (let ((web2c (string-append out "/share/texmf-config/web2c/"))
 -                     (maproot (string-append out "/share/texmf-dist/fonts/map/")))
 -                 (mkdir-p web2c)
 -                 (copy-file
 -                  (assoc-ref %build-inputs "updmap.cfg")
 -                  (string-append web2c "updmap.cfg"))
 -                 (make-file-writable (string-append web2c "updmap.cfg"))
 +                      (ice-9 popen)
 +                      (ice-9 textual-ports))
 +           #:install-plan '(("updmap.cfg" "share/texmf-config/web2c/")
 +                            ("map" "share/texmf-dist/fonts/map"))
 +           #:phases
 +           (modify-phases %standard-phases
 +             (add-before 'install 'regenerate-updmap.cfg
 +               (lambda _
 +                 (make-file-writable "updmap.cfg")
  
 +                 ;; Disable unavailable map files.
                   (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
                                            "--syncwithtrees"
                                            "--nohash"
 -                                          (string-append "--cnffile=" web2c "updmap.cfg"))))
 +                                          "--cnffile" "updmap.cfg")))
                     (display "Y\n" port)
                     (when (not (zero? (status:exit-val (close-pipe port))))
                       (error "failed to filter updmap.cfg")))
 +
 +                 ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails
 +                 ;; if it cannot create its log file there.
 +                 (setenv "TEXMFSYSVAR" (getcwd))
 +
                   ;; Generate maps.
                   (invoke "updmap-sys"
 -                         (string-append "--cnffile=" web2c "updmap.cfg")
 -                         (string-append "--dvipdfmxoutputdir="
 -                                        maproot "dvipdfmx/updmap/")
 -                         (string-append "--dvipsoutputdir="
 -                                        maproot "dvips/updmap/")
 -                         (string-append "--pdftexoutputdir="
 -                                        maproot "pdftex/updmap/"))
 -                 ;; Having this file breaks all file lookups later.
 -                 (delete-file (string-append out "/share/texmf-dist/ls-R")))
 -               #t))))
 -        (inputs
 -         `(("bash" ,bash)
 -           ,@(map (lambda (package)
 -                    (list (package-name package) package))
 -                  (append default-packages packages))))
 -        (native-inputs
 -         `(("coreutils" ,coreutils)
 -           ("sed" ,sed)
 -           ("updmap.cfg"
 -            ,(origin
 -               (method url-fetch)
 -               (uri (string-append "https://tug.org/svn/texlive/tags/"
 -                                   %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
 -                                   "?revision=" (number->string %texlive-revision)))
 -               (file-name (string-append "updmap.cfg-"
 -                                         (number->string %texlive-revision)))
 -               (sha256
 -                (base32
 -                 "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))))
 +                         "--cnffile"           "updmap.cfg"
 +                         "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
 +                         "--dvipsoutputdir"    "map/dvips/updmap/"
 +                         "--pdftexoutputdir"   "map/pdftex/updmap/"))))))
 +        (propagated-inputs (map (lambda (package)
 +                                  (list (package-name package) package))
 +                                (append default-packages packages)))
          (home-page (package-home-page texlive-bin))
 -        (synopsis "Union of TeX Live packages")
 -        (description "This package provides a subset of the TeX Live
 -distribution.")
 -        (license (fold (lambda (package result)
 -                         (match (package-license package)
 -                           ((lst ...)
 -                            (append lst result))
 -                           ((? license:license? license)
 -                            (cons license result))))
 -                       '()
 -                       (append default-packages packages)))))))
 +        (synopsis "TeX Live fonts map configuration")
 +        (description "This package contains the fonts map configuration file
 +generated for the base TeX Live packages as well as, optionally, user-provided
 +ones.")
 +        (license (delete-duplicates
 +                  (fold (lambda (package result)
 +                          (match (package-license package)
 +                            ((lst ...)
 +                             (append lst result))
 +                            ((? license:license? license)
 +                             (cons license result))))
 +                        '()
 +                        (append default-packages packages))))))))
 +
 +(define-deprecated/alias texlive-union texlive-updmap.cfg)
 +(export texlive-union)
  
  ;; For use in package definitions only
  (define-public texlive-tiny
    (package
 -    (inherit (texlive-union))
 +    (inherit (texlive-updmap.cfg))
      (name "texlive-tiny")
      (description "This is a very limited subset of the TeX Live distribution.
  It includes little more than the required set of LaTeX packages.")))
                      "/fonts/type1/public/tipa/"
                      "/tex/latex/tipa/")
                (base32
 -               "1h53dscv8z6fsa0ax5dys3x11b2f1g60l22hpdf7c88cvdhcs8sn")
 +               "0cqzf8vb10b8jw99m9gflskxa4c3rpiznxglix6chl5lai5sgw44")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/tipa")
      (synopsis "Fonts and macros for IPA phonetics characters")
@@@ -4275,7 -4017,7 +4275,7 @@@ package."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1zyl2pcz2x529gzj5m93a1s4ipymdabf7qdjl3l1673pizd4hfyv"))))
 +                "0rhn74ywv000b89w8qjf1i0qsk6kd1mjapfwis14jwjvbjqgvj95"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/draftwatermark"))
      (home-page "https://www.ctan.org/pkg/draftwatermark")
@@@ -4339,37 -4081,6 +4339,37 @@@ for a variety of alignment purposes, a
  also provided.")
      (license license:lppl1.3+)))
  
 +(define-public texlive-latex-etoc
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-etoc"
 +              '("/doc/latex/etoc/README.md"
 +                "/doc/latex/etoc/etoc.pdf"
 +                "/tex/latex/etoc/")
 +              (base32
 +               "0198cn75m1y8ggbfv1qlnif0d9275f6mxqsansyqw4np0rv6q9sv")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/etoc")
 +    (synopsis "Completely customisable TOCs")
 +    (description
 +     "This package gives the user complete control of how the entries of
 +the table of contents should be constituted from the name, number, and page
 +number of each sectioning unit.  The layout is controlled by the definition
 +of ‘line styles’ for each sectioning level used in the document.
 +
 +The package provides its own custom line styles (which may be used as
 +examples), and continues to support the standard formatting inherited from
 +the LaTeX document classes, but the package can also allow the user to
 +delegate the details to packages dealing with list making environments (such
 +as enumitem).  The package’s default global style typesets tables of contents
 +in a multi-column format, with either a standard heading, or a ruled title
 +(optionally with a frame around the table).
 +
 +The @code{\\tableofcontents} command may be used arbitrarily many times in
 +the same document, while @code{\\localtableofcontents} provides a ‘local’
 +table of contents.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-expdlist
    (package
      (name "texlive-latex-expdlist")
@@@ -4424,23 -4135,8 +4424,23 @@@ mode.  The functionality is provided b
  but non-expandable ones.")
      (license license:lppl1.3+)))
  
 -(define-public texlive-latex-filemod
 -  (deprecated-package "texlive-latex-filemod" texlive-filemod))
 +(define-deprecated-package texlive-latex-filemod texlive-filemod)
 +
 +(define-public texlive-latex-hanging
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-hanging"
 +              '("/tex/latex/hanging/")
 +              (base32
 +               "0s86yaxyfv9zxf4svwg9s13by9vrw38apfg0hsfchsimsdd6gsbb")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/hanging")
 +    (synopsis "Typeset hanging paragraphs")
 +    (description
 +     "The @code{hanging} package facilitates the typesetting of hanging
 +paragraphs.  The package also enables typesetting with hanging punctuation,
 +by making punctuation characters active.")
 +    (license license:lppl1.3c+)))
  
  (define-public texlive-latex-ifplatform
    (package
@@@ -4491,42 -4187,6 +4491,42 @@@ that are compatible with @code{natbib}
  designed from the start to be compatible with @code{natbib}.")
      (license license:lppl)))
  
 +(define-public texlive-latex-newunicodechar
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-newunicodechar"
 +              '("/doc/latex/newunicodechar/" "/tex/latex/newunicodechar/")
 +              (base32
 +               "0pwx3ylhvk5hxjnalas00grrbwla79j424i27hrm0zgflq7wsbrj")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/newunicodechar")
 +    (synopsis "Definitions of the meaning of Unicode characters")
 +    (description
 +     "This package provides a friendly interface for defining the meaning of
 +Unicode characters.  The document should be processed by (pdf)LaTeX with the
 +Unicode option of @code{inputenc} or @code{inputenx}, or by XeLaTeX/LuaLaTeX.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-latex-pdftexcmds
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-pdftexcmds"
 +              '("/doc/generic/pdftexcmds/"
 +                "/tex/generic/pdftexcmds/")
 +              (base32
 +               "1hph0djbfc8hlwfc41rzlf8l3ccyyvc0n7a0qdrr9881jwd6iv1b")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-iftex" ,texlive-generic-iftex)
 +       ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
 +       ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)))
 +    (home-page "https://www.ctan.org/pkg/pdftexcmds")
 +    (synopsis "LuaTeX support for pdfTeX utility functions")
 +    (description
 +     "This package makes a number of utility functions from pdfTeX
 +available for luaTeX by reimplementing them using Lua.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-psfrag
    (package
      (name "texlive-latex-psfrag")
@@@ -4563,11 -4223,11 +4563,11 @@@ rotated."
                #:trivial? #t))
      (propagated-inputs
       `(("texlive-latex-bigfoot" ,texlive-latex-bigfoot) ; for suffix
 -       ("texlive-latex-filemod" ,texlive-latex-filemod)
 +       ("texlive-filemod" ,texlive-filemod)
         ("texlive-latex-graphics" ,texlive-latex-graphics)
         ("texlive-latex-ifplatform" ,texlive-latex-ifplatform)
         ("texlive-latex-l3kernel" ,texlive-latex-l3kernel) ; for expl3
 -       ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
 +       ("texlive-oberdiek" ,texlive-oberdiek)
         ("texlive-latex-psfrag" ,texlive-latex-psfrag)
         ("texlive-latex-tools" ,texlive-latex-tools) ; for shellesc
         ("texlive-latex-trimspaces" ,texlive-latex-trimspaces)
@@@ -4581,26 -4241,8 +4581,26 @@@ drastically speeding up compilation tim
  re-processing.")
      (license license:lppl)))
  
 -(define-public texlive-latex-pstool
 -  (deprecated-package "texlive-latex-pstool" texlive-pstool))
 +(define-deprecated-package texlive-latex-pstool texlive-pstool)
 +
 +(define-public texlive-latex-refcount
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-refcount"
 +              (list "/doc/latex/refcount/"
 +                    "/tex/latex/refcount/")
 +              (base32
 +               "0pkmqj2qihndlv3ks33xzqw91q46jx79r3aygj68d8dflyddi583")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/refcount")
 +    (synopsis "Counter operations with label references")
 +    (description
 +     "This package provides the @code{\\setcounterref} and
 +@code{\\addtocounterref} commands which use the section (or other) number
 +from the reference as the value to put into the counter.  It also provides
 +@code{\\setcounterpageref} and @code{\\addtocounterpageref} that do the
 +corresponding thing with the page reference of the label.")
 +    (license license:lppl1.3c+)))
  
  (define-public texlive-seminar
    (package
                (list "/doc/latex/seminar/"
                      "/tex/latex/seminar/")
                (base32
 -               "1clgw5xy867khzfn8d210rc5hsw5s7r0pznhk84niybvw4zc7r3f")
 +               "1clgw5xy867khzfn8d210rc5hsw5s7r0pznhk84niybvw4zc7r3f")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/seminar")
 +    (synopsis "Make overhead slides")
 +    ;; TODO: This package may need fancybox and xcomment at runtime.
 +    (description
 +     "This package provides a class that produces overhead
 +slides (transparencies), with many facilities.  Seminar is not nowadays
 +reckoned a good basis for a presentation — users are advised to use more
 +recent classes such as powerdot or beamer, both of which are tuned to
 +21st-century presentation styles.")
 +    (license license:lppl1.2+)))
 +
 +(define-deprecated-package texlive-latex-seminar texlive-seminar)
 +
 +(define-public texlive-latex-stackengine
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-stackengine"
 +              (list "/doc/latex/stackengine/"
 +                    "/tex/latex/stackengine/")
 +              (base32
 +               "1rbw3dmb6kl3wlnpxacr8cmp2ivac1kpnb33k7r5s3lp1q59ck38")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/stackengine")
 +    (synopsis "Customised stacking of objects")
 +    (description
 +     "The package provides a versatile way to stack objects vertically in a
 +variety of customizable ways.  A number of useful macros are provided, all
 +of which make use of the @code{stackengine} core.")
 +    (license license:lppl1.3+)))
 +
 +(define-public texlive-latex-tocloft
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-tocloft"
 +              '("/doc/latex/tocloft/" "/tex/latex/tocloft/")
 +              (base32
 +               "0mg3hpzq7wpm6mnnvb0rp3wby56zyxkyai8d2h3f4vk93zrc6awk")
                #:trivial? #t))
 -    (home-page "https://www.ctan.org/pkg/seminar")
 -    (synopsis "Make overhead slides")
 -    ;; TODO: This package may need fancybox and xcomment at runtime.
 +    (home-page "https://www.ctan.org/pkg/tocloft")
 +    (synopsis "Control table of contents")
      (description
 -     "This package provides a class that produces overhead
 -slides (transparencies), with many facilities.  Seminar is not nowadays
 -reckoned a good basis for a presentation — users are advised to use more
 -recent classes such as powerdot or beamer, both of which are tuned to
 -21st-century presentation styles.")
 -    (license license:lppl1.2+)))
 -
 -(define-public texlive-latex-seminar
 -  (deprecated-package "texlive-latex-seminar" texlive-seminar))
 +     "This package provides control over the typography of the
 +@dfn{Table of Contents}, @dfn{List of Figures} and @dfn{List of Tables},
 +and the ability to create new ‘List of ...’. The ToC @code{\\parskip} may
 +be changed. ")
 +    (license license:lppl1.3c+)))
  
  (define-public texlive-latex-trimspaces
    (package
@@@ -4746,7 -4355,8 +4746,7 @@@ hyperlink to the target of the DOI."
      ;; Any version of the LPPL.
      (license license:lppl1.3+)))
  
 -(define-public texlive-latex-doi
 -  (deprecated-package "texlive-latex-doi" texlive-doi))
 +(define-deprecated-package texlive-latex-doi texlive-doi)
  
  (define-public texlive-etoolbox
    (package
                (list "/doc/latex/etoolbox/"
                      "/tex/latex/etoolbox/")
                (base32
 -               "1cc1vw1ach55g4ff4x30by8k1mg01w199ccxvn72f5khlnnxial0")
 +               "070iaj540rglf0c80l0hjkwg6aa7qyskhh4iwyhf7n8vrg5cjjab")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/etoolbox")
      (synopsis "e-TeX tools for LaTeX")
@@@ -4769,7 -4379,8 +4769,7 @@@ some LaTeX kernel commands; nevertheles
  of the LaTeX kernel.")
      (license license:lppl1.3+)))
  
 -(define-public texlive-latex-etoolbox
 -  (deprecated-package "texlive-latex-etoolbox" texlive-etoolbox))
 +(define-deprecated-package texlive-latex-etoolbox texlive-etoolbox)
  
  (define-public texlive-latex-fncychap
    (package
@@@ -4929,11 -4540,11 +4929,11 @@@ BibLaTeX, and is considered experimenta
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0a8f38c2ds1flxcr0apdpyaaz3k6fyalz6dkbrmcv9srjc40mh3n"))))
 +                "0a9nrmiwksnpa6iaapirqid974ai56qgin2n4h9mggy9v8gp7r71"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/geometry"))
      (propagated-inputs
 -     `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek))) ;for ifpdf
 +     `(("texlive-oberdiek" ,texlive-oberdiek))) ;for ifpdf
      (home-page "https://www.ctan.org/pkg/geometry")
      (synopsis "Flexible and complete interface to document dimensions")
      (description
@@@ -4980,7 -4591,7 +4980,7 @@@ array environments; verbatim handling; 
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0na7v4hsyx5s67cpjj2dbnq8j67k8lln6b19hmj631gfs27slss1"))))
 +                "1ci6hr8hx4g2x359n6wqvw6w8fv42cjjpzxxxd3pn6av5nkaiav3"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/polyglossia"))
      (home-page "https://www.ctan.org/pkg/polyglossia")
@@@ -5000,7 -4611,7 +5000,7 @@@ and XeLaTeX; it relies on the @code{fon
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
 +                "19fd0bqxjkzc16bza3w20pnsc90gbhbllm244b3h6sink4dlnn54"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/supertabular"))
      (home-page "https://www.ctan.org/pkg/supertabular")
@@@ -5026,7 -4637,7 +5026,7 @@@ situations where longtable has problems
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "16jy02m089m7n6v9vbfi4xjgngc1fnvsmmppk8axfwzbhdky3c9c"))))
 +                "1qcmcsxdsibca0mad559vhz36xaxsbkivgv1hc98vdyd90fg4y31"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5120,7 -4731,7 +5120,7 @@@ considered obsolete; alternatives are t
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
 +                "1gc2brr2rs495w7qi6spdva1xrza94x7a36dncjdkghnsq8r92h4"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/appendix"))
      (home-page "https://www.ctan.org/pkg/appendix")
@@@ -5133,23 -4744,6 +5133,23 @@@ environment is provided which can be us
  command.")
      (license license:lppl)))
  
 +(define-public texlive-latex-bookmark
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-bookmark"
 +              (list "/doc/latex/bookmark/"
 +                    "/tex/latex/bookmark/")
 +              (base32
 +               "0xwjdah0p4an0fknvgj9y5phl62sf522z6570pvy6c09hkz0j4h1")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/bookmark")
 +    (synopsis "Bookmark (outline) organization for hyperref")
 +    (description
 +     "This package implements a new bookmark (outline) organization for the
 +@code{hyperref} package.  Bookmark properties such as style and color.  Other
 +action types are available (URI, GoToR, Named).")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-changebar
    (package
      (name "texlive-latex-changebar")
@@@ -5187,7 -4781,7 +5187,7 @@@ drivers, and VTeX and pdfTeX."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
 +                "0m4r52gw9vwsi1pzwh0cy03jxhwizymi4a2fj3jfs5rrvh105r5y"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5217,7 -4811,7 +5217,7 @@@ copy-and-paste functions work properly.
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "16vd99p01a0y30xr5yf1z2j5da9x8gy21vb30wk08jh31zffbaqj"))))
 +                "1qa0mh0fy9hcvfsmprv6q50q0qzdjjfbxi3axap26z6zg3qj68bc"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/colortbl"))
      (home-page "https://www.ctan.org/pkg/colortbl")
@@@ -5276,7 -4870,7 +5276,7 @@@ floats, center, flushleft, and flushrig
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0hrwspqkqfahxyzzsnjyrxlgxj06zw1f3636gx76pvl4xhvdj1cj"))))
 +                "1h2zv7cps0pknqhy2dyfclyi002lmsfshm0rn6ywfl9p4fnvh0bc"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5344,24 -4938,6 +5344,24 @@@ the same place.  The package also has 
  footnotes with symbols rather than numbers.")
      (license license:lppl1.3+)))
  
 +(define-public texlive-latex-letltxmacro
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-letltxmacro"
 +              (list "/doc/latex/letltxmacro/"
 +                    "/tex/latex/letltxmacro/")
 +              (base32
 +               "0yy1m1jiyxq2pssp0pidaa2swx6lyxw3zwpm2r8m0v2r3lvsyyxx")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/letltxmacro")
 +    (synopsis "Let assignment for macros")
 +    (description
 +     "TeX’s @code{\\let} assignment does not work for LaTeX macros with
 +optional arguments, or for macros that are defined as robust macros by
 +@code{\\DeclareRobustCommand}.  This package defines @code{\\LetLtxMacro}
 +that also takes care of the involved internal macros.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-listings
    (package
      (name "texlive-latex-listings")
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1fbrhqj22vzakn30j71fc41l8nliqbv1dmxm0zlwi2qjjbq6fwav"))))
 +                "082zri3gp8s6p2difhk1pbix2vzmvsf6fmld2z78v35xwk3fiya0"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/listings"
@@@ -5425,25 -5001,6 +5425,25 @@@ transliterate semitic languages; patche
  in SGML; use maths minus in text as appropriate; simple Young tableaux.")
      (license license:gpl2)))
  
 +(define-public texlive-latex-kvoptions
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-kvoptions"
 +              (list "/doc/latex/kvoptions/"
 +                    "/tex/latex/kvoptions/")
 +              (base32
 +               "02i4n2n3j4lg68d3nam08m63kb4irc99wfhyc2z51r02lm1wwmvw")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-kvsetkeys" ,texlive-generic-kvsetkeys)
 +       ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)))
 +    (home-page "https://www.ctan.org/pkg/kvoptions")
 +    (synopsis "Key/value format for package options")
 +    (description
 +     "This package provides facilities for using key-value format in
 +package options.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-fonts-ec
    (package
      (name "texlive-fonts-ec")
           (delete 'configure)
           (replace 'build
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 +             (let ((mf (assoc-ref inputs "texlive-metafont")))
                 ;; Tell mf where to find mf.base
                 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                 ;; Tell mf where to look for source files
                 #t))))))
      (native-inputs
       `(("texlive-bin" ,texlive-bin)
 -       ("texlive-metafont-base" ,texlive-metafont-base)
 +       ("texlive-metafont" ,texlive-metafont)
         ("texlive-cm" ,texlive-cm)))
      (home-page "https://www.ctan.org/pkg/ec")
      (synopsis "Computer modern fonts in T1 and TS1 encodings")
@@@ -5564,7 -5121,7 +5564,7 @@@ via the CM-super, Latin Modern and (in 
                      "/fonts/type1/public/inconsolata/"
                      "/tex/latex/inconsolata/")
                (base32
 -               "1a77w26m4c4j0202s1qkikz7ha6cxlv8zxhzi9s3l0x1l2pl7cr2")
 +               "19lvma52vk7x8d7j4s9ymjwm3w2k08860fh6dkzn76scgpdm4wlb")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/inconsolata")
      (synopsis "Monospaced font with support files for use with TeX")
@@@ -5603,7 -5160,8 +5603,7 @@@ Adobe's basic set."
      ;; No license version specified.
      (license license:gpl3+)))
  
 -(define-public texlive-fonts-adobe-times
 -  (deprecated-package "texlive-fonts-adobe-times" texlive-times))
 +(define-deprecated-package texlive-fonts-adobe-times texlive-times)
  
  (define-public texlive-palatino
    (package
@@@ -5631,7 -5189,8 +5631,7 @@@ Adobe's basic set."
      ;; No license version specified.
      (license license:gpl3+)))
  
 -(define-public texlive-fonts-adobe-palatino
 -  (deprecated-package "texlive-fonts-adobe-palatino" texlive-palatino))
 +(define-deprecated-package texlive-fonts-adobe-palatino texlive-palatino)
  
  (define-public texlive-zapfding
    (package
@@@ -5656,7 -5215,8 +5656,7 @@@ Adobe's basic set."
      ;; No license version specified.
      (license license:gpl3+)))
  
 -(define-public texlive-fonts-adobe-zapfding
 -  (deprecated-package "texlive-fonts-adobe-zapfding" texlive-zapfding))
 +(define-deprecated-package texlive-fonts-adobe-zapfding texlive-zapfding)
  
  (define-public texlive-fonts-rsfs
    (package
           (delete 'configure)
           (replace 'build
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((mf (assoc-ref inputs "texlive-metafont-base")))
 +             (let ((mf (assoc-ref inputs "texlive-metafont")))
                 ;; Tell mf where to find mf.base
                 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
                 ;; Tell mf where to look for source files
                 #t))))))
      (native-inputs
       `(("texlive-bin" ,texlive-bin)
 -       ("texlive-metafont-base" ,texlive-metafont-base)
 +       ("texlive-metafont" ,texlive-metafont)
         ("texlive-cm" ,texlive-cm)))
      (home-page "https://www.ctan.org/pkg/rsfs")
      (synopsis "Ralph Smith's Formal Script font")
@@@ -5743,7 -5303,7 +5743,7 @@@ one of the packages @code{calrsfs} and 
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0y2y08kr3w6asm9lblj9yywqmhaal36fq71zzcbfsc7cvwf641q7"))))
 +                "12f7pbhiav4iz3rra5vq85v9f14h8j1ybi42kvnkzgjsay87p7gf"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/eso-pic"))
      (home-page "https://www.ctan.org/pkg/eso-pic")
@@@ -5805,7 -5365,7 +5805,7 @@@ splines, and filled circles and ellipse
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1vm9xp67hzif0pqab4r3ialf0cyhi0fa4p8kxgp1ymcf85pqip14"))))
 +                "1j8svflnx9w897mdavyf1f0n256wh4bbclrhv5vx7b501gmlbp7d"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5837,7 -5397,7 +5837,7 @@@ in the form @code{key=value} are availa
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "07vbcp6avdwldr870cwf65av2s9lfyzcpp8gpld53yw6lcxgaipj"))))
 +                "1kak9i6nwz6vc4xjj6lbvkb69s49pis6qynjzvsjraxbdw28y2dq"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/multirow"))
      (home-page "https://www.ctan.org/pkg/multirow")
@@@ -5862,7 -5422,7 +5862,7 @@@ entry at the \"natural\" width of its t
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1pr6ym3ad7x14ng7gmhsmywh3685d2cnm5qgyrqbigng2r6fcc1k"))))
 +                "1ygsr0rsdabj61zask3346xrwiphz5i6f1nfb9k4d3234psh09kb"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5898,7 -5458,7 +5898,7 @@@ positions; a grid for orientation is av
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0j1fhm1m9k6rz80lmch3x44g20y9nm4abaaf8czb0q8hzwlx5aq5"))))
 +                "1zll8jci8lsd7y44j567akf6y8fp2p7qq23rs527zhr0br9mn3sh"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -5928,7 -5488,7 +5928,7 @@@ designed class) helps alleviate this un
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0s4izcah7im67889qz4d26pcfpasmm35sj1rw4ragkkdk3rlbbbd"))))
 +                "140kl8r7g2ak2frjn5pmwiwibfynyfwp897r9vk8pypmn390lzr2"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/pdfpages"))
      (home-page "https://www.ctan.org/pkg/pdfpages")
@@@ -5942,47 -5502,38 +5942,47 @@@ package supports pdfTeX (pdfLaTeX) and 
  use this package to insert PostScript files, in addition to PDF files.")
      (license license:lppl1.3+)))
  
 -(define-public texlive-fonts-stmaryrd
 -  (package
 -    (name "texlive-fonts-stmaryrd")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "fonts" "stmaryrd"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "08pn4ca3vl6qm9l3wm5h5iyjsrg411kkm1yana329xwg2j14s9n6"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     '(#:tex-directory "latex/stmaryrd"
 -       #:phases
 -       (modify-phases %standard-phases
 -         (add-after 'configure 'patch-ins
 -           (lambda _
 -             (substitute* "stmaryrd.ins"
 -               (("^%% LaTeX2e.*") "\\input docstrip\n")
 -               (("fontdef\\}\\}" line)
 -                (string-append line "\n\\endbatchfile")))
 -             #t)))))
 -    (home-page "https://www.ctan.org/pkg/stmaryrd")
 -    (synopsis "St Mary Road symbols for theoretical computer science")
 -    (description
 -     "The fonts were originally distributed as Metafont sources only, but
 +(define-public texlive-stmaryrd
 +  (let ((template (simple-texlive-package
 +                   "texlive-stmaryrd"
 +                   (list "/fonts/afm/public/stmaryrd/"
 +                         "/fonts/map/dvips/stmaryrd/"
 +                         "/fonts/source/public/stmaryrd/"
 +                         "/fonts/tfm/public/stmaryrd/"
 +                         "/fonts/type1/public/stmaryrd/"
 +                         "/source/fonts/stmaryrd/"
 +                         "/doc/fonts/stmaryrd/")
 +                   (base32
 +                    "0yn0yl6x1z9ab5gb56lhvkqabd2agz3ggxifwxkiysrj5780j29z"))))
 +    (package
 +      (inherit template)
 +      (arguments (substitute-keyword-arguments (package-arguments template)
 +                   ((#:tex-directory _ #t)
 +                    "latex/stmaryrd")
 +                   ((#:phases phases)
 +                    `(modify-phases ,phases
 +                       (add-after 'unpack 'chdir
 +                         (lambda _
 +                           (chdir "source/fonts/stmaryrd")
 +                           #t))
 +                       (add-after 'chdir 'patch-ins
 +                         (lambda _
 +                           (substitute* "stmaryrd.ins"
 +                             (("^%% LaTeX2e.*") "\\input docstrip\n")
 +                             (("fontdef\\}\\}" line)
 +                              (string-append line "\n\\endbatchfile")))
 +                           #t))))))
 +      (home-page "https://www.ctan.org/pkg/stmaryrd")
 +      (synopsis "St Mary Road symbols for theoretical computer science")
 +      (description
 +       "The fonts were originally distributed as Metafont sources only, but
  Adobe Type 1 versions are also now available.  Macro support is provided for
  use under LaTeX; the package supports the @code{only} option (provided by the
  @code{somedefs} package) to restrict what is loaded, for those who don't need
  the whole font.")
 -    (license license:lppl)))
 +      (license license:lppl))))
 +
 +(define-deprecated-package texlive-fonts-stmaryrd texlive-stmaryrd)
  
  (define-public texlive-latex-subfigure
    (package
@@@ -6107,7 -5658,8 +6107,7 @@@ TeX metrics (VF and TFM files) and macr
      ;; Any version of the GPL with font exception.
      (license license:gpl3+)))
  
 -(define-public texlive-fonts-txfonts
 -  (deprecated-package "texlive-fonts-txfonts" texlive-txfonts))
 +(define-deprecated-package texlive-fonts-txfonts texlive-txfonts)
  
  (define-public texlive-fonts-iwona
    (package
@@@ -6156,11 -5708,13 +6156,11 @@@ of ink traps which typify the Kurier fo
      (inherit (simple-texlive-package
                "texlive-jknappen"
                (list "/fonts/source/jknappen/"
 -                    "/fonts/tfm/jknappen/"
 -                    "/fonts/source/jknappen/"
                      "/fonts/tfm/jknappen/"
                      "/tex4ht/ht-fonts/alias/jknappen/"
                      "/tex4ht/ht-fonts/unicode/jknappen/")
                (base32
 -               "1v5wk5il41bddzr81h5636h3cjz0w1qann5g9garsb7qfch9fhws")
 +               "0xvy3c845jc7iw1h9rcm1r2yvm1ni1sm9r9k9j2cfc82xy43rwij")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/jknappen")
      (synopsis "Miscellaneous packages by Jörg Knappen")
@@@ -6199,90 -5753,6 +6199,90 @@@ Simple Young tableaux
  @end table")
      (license license:gpl2)))                    ;per the 00readme_txt file.
  
 +(define-public texlive-jadetex
 +  (let ((template (simple-texlive-package
 +                   "texlive-jadetex"
 +                   (list "/doc/man/man1/jadetex.1"
 +                         "/doc/man/man1/jadetex.man1.pdf"
 +                         "/doc/man/man1/pdfjadetex.1"
 +                         "/doc/man/man1/pdfjadetex.man1.pdf"
 +                         "/source/jadetex/base/"
 +                         ;; The following files are not generated from
 +                         ;; sources.
 +                         "/tex/jadetex/base/jadetex.ini"
 +                         "/tex/jadetex/base/pdfjadetex.ini"
 +                         "/tex/jadetex/base/uentities.sty")
 +                   (base32
 +                    "03chyc3vjqgxcj985gy4k0bd0lf1n4a6sgbhc7k84jparjk3hx4i"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "jadetex/base")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'unify-source-directory
 +               (lambda _
 +                 (chdir "source/jadetex/base")
 +                 (for-each (lambda (f)
 +                             (copy-file f (basename f)))
 +                           (find-files "../../../tex/jadetex/base"))
 +                 #t))
 +             (add-after 'build 'generate-formats
 +               (lambda* (#:key inputs #:allow-other-keys)
 +                 (mkdir "web2c")
 +                 (for-each (lambda (f)
 +                             (symlink f (basename f)))
 +                           (find-files "build"))
 +                 (invoke "fmtutil-sys" "--byfmt" "jadetex"
 +                         "--fmtdir=web2c")
 +                 (invoke "fmtutil-sys" "--byfmt" "pdfjadetex"
 +                         "--fmtdir=web2c")))
 +             (add-after 'install 'install-formats-and-wrappers
 +               (lambda* (#:key inputs outputs #:allow-other-keys)
 +                 (let* ((out (assoc-ref outputs "out"))
 +                        (texlive-bin (assoc-ref inputs "texlive-bin"))
 +                        (pdftex (string-append texlive-bin "/bin/pdftex"))
 +                        (web2c (string-append out "/share/texmf-dist/web2c")))
 +                   (mkdir-p web2c)
 +                   (copy-recursively "web2c" web2c)
 +                   ;; Create convenience command wrappers.
 +                   (mkdir-p (string-append out "/bin"))
 +                   (symlink pdftex (string-append out "/bin/jadetex"))
 +                   (symlink pdftex (string-append out "/bin/pdfjadetex"))
 +                   #t)))))))
 +      (propagated-inputs
 +       ;; Propagate the texlive-updmap.cfg input used by xmltex, which provides the
 +       ;; required fonts for its use.
 +       `(("texlive-xmltex" ,texlive-xmltex)
 +         ("texlive-kpathsea" ,texlive-kpathsea))) ;for fmtutil.cnf template
 +      (native-inputs
 +       `(("texlive-cm" ,texlive-cm)     ;for cmex10 and others
 +         ("texlive-fonts-latex" ,texlive-fonts-latex) ;for lasy6
 +         ;; The t1cmr.fd file of texlive-latex-base refers to the ecrm font,
 +         ;; provided by the jknappen package collection.
 +         ("texlive-jknappen" ,texlive-jknappen)
 +         ("texlive-generic-ulem" ,texlive-generic-ulem)
 +         ("texlive-hyperref" ,texlive-hyperref)
 +         ("texlive-latex-colortbl" ,texlive-latex-colortbl)
 +         ("texlive-latex-fancyhdr" ,texlive-latex-fancyhdr)
 +         ("texlive-latex-graphics" ,texlive-latex-graphics) ;for color.sty
 +         ("texlive-latex-tools" ,texlive-latex-tools)       ;for array.sty
 +         ("texlive-marvosym" ,texlive-marvosym)
 +         ("texlive-tex-ini-files" ,texlive-tex-ini-files))) ;for pdftexconfig
 +      (home-page "https://www.ctan.org/pkg/jadetex/")
 +      (synopsis "TeX macros to produce TeX output using OpenJade")
 +      (description "JadeTeX is a companion package to the OpenJade DSSSL
 +processor.  OpenJade applies a DSSSL stylesheet to an SGML or XML document.
 +The output of this process can be in a number of forms, including a set of
 +high level LaTeX macros.  It is the task of the JadeTeX package to transform
 +these macros into DVI/PostScript (using the @command{jadetex} command) or
 +Portable Document Format (PDF) form (using the @command{pdfjadetex}
 +command).")
 +      ;; The license text is found at the header of the jadetex.dtx file.
 +      (license license:expat))))
 +
  (define-public texlive-libertine
    (package
      (inherit (simple-texlive-package
  
                      "/tex/latex/libertine/")
                (base32
 -               "1v2vimpfi0b08sd79dadrck7wkpa0bphiakwyvhjc3ygq9k5bp8k")
 +               "1d5r80isyvs2v3i8pzlhsn7ns6bn8ldkbs82g25widraixlhg6yg")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/libertine")
      (synopsis "Use Linux Libertine and Biolinum fonts with LaTeX")
@@@ -6356,7 -5826,7 +6356,7 @@@ LGR.  The package doesn't (currently) s
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "04nmkhqx6jxcxx9a30zbcd5smxi5fd0cbp132bki7fnvhspnhg21"))))
 +                "1kw7dvxvdfbf31zw0n8r0g5xak3vcdf25n33fqw93j59zpc5nvbl"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -6407,32 -5877,23 +6407,32 @@@ now contains a package @code{fix-cm},f 
  @code{ec} fonts.")
      (license license:lppl)))
  
 -(define-public texlive-latex-lh
 -  (package
 -    (name "texlive-latex-lh")
 -    (version (number->string %texlive-revision))
 -    (source (origin
 -              (method svn-fetch)
 -              (uri (texlive-ref "latex" "lh"))
 -              (file-name (string-append name "-" version "-checkout"))
 -              (sha256
 -               (base32
 -                "00gdiwh3sfhh1iimjhpja7lm7k4vzqzql2irgwnpz94qvh25zwi5"))))
 -    (build-system texlive-build-system)
 -    (arguments '(#:tex-directory "latex/lh"))
 -    (home-page "https://www.ctan.org/pkg/lh")
 -    (synopsis "Cyrillic fonts that support LaTeX standard encodings")
 -    (description
 -     "The LH fonts address the problem of the wide variety of alphabets that
 +(define-public texlive-lh
 +  (let ((template (simple-texlive-package
 +                   "texlive-lh"
 +                   (list "/doc/fonts/lh/"
 +                         "/source/fonts/lh/"
 +                         "/source/latex/lh/"
 +                         "/fonts/source/lh/"
 +                         "/tex/plain/lh/")
 +                   (base32
 +                    "0vw75i52asi5sssp8k9r8dy4ihvqbvmbsl3dini3ls8cky15lz37"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "latex/lh")
 +         ((#:build-targets _ '())
 +          ''("nfssfox.ins" "lcyfonts.ins" "ot2fonts.ins" "t2ccfonts.ins"))
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/lh") #t))))))
 +      (home-page "https://www.ctan.org/pkg/lh")
 +      (synopsis "Cyrillic fonts that support LaTeX standard encodings")
 +      (description
 +       "The LH fonts address the problem of the wide variety of alphabets that
  are written with Cyrillic-style characters.  The fonts are the original basis
  of the set of T2* and X2 encodings that are now used when LaTeX users need to
  write in Cyrillic languages.  Macro support in standard LaTeX encodings is
@@@ -6441,9 -5902,7 +6441,9 @@@ offers support for other (more traditio
  standard T2* and X2 encodings are available in Adobe Type 1 format, in the
  CM-Super family of fonts.  The package also offers its own LaTeX support for
  OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
 -    (license license:lppl)))
 +      (license license:lppl))))
 +
 +(define-deprecated-package texlive-latex-lh texlive-lh)
  
  (define-public texlive-marvosym
    (package
@@@ -6485,7 -5944,7 +6485,7 @@@ the derived Type 1 font, together with 
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1xyd57c8z1xi0kbqpbad61flcazz68i9ssxrag0gjvci3irxi8xh"))))
 +                "140k9dz2g2vj5ypgyqx3px9c1y9a820y8kq139p96lw0yk6839aw"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -6514,7 -5973,7 +6514,7 @@@ than the bitmaps Metafont creates."
                (uri (texlive-ref "latex" "acmart"))
                (sha256
                 (base32
 -                "18rl67p2zhngskisnhv78mksv8q8q658l6igkswzswldixmkpphq"))
 +                "12wxav9r6v7dlfja9myrwz7famgfpcfwd292qzmgg283xgngh9kd"))
                (file-name (string-append name "-" version "-checkout"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/acmart"))
@@@ -6568,7 -6027,7 +6568,7 @@@ get a narrower “natural” width."
                      "/tex/plain/wasy/"
                      "/doc/fonts/wasy/")
                (base32
 -               "10dxbqgv42niybj65hj6y47x8lsl83m48rgw2v2s50k05wbghwbm")
 +               "1swzxgld3lndi5q0q6zkwbw06ndh13fvp04as7zpwyhh646s0hbx")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/wasy")
      (synopsis "Waldi symbol fonts")
@@@ -6577,9 -6036,9 +6577,9 @@@ in the Metafont and Adobe Type 1 format
  the @code{wasysym} package.")
      (license license:public-domain)))
  
 -(define-public texlive-latex-wasysym
 +(define-public texlive-wasysym
    (package
 -    (name "texlive-latex-wasysym")
 +    (name "texlive-wasysym")
      (version (number->string %texlive-revision))
      (source (origin
                (method svn-fetch)
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1sgwbfwjjf70g54hh93gsd9jp9nm67w6n74x9d72a56n07jbk5hv"))))
 +                "0zxcf0pfqf439cfwl0r5dd93b0v4pbiih36n2pwshdlvnmy0nr50"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/wasysym"))
      (home-page "https://www.ctan.org/pkg/wasysym")
@@@ -6599,8 -6058,6 +6599,8 @@@ male and female symbols and astronomica
  implements an easy to use interface for these symbols.")
      (license license:lppl)))
  
 +(define-deprecated-package texlive-latex-wasysym texlive-wasysym)
 +
  (define-public texlive-latex-wrapfig
    (package
      (name "texlive-latex-wrapfig")
@@@ -6685,7 -6142,7 +6685,7 @@@ package of that name now exists."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1hpsk4yp08qvbl43kqiv0hhwxv3gcqqxcpahyv6ch2b38pbj4bh6"))))
 +                "0hnf821yvki9bzfkz79ns9m1msjp3yvd4dhf3268wrpr1zjx6w8v"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/preview"
@@@ -6717,7 -6174,7 +6717,7 @@@ files."
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0jmasg40bk53zdd2jc8nc18jvdai3p2wmamy7hwli8gls4nf25qp"))))
 +                "09pd4wynksg1y1ddxnqbhk2dc185zw5nyi794d86n3qx8l014ijy"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/acronym"))
      (home-page "https://www.ctan.org/pkg/acronym")
@@@ -6745,7 -6202,7 +6745,7 @@@ e-TeX."
                      "/tex/generic/pdftex/glyphtounicode.tex"
                      "/tex/generic/pdftex/pdfcolor.tex")
                (base32
 -               "0wsgbl0jrqc1qzgf23dla6b95lv2h8x6xvs5466d8jdrih6pwriq")
 +               "1wx928rqsv0x1a8vc7aq49w3nglr4bmlhl822slqglymfxrmb91b")
                #:trivial? #t))
      ;; TODO: add this missing package:
      ;; dehyph
  directly generate PDF documents instead of DVI.")
      (license license:gpl2+)))
  
 -(define-public texlive-generic-pdftex
 -  (deprecated-package "texlive-generic-pdftex" texlive-pdftex))
 +(define-deprecated-package texlive-generic-pdftex texlive-pdftex)
  
  (define texlive-texmf
    (package
     (name "texlive-texmf")
 -   (version "20190410")
 +   (version "20210325")
     (source texlive-texmf-src)
     (build-system gnu-build-system)
     (inputs
      `(("texlive-bin" ,texlive-bin)
        ("lua" ,lua)
        ("perl" ,perl)
 -      ("python" ,python-2) ; incompatible with Python 3 (print syntax)
 +      ("python" ,python)
        ("ruby" ,ruby)
        ("tcsh" ,tcsh)))
     (arguments
                       (share (string-append out "/share"))
                       (texmfroot (string-append share "/texmf-dist/web2c"))
                       (texmfcnf (string-append texmfroot "/texmf.cnf"))
 +                     (fmtutilcnf (string-append texmfroot "/fmtutil.cnf"))
                       (texlive-bin (assoc-ref inputs "texlive-bin"))
                       (texbin (string-append texlive-bin "/bin"))
                       (tlpkg (string-append texlive-bin "/share/tlpkg")))
 +                ;; LuaJIT is not ported to powerpc64* yet.
 +                (if ,(target-ppc64le?)
 +                    (substitute* fmtutilcnf
 +                      (("^(luajittex|luajithbtex|mfluajit)" m)
 +                       (string-append "#! " m))))
                  ;; Register SHARE as TEXMFROOT in texmf.cnf.
                  (substitute* texmfcnf
                    (("TEXMFROOT = \\$SELFAUTOPARENT")
@@@ -6852,10 -6304,10 +6852,10 @@@ This package contains the complete tre
  (define-public texlive
    (package
     (name "texlive")
 -   (version "20190410")
 +   (version "20210325")
     (source #f)
     (build-system trivial-build-system)
 -   (inputs `(("bash" ,bash) ; for wrap-program
 +   (inputs `(("bash" ,bash-minimal)     ;for wrap-program
               ("texlive-bin" ,texlive-bin)
               ("texlive-texmf" ,texlive-texmf)))
     (native-search-paths
@@@ -6915,7 -6367,7 +6915,7 @@@ This package contains the complete TeX 
  (define-public perl-text-bibtex
    (package
      (name "perl-text-bibtex")
 -    (version "0.85")
 +    (version "0.88")
      (source
       (origin
         (method url-fetch)
                             version ".tar.gz"))
         (sha256
          (base32
 -         "036kxgbn1jf70pfm2lmjlzjwnhbkd888fp5lyvmkjpdd15gla18h"))))
 +         "0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h"))))
      (build-system perl-build-system)
      (arguments
       `(#:phases
@@@ -6960,16 -6412,20 +6960,16 @@@ values (strings, macros, or numbers) pa
      ;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual
      ;; at <https://ctan.org/pkg/biblatex>.
      (name "biber")
 -    (version "2.12")
 +    (version "2.16")
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/plk/biber/")
                      (commit (string-append "v" version))))
                (file-name (git-file-name name version))
 -              ;; TODO: Patch awaiting inclusion upstream (see:
 -              ;; https://github.com/plk/biber/issues/239).
 -              (patches (search-patches "biber-fix-encoding-write.patch"
 -                                       "biber-sortinithash.patch"))
                (sha256
                 (base32
 -                "1g1hi6zvf2hmrjly1sidjaxy5440gfqm4p7p3n7kayshnjsmlskx"))))
 +                "0586q8y1f2k23mvb02ccm3qsb35cwskafksixsjaih7a7xcf5gxx"))))
      (build-system perl-build-system)
      (arguments
       `(#:phases
         ("perl-datetime-format-builder" ,perl-datetime-format-builder)
         ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
         ("perl-file-slurper" ,perl-file-slurper)
 +       ("perl-io-string" ,perl-io-string)
         ("perl-ipc-cmd" ,perl-ipc-cmd)
         ("perl-ipc-run3" ,perl-ipc-run3)
         ("perl-list-allutils" ,perl-list-allutils)
         ("perl-mozilla-ca" ,perl-mozilla-ca)
         ("perl-regexp-common" ,perl-regexp-common)
         ("perl-log-log4perl" ,perl-log-log4perl)
 -       ;; We cannot use perl-unicode-collate here, because otherwise the
 -       ;; hardcoded hashes in the tests would differ.  See
 -       ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
 -       ;;("perl-unicode-collate" ,perl-unicode-collate)
 +       ("perl-parse-recdescent" ,perl-parse-recdescent)
 +       ("perl-unicode-collate" ,perl-unicode-collate)
         ("perl-unicode-normalize" ,perl-unicode-normalize)
         ("perl-unicode-linebreak" ,perl-unicode-linebreak)
         ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
@@@ -7142,11 -6599,11 +7142,11 @@@ develop documents with LaTeX, in a sing
               (delete-file "book.pdf")
               #t)))))
      (native-inputs
 -     `(("texlive" ,(texlive-union (list texlive-amsfonts
 -                                        texlive-fonts-adobe-palatino
 -                                        texlive-fonts-adobe-zapfding
 -                                        texlive-fonts-knuth-lib
 -                                        texlive-fonts-mflogo-font
 +     `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
 +                                        texlive-palatino
 +                                        texlive-zapfding
 +                                        texlive-knuth-lib
 +                                        texlive-mflogo-font
                                          texlive-pdftex)))
         ("automake" ,automake)))
      (home-page "https://www.gnu.org/software/teximpatient/")
@@@ -7212,7 -6669,7 +7212,7 @@@ and Karl Berry."
         ("qtsvg" ,qtsvg)
         ("zlib" ,zlib)))
      (propagated-inputs
 -     `(("texlive" ,(texlive-union (list texlive-fonts-ec)))))
 +     `(("texlive" ,(texlive-updmap.cfg (list texlive-fonts-ec)))))
      (native-inputs
       `(("python" ,python)
         ("pkg-config" ,pkg-config)))
@@@ -7239,7 -6696,7 +7239,7 @@@ required: automatic sectioning and pagi
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0s86v2b6b1vky1svmmn8pn0l2gz3v280mvjbr2d9l2sjyarlgz9w"))))
 +                "0a1v70k6231323y1lazfda1y9568w8hn7c8jhc7rblkhdfv3slw7"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -7279,7 -6736,7 +7279,7 @@@ specification.  It replaces the now obs
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1yhp51w8yr10c10pc9196q7hlw80brzqinnqbjw81d0sf2p0llc5"))))
 +                "1mrz1mj59m27bfya52vi4lm84ifisaf30pmf8id1biqwcq4jyynh"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -7320,7 -6777,7 +7320,7 @@@ It also ensures compatibility with the 
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0m4wx3yjb5al1qsv995z8fii8xxy96mcfihbnlx43lpgayiwz35s"))))
 +                "04ww5abfm7dx81d21yr2gwy9jswaalnfm2384xp4cyx7srd9spfv"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/ms"
@@@ -7443,7 -6900,7 +7443,7 @@@ is preferred in many parts of the world
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
 -         "1rzdniqq9zk39w8ch8ylx3ywh2mj87s4ivchrsk2b8nx06jyn797"))))
 +         "161ka7sckiakcr1fgydxpc580sr16vp4sp3avjl2v9jn1pd2pwp0"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -7480,7 -6937,7 +7480,7 @@@ striking out (line through words) and c
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
 -         "1dscrgwyr71vgx35mzb316xl669arzagfgq50fdv3nxga63959b3"))))
 +         "1jk10rxz5f8vh46am11b40hxhhikk67h9jr3z877q5qc8kwppgza"))))
      (build-system trivial-build-system)
      (native-inputs
       `(("texlive-latex-pgf-generic"
             (file-name (string-append "texlive-latex-pgf-generic" version "-checkout"))
             (sha256
              (base32
 -             "0hk5x2j15n4pps279cmkbjl1dvhasq3mbhna5xdvp2qgh635ahks"))))))
 +             "05zdq7y3am109m5534ahqqp9x5iar3ha68v1r4zkrdly2mijxz2j"))))))
      (propagated-inputs
 -     `(("texlive-latex-xcolor" ,texlive-latex-xcolor)))
 +     `(("texlive-xcolor" ,texlive-xcolor)))
      (arguments
       `(#:modules ((guix build utils))
         #:builder
@@@ -7538,7 -6995,7 +7538,7 @@@ produce either PostScript or PDF output
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1vz9zg7s5w52xr323zgglzprfrvba2zvyzf6b8vrdf4wdghlpv4z"))))
 +                "1m6i8162r6ka19q517llrf0lax80rrsq564qirwk1chv5dqsmnfi"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -7583,165 -7040,6 +7583,165 @@@ refers to the version of scrbook, scrre
  typearea (which are the main parts of the bundle).")
      (license license:lppl1.3+)))
  
 +(define-public texlive-generic-atbegshi
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-atbegshi"
 +              '("/doc/latex/atbegshi/"
 +                "/tex/generic/atbegshi/")
 +              (base32
 +               "184fr5kd3wl44ix63lwb3ll7dhiikkyw1czbnzrl4am4rx0zh4d8")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/atbegshi")
 +    (synopsis "Execute commands at @code{\\shipout} time")
 +    (description
 +     "This package is a modern reimplementation of package @code{everyshi},
 +providing various commands to be executed before a @code{\\shipout} command.
 +It makes use of e-TeX’s facilities if they are available.  The package may
 +be used either with LaTeX or with plain TeX.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-bigintcalc
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-bigintcalc"
 +              '("/doc/latex/bigintcalc/README.md"
 +                "/tex/generic/bigintcalc/")
 +              (base32
 +               "19grk4p1dh566hgpzhnjyjnrw57hpjijcpr7ci401n9jszcc1xkz")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)))
 +    (home-page "https://www.ctan.org/pkg/bigintcalc")
 +    (synopsis "Integer calculations on very large numbers")
 +    (description
 +     "This package provides expandable arithmetic operations with big
 +integers that can exceed TeX's number limits.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-bitset
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-bitset"
 +              '("/doc/latex/bitset/README.md"
 +                "/tex/generic/bitset/")
 +              (base32
 +               "0inj6qpzizvsbxdfsaijnl4iq976kyrnchnm3gc1kc2w389zrn1l")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
 +       ("texlive-generic-intcalc" ,texlive-generic-intcalc)
 +       ("texlive-generic-bigintcalc" ,texlive-generic-bigintcalc)))
 +    (home-page "https://www.ctan.org/pkg/bitset")
 +    (synopsis "Handle bit-vector datatype")
 +    (description
 +     "This package defines and implements the data type bit set, a vector
 +of bits.  The size of the vector may grow dynamically.  Individual bits
 +can be manipulated.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-etexcmds
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-etexcmds"
 +              '("/doc/latex/etexcmds/README.md"
 +                "/tex/generic/etexcmds/")
 +              (base32
 +               "11y6pnlq13bp0ybi7c82g8ds8085zv1zaslgqv3dzhgi3dklpc0c")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
 +       ("texlive-generic-iftex" ,texlive-generic-iftex)))
 +    (home-page "https://www.ctan.org/pkg/etexcmds")
 +    (synopsis "Avoid name clashes with e-TeX commands")
 +    (description
 +     "New primitive commands are introduced in e-TeX; sometimes the names
 +collide with existing macros.  This package solves the name clashes by
 +adding a prefix to e-TeX’s commands.  For example, ε-TeX’s
 +@code{\\unexpanded} is provided as @code{\\etex@@unexpanded}.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-gettitlestring
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-gettitlestring"
 +              '("/doc/latex/gettitlestring/"
 +                "/tex/generic/gettitlestring/")
 +              (base32
 +               "1p4hg9mac03rzvj9dw0ws3zdh55fy1ns954f912algw9f2aq4xgp")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/gettitlestring")
 +    (synopsis "Clean up title references")
 +    (description
 +     "This package provides commands for cleaning up the title string
 +(such as removing @code{\\label} commands) for packages that typeset such
 +strings.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-infwarerr
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-infwarerr"
 +              '("/tex/generic/infwarerr/")
 +              (base32
 +               "19nlrbfmqbkjrrx9x75s9nd6crg1lzimb2fr3hfblaivj6lx8p4r")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/infwarerr")
 +    (synopsis "Information/warning/error macros")
 +    (description
 +     "This package provides a complete set of macros for information,
 +warning and error messages.  Under LaTeX, the commands are wrappers for
 +the corresponding LaTeX commands; under Plain TeX they are available as
 +complete implementations.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-intcalc
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-intcalc"
 +              '("/tex/generic/intcalc/")
 +              (base32
 +               "0llrnayqwdqxi91yh7panbbiljina3bynv2hxhi6sssaw3pyd92l")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/intcalc")
 +    (synopsis "Expandable arithmetic operations with integers")
 +    (description
 +     "This package provides expandable arithmetic operations with integers,
 +using the e-TeX extension @code{\\numexpr} if it is available.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-kvdefinekeys
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-kvdefinekeys"
 +              '("/tex/generic/kvdefinekeys/")
 +              (base32
 +               "12nn74skhwiszbdhawqds31caz6d59a5pjmwar0r8lmk4f1jr3xh")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/kvdefinekeys")
 +    (synopsis "Define keys for use in the @code{kvsetkeys} package")
 +    (description
 +     "This package provides the @code{\\kv@@define@@key} (analogous to
 +keyval’s @code{\\define@@key}, to define keys for use by @code{kvsetkeys}.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-kvsetkeys
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-kvsetkeys"
 +              '("/tex/generic/kvsetkeys/")
 +              (base32
 +               "149vpmv4vms269dzq4sghlngg380sasvxnb3sx9rfs7d9j0finvi")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/kvsetkeys")
 +    (synopsis "Key value parser with default handler support")
 +    (description
 +     "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
 +from the @code{keyval} package.  Users can specify a handler that deals with
 +unknown options.  Active commas and equal signs may be used, and only one
 +level of curly braces are removed from the values.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-generic-listofitems
    (package
      (name "texlive-generic-listofitems")
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "1x4wnpca97rnbvvg6wjmbkxxvnfva274q9ahzx746b435q93z3i1"))))
 +                "1wnbnfrhi6hgqa78jsw6hljzi03i5x99mlr5n2419hgws52hk67y"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -7776,58 -7074,6 +7776,58 @@@ the parsing character has been selecte
  these items with a simple syntax.")
      (license license:lppl1.3c+)))
  
 +(define-public texlive-generic-ltxcmds
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-ltxcmds"
 +              '("/tex/generic/ltxcmds/")
 +              (base32
 +               "1lr77yai2qivlx26s5094czpfxmg96bhxps5wbm8xn7cpsw0zbd9")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/ltxcmds")
 +    (synopsis "LaTeX kernel commands extracted for general use")
 +    (description
 +     "This package exports some utility macros from the LaTeX kernel into
 +a separate namespace and also makes them available for other formats such
 +as plain TeX.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-pdfescape
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-pdfescape"
 +              '("/tex/generic/pdfescape/")
 +              (base32
 +               "1vbdjmm9bi9ngzz2z1b8jnf6nzf9xsaj5pvyswg13y4dr00mnz6n")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/pdfescape")
 +    (synopsis "pdfTeX's escape features for plain TeX")
 +    (description
 +     "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
 +@code{\\pdfunescapehex}, @code{\\pdfescapename}, @code{\\pdfescapestring})
 +using TeX or e-TeX.")
 +    (license license:lppl1.3c+)))
 +
 +(define-public texlive-generic-uniquecounter
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-generic-uniquecounter"
 +              '("/doc/latex/uniquecounter/"
 +                "/tex/generic/uniquecounter/")
 +              (base32
 +               "1bjh8vwiqlkmjqndnh4xp116524x4m3hdcyq2s231jiqy8il8dcc")
 +              #:trivial? #t))
 +    (propagated-inputs
 +     `(("texlive-generic-bigintcalc" ,texlive-generic-bigintcalc)
 +       ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)))
 +    (home-page "https://www.ctan.org/pkg/uniquecounter")
 +    (synopsis "Unlimited unique counter")
 +    (description
 +     "This package provides a kind of counter that provides unique number
 +values.  Several counters can be created with different names.  The numeric
 +values are not limited.")
 +    (license license:lppl1.3c+)))
 +
  (define-public texlive-latex-readarray
    (package
      (name "texlive-latex-readarray")
@@@ -7976,9 -7222,11 +7976,9 @@@ AMS-LaTeX, AMS-TeX, and plain TeX).  Th
  @code{diag} package, which was previously distributed stand-alone.")
        (license license:gpl3+))))
  
 -(define-public texlive-fonts-xypic
 -  (deprecated-package "texlive-fonts-xypic" texlive-xypic))
 +(define-deprecated-package texlive-fonts-xypic texlive-xypic)
  
 -(define-public texlive-generic-xypic
 -  (deprecated-package "texblive-generic-xypic" texlive-xypic))
 +(define-deprecated-package texlive-generic-xypic texlive-xypic)
  
  (define-public texlive-bibtex
    (package
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
 -         "1wijqq605cbhn2bdaryby3xpkwmnk9ixcrjn5zwlfrxbgfblzfmz"))))
 +         "0fr0s3jhrvplddb42if570dxllz54fa0pf4d2am27h8m385nghbf"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
@@@ -8028,6 -7276,9 +8028,9 @@@ package, such as @command{natbib} as we
                (base32
                 "09l5ymgz48s3hyn776l01g3isk3dnhrj1vdavdw4qq4kfxxpqdn9")
                #:trivial? #t))
+     ;; This provides charter.map.
+     (propagated-inputs
+      `(("texlive-psnfss" ,texlive-psnfss)))
      (home-page "https://www.ctan.org/pkg/charter")
      (synopsis "Charter fonts for TeX")
      (description "This package provides a copy of the Charter Type-1 fonts
@@@ -8037,7 -7288,8 +8040,7 @@@ Support for use with LaTeX is availabl
      (license (license:non-copyleft
                "http://mirrors.ctan.org/fonts/charter/readme.charter"))))
  
 -(define-public texlive-fonts-charter
 -  (deprecated-package "texlive-fonts-charter" texlive-charter))
 +(define-deprecated-package texlive-fonts-charter texlive-charter)
  
  (define-public texlive-context
    (package
                      "/doc/man/man1/mtx-watch.1"
                      "/doc/man/man1/mtx-youless.1"
  
 -                    
                      "/bibtex/bst/context/"
                      "/context/"
  
                      "/tex/generic/context/"
                      "/tex/latex/context/")
                (base32
 -               "1npaw9jy41iv9qiilbmcljvc28rjzyjkan6mfcxizv2sbirymwp1")
 +               "1rsw760f52rj62i7ms89xgxdi0qw6hag5fs5hb667nclr4kdkam8")
                #:trivial? #t))
      ;; TODO: add these missing packages:
      ;; xetex, luatex, lm-math, manfnt-font, and mptopdf
         ("texlive-mflogo-font" ,texlive-mflogo-font)))
      (home-page "https://www.ctan.org/pkg/context")
      (synopsis "Full featured, parameter driven macro package for TeX")
 -    (description "A full featured, parameter driven macro package, which fully
 -supports advanced interactive documents.  See the ConTeXt garden for a wealth
 -of support information.")
 -    (license license:gpl2+)))
 +    (description "ConTeXt is a full featured, parameter driven macro package,
 +which fully supports advanced interactive documents.  See the ConTeXt garden
 +for a wealth of support information.")
 +    ;; The GPL applies to all code; alternatively, the LaTeX license may be used.
 +    ;; The CC-BY-SA license applies to all documentation.
 +    (license (list license:lppl1.3c+
 +                   license:gpl2+
 +                   license:cc-by-sa4.0))))
  
 -(define-public texlive-context-base
 -  (deprecated-package "texlive-context-base" texlive-context))
 +(define-deprecated-package texlive-context-base texlive-context)
  
  (define-public texlive-beamer
    (package
                (list "/doc/latex/beamer/"
                      "/tex/latex/beamer/")
                (base32
 -               "1fqzbkmw2kfxihab8j4dadc3v68xap6v2ghpp2064fna47xlwy1c")
 +               "091n27n4l3iac911bvmpp735ffryyzaq46mkclgn3q9jsvc4ngiv")
                #:trivial? #t))
      (propagated-inputs
 -     `(("texlive-latex-hyperref" ,texlive-latex-hyperref)
 -       ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
 -       ("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
 +     `(("texlive-hyperref" ,texlive-hyperref)
 +       ("texlive-oberdiek" ,texlive-oberdiek)
 +       ("texlive-etoolbox" ,texlive-etoolbox)
         ("texlive-latex-pgf" ,texlive-latex-pgf)))
      (home-page "https://www.ctan.org/pkg/beamer")
      (synopsis "LaTeX class for producing presentations and slides")
@@@ -8167,7 -7416,8 +8169,7 @@@ effects, varying slide transitions and 
      ;; dual-licensed under either FDLv1.3+ or LPPL1.3c+.
      (license (list license:lppl1.3c+ license:gpl2+ license:fdl1.3+))))
  
 -(define-public texlive-latex-beamer
 -  (deprecated-package "texlive-latex-beamer" texlive-beamer))
 +(define-deprecated-package texlive-latex-beamer texlive-beamer)
  
  (define-public texlive-latex-xmpincl
    (package
@@@ -8192,44 -7442,58 +8194,44 @@@ the metadata is stored in an XML file, 
  the file to which it applies.")
      (license license:gpl3+)))
  
 -(define-public texlive-latex-pdfx
 -  (package
 -    (name "texlive-latex-pdfx")
 -    (version (number->string %texlive-revision))
 -    (source
 -     (origin
 -       (method svn-fetch)
 -       (uri (texlive-ref "latex" "pdfx"))
 -       (file-name (string-append name "-" version "-checkout"))
 -       (sha256
 -        (base32
 -         "18294h0cr05fs424m3x6aq24z5hf5zmiflalkj4kvpmsyyqqsj74"))))
 -    (build-system texlive-build-system)
 -    (arguments
 -     '(#:tex-directory "latex/pdfx"
 -       #:phases
 -       (modify-phases %standard-phases
 -         (add-after 'unpack 'fix-encoding
 -           (lambda _
 -             (substitute* "pdfx.dtx"
 -               (("    .+umaczy") "umaczy"))
 -             #t))
 -         (add-before 'install 'install-tex-files
 -           (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (let ((target (string-append (assoc-ref outputs "out")
 -                                          "/share/texmf-dist/tex/latex/pdfx")))
 -               (mkdir-p target)
 -               (copy-recursively (assoc-ref inputs "texlive-tex-pdfx") target)
 -               ;; Install the generated version in the "install" phase.
 -               (delete-file (string-append target "/pdfx.sty"))
 -               #t))))))
 -    (propagated-inputs
 -     `(("texlive-pdftex" ,texlive-pdftex)))
 -    (native-inputs
 -     `(("texlive-tex-pdfx"
 -        ,(origin
 -           (method svn-fetch)
 -           (uri (svn-reference
 -                 (url (string-append "svn://www.tug.org/texlive/tags/"
 -                                     %texlive-tag "/Master/texmf-dist/"
 -                                     "/tex/latex/pdfx"))
 -                 (revision %texlive-revision)))
 -           (file-name (string-append "texlive-tex-latex-pdfx-" version "-checkout"))
 -           (sha256
 -            (base32
 -             "171ffvpkj2fab4ljcxv3l6l5c8ga8zavdhmhfq07id8zyyr619ip"))))))
 -    (home-page "https://www.ctan.org/pkg/pdfx")
 -    (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
 -    (description
 -     "This package helps LaTeX users to create PDF/X, PDF/A and other
 +(define-public texlive-pdfx
 +  (let ((template (simple-texlive-package
 +                   "texlive-pdfx"
 +                   (list "/doc/latex/pdfx/"
 +                         "/source/latex/pdfx/"
 +                         "/tex/latex/pdfx/")
 +                   (base32
 +                    "1z4j4d92k2fjmf8jfap4zn7ij97d9rz2jcs9aslcac07ag4x5bdp"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ #t)
 +          "latex/pdfx")
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'delete-generated-file
 +               (lambda _
 +                 ;; Generate this file from sources
 +                 (delete-file "tex/latex/pdfx/pdfx.sty")
 +                 #t))
 +             (add-after 'delete-generated-file 'chdir
 +               (lambda _ (chdir "source/latex/pdfx") #t))
 +             (add-after 'chdir 'fix-encoding
 +               (lambda _
 +                 (substitute* "pdfx.dtx"
 +                   (("    .+umaczy") "umaczy"))
 +                 #t))))))
 +      (propagated-inputs
 +       `(("texlive-pdftex" ,texlive-pdftex)))
 +      (home-page "https://www.ctan.org/pkg/pdfx")
 +      (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
 +      (description
 +       "This package helps LaTeX users to create PDF/X, PDF/A and other
  standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
 -    (license license:lppl1.2+)))
 +      (license license:lppl1.2+))))
 +
 +(define-deprecated-package texlive-latex-pdfx texlive-pdfx)
  
  (define-public texlive-ydoc
    (let ((template (simple-texlive-package
               (add-after 'unpack 'chdir
                 (lambda _ (chdir "source/latex/ydoc") #t))
               (add-after 'copy-files 'move-files
 -               (lambda* (#:key outputs #:allow-other-keys)
 -                 (let* ((share (string-append (assoc-ref outputs "out")
 -                                              "/share/texmf-dist"))
 -                        (target (string-append share "/tex/generic/ydoc"))
 -                        (doc (string-append (assoc-ref outputs "doc")
 -                                            "/share/texmf-dist/doc") ))
 -                   (mkdir-p target)
 -                   (for-each
 -                    (lambda (file)
 -                      (rename-file (string-append share "/tex/latex/ydoc/" file)
 -                                   (string-append target "/" file)))
 -                    '("ydocincl.tex" "ydocstrip.tex"))
 -                   (mkdir-p doc)
 -                   (rename-file (string-append share "/doc") doc)
 -                   #t)))))))
 +               (lambda* (#:key inputs outputs #:allow-other-keys)
 +                 (let ((source (assoc-ref inputs "source"))
 +                       (doc (string-append (assoc-ref outputs "doc")
 +                                           "/share/texmf-dist/doc")))
 +                   (copy-recursively (string-append source "/doc")  doc))))))))
        (home-page "http://www.ctan.org/pkg/ydoc")
        (synopsis "Macros for documentation of LaTeX classes and packages")
        (description "The package provides macros and environments to document
@@@ -8277,7 -7551,7 +8279,7 @@@ change."
                           "/tex/generic/pstricks/"
                           "/tex/latex/pstricks/")
                     (base32
 -                    "0sdxdd0qi4sccw9il7d4s7jivs24pq99cdzfnrf0gkqjb1y8s7cl")
 +                    "15c9iqfq2y9c8c78cvqb6vzd5a5rm7qq5x7m05jq1hb8sgqrqb0j")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8323,7 -7597,7 +8325,7 @@@ of the old package @code{pst-char}."
                     "texlive-marginnote"
                     (list "/source/latex/marginnote/marginnote.dtx")
                     (base32
 -                    "1vj1k8xm11gjdfj60as42d8lsv3dbzrm5dlgqcfk89d9dzm3k39j"))))
 +                    "152bwxhnssj40rr72r6cfirvqbnc0h7xnagfrbz58v2xck53qhg1"))))
      (package
        (inherit template)
        (home-page "http://www.ctan.org/pkg/marginnote")
@@@ -8344,13 -7618,13 +8346,13 @@@ may be used instead of @code{\\marginpa
  frames made with the @code{framed} package.")
        (license license:lppl1.3c+))))
  
 -(define-public texlive-iftex
 +(define-public texlive-generic-iftex
    (let ((template (simple-texlive-package
 -                   "texlive-iftex"
 +                   "texlive-generic-iftex"
                     (list "/doc/generic/iftex/"
 -                         "/tex/generic/iftex/iftex.sty")
 +                         "/tex/generic/iftex/")
                     (base32
 -                    "089zvw31gby150n1k0zdk2c0q97pgbqs46phxydaqil64b55nnl7")
 +                    "147xa5kl4kjs05nj8v3kd7dpr5xkz3xp3gdvjih32ccd7527f5vp")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8364,17 -7638,13 +8366,17 @@@ package also provides the @code{\\Requi
  LuaTeX (respectively) is not the engine in use.")
        (license license:lppl1.3+))))
  
 +(define-deprecated-package texlive-iftex texlive-generic-iftex)
 +
 +(define-deprecated-package texlive-generic-ifxetex texlive-generic-iftex)
 +
  (define-public texlive-tools
    (let ((template (simple-texlive-package
                     "texlive-tools"
                     (list "/doc/latex/tools/"
                           "/source/latex/tools/")
                     (base32
 -                    "1ivhij7171wvrgcjn4wah84wxwpd21d0chh3zxab4pj067c8d0mh"))))
 +                    "1xas0b69r3d5x4zhcqysgybyqaikd9avv6r1bdckb947id3iaz58"))))
      (package
        (inherit template)
        (arguments
@@@ -8409,7 -7679,7 +8411,7 @@@ are part of the LaTeX required tools di
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
 -                "0wancavix39j240pd8m9cgmwsijwx6jd6n54v8wg0x2rk5m44myp"))))
 +                "0w4x82wmdvcmy8z3p55xvpz5q7jac1q1j591hi8mngfyqa8rda1c"))))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/xkeyval"
         ("texlive-xcolor" ,texlive-xcolor)
         ("texlive-latex-footmisc" ,texlive-latex-footmisc)
         ("texlive-latex-listings" ,texlive-latex-listings)
 -       ("texlive-iftex" ,texlive-iftex)
 +       ("texlive-generic-iftex" ,texlive-generic-iftex)
         ("texlive-pstricks" ,texlive-pstricks)
         ("texlive-pst-text" ,texlive-pst-text)
         ("texlive-tools" ,texlive-tools)
@@@ -8517,7 -7787,7 +8519,7 @@@ The behaviour in standalone mode may ad
               (list "/source/latex/siunitx/siunitx.dtx"
                     "/doc/latex/siunitx/README.md")
               (base32
 -              "11kf6znkgw7y5qmw75qk6px6pqf57bwr53q0673zaiyq20lif96c")))
 +              "05kl7yid2npp2gbfshnv2xd08w81fkh5h2n5wd9xcpbhlqjzx9sj")))
      (build-system texlive-build-system)
      (arguments
       '(#:tex-directory "latex/siunitx"
@@@ -8557,7 -7827,7 +8559,7 @@@ package to handle all of the possible u
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
 -         "1dqid48vgh25wmw8xzmx6x3pfgz1y9f0r8aza1yxq2mjny5yf68x"))))
 +         "1mycxzl761p2zzmva8xsjbxbvrxx3vhi5p160mh9kiqwhrs5biz5"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/booktabs"))
      (home-page "http://www.ctan.org/pkg/booktabs")
@@@ -8575,7 -7845,7 +8577,7 @@@ to what constitutes a good table in thi
                     (list "/doc/latex/csquotes/"
                           "/tex/latex/csquotes/")
                     (base32
 -                    "088gvi60d7sdl6fgg68fbz30fnpqc3yrpkx80sfw7vwgar3wm3av")
 +                    "17y5mrmjmi7n0cgq4cnqr55f4bni6lx1pfdv5pzsmbrzha3mhbfg")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8633,7 -7903,7 +8635,7 @@@ XML file
                     (list "/doc/latex/biblatex/"
                           "/tex/latex/biblatex/")
                     (base32
 -                    "11kzvny50iklzkamr0rqd5x532q8rxny1xhmf96jl8mzj1d2zmay")
 +                    "091cz2vrq22d1fr05wljd8vbllsz95q2hn2p8hhrwb2l2xrmxwn8")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8672,7 -7942,7 +8674,7 @@@ section
                     (list "/doc/latex/todonotes/"
                           "/tex/latex/todonotes/")
                     (base32
 -                    "0lvxsskz4bdfxhd59hf77kiq8k4nh2spb66vc6hifdgi21z8r8wm")
 +                    "1jqw8jy73488bdr971w0dnlggsvicagpnpx8ddqkma920ba8rabp")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8711,7 -7981,7 +8713,7 @@@ included in the @code{units} bundle."
                     (list "/doc/latex/microtype/"
                           "/tex/latex/microtype/")
                     (base32
 -                    "0xmjpzbj4nqmnl5m7xx1bshdk2c8n57rmbvn0j479ypj4wdlq9iy")
 +                    "07861ixrjzxm0l24z82ivhaj4v6xm4ijbaabp66jxsf8s8h7dq9n")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8736,7 -8006,7 +8738,7 @@@ the bundle."
                     (list "/doc/latex/caption/"
                           "/tex/latex/caption/")
                     (base32
 -                    "09gmh8yjj9f5zak8r18g87w9p5jn7flnvmlhxmvdq6992mbdc6hg")
 +                    "1isnn375d14xsx398j3m8rbb0pdk12kijw4xcgl82xici170klwq")
                     #:trivial? #t)))
      (package
        (inherit template)
@@@ -8913,7 -8183,7 +8915,7 @@@ a repackaging, for use with TeX, of th
                      "/fonts/vf/public/fourier/"
                      "/tex/latex/fourier/")
                (base32
 -               "1vs2xdx6f6hd01zlslx3y93g3dsa7k3yhqpnhgkizgjmz0r9ipz1")
 +               "04d575nd4yvl58g9dfab9mrjxiv4792bdkz4bjvlkx6x257vlfzn")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/fourier")
      (synopsis "Utopia fonts for LaTeX documents")
@@@ -8959,7 -8229,7 +8961,7 @@@ matching maths fonts are provided by th
         (file-name (string-append name "-" version "-checkout"))
         (sha256
          (base32
 -         "19mhp9l7cjw0sbq55c9lz0l2pffkyhyir3i63jqynifjmglbgkl7"))))
 +         "0j3w1y66pkf3bjl9dh5xy3lfg33rg08s4wx37a3jcndvcji20j3f"))))
      (build-system texlive-build-system)
      (arguments '(#:tex-directory "latex/fontaxes"))
      (home-page "http://www.ctan.org/pkg/fontaxes")
@@@ -9002,7 -8272,7 +9004,7 @@@ footnote style author/affiliation inpu
                (list "/doc/latex/mweights/"
                      "/tex/latex/mweights/")
                (base32
 -               "1k2xclk54q3xgn48hji23q52nivkzgwf0s30bmm6k83f7v57qv8h")
 +               "12493g3yz06mhiybnphqbp49fjzy36clzw63b74mkfhsg1pq7h1b")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/mweights")
      (synopsis "Support for multiple-weight font packages")
@@@ -9028,7 -8298,7 +9030,7 @@@ or if it differs from the weight desire
                      "/fonts/vf/impallari/cabin/"
                      "/tex/latex/cabin/")
                (base32
 -               "0dfq9gqch80iyvp58spmpmqfc9h61sjvnddm81ba0af1p8ag8sfg")
 +               "1gqqqbj7i18fs1ss5n3axd821hzq5kbv1dl7dqxp4gba619f1rli")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/cabin")
      (synopsis "Humanist Sans Serif font with LaTeX support")
@@@ -9059,7 -8329,7 +9061,7 @@@ use with [pdf]LaTeX."
                      "/fonts/vf/public/newtx/"
                      "/tex/latex/newtx/")
                (base32
 -               "0rqjj33m6xkhrjzjhf24kxdg61az5sqsbcl0m7xqkf4akqybn22d")
 +               "0h0wm3cd0wxag5x7vy3vgr42jd8m6ffkl90pnkvqdxzbnfdjv3l6")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/newtx")
      (synopsis "Repackaging of the TX fonts with improved metrics")
@@@ -9087,7 -8357,7 +9089,7 @@@ mathematics package that matches Libert
                      "/fonts/vf/public/xcharter/"
                      "/tex/latex/xcharter/")
                (base32
 -               "0krm4h53lw7h9jbmv5nc89fm4x7i8l574aig1l4mw8w3ziknwmi7")
 +               "0d8rvcmvxrlxqqxpirxqbhmiijpsz5y4vvldh1jnc018aannjlhm")
                #:trivial? #t))
      (home-page "https://www.ctan.org/pkg/xcharter")
      (synopsis "Extension of the Bitstream Charter fonts")
@@@ -9358,38 -8628,13 +9360,38 @@@ Arguments may contain verbatim materia
  The macros were designed for use within other macros.")
        (license license:lppl1.3))))
  
 +(define-public texlive-grfext
 +  (let ((template (simple-texlive-package
 +                   "texlive-grfext"
 +                   (list "/doc/latex/grfext/README.md"
 +                         "/source/latex/grfext/grfext.dtx")
 +                   (base32
 +                    "1cdvjp9gcnixxlbl8ibwz1yr799gwax5hm686hwmwsigdgafhzgq"))))
 +    (package
 +      (inherit template)
 +      (arguments
 +       (substitute-keyword-arguments (package-arguments template)
 +         ((#:tex-directory _ '())
 +          "latex/grfext")
 +         ((#:build-targets _ '())
 +          ''("grfext.dtx"))
 +         ((#:phases phases)
 +          `(modify-phases ,phases
 +             (add-after 'unpack 'chdir
 +               (lambda _ (chdir "source/latex/grfext")))))))
 +      (home-page "https://github.com/ho-tex/grfext")
 +      (synopsis "Manipulate the graphics package's list of extensions")
 +      (description "This package provides macros for adding to, and reordering
 +the list of graphics file extensions recognised by package graphics.")
 +      (license license:lppl1.3c+))))
 +
  (define-public texlive-adjustbox
    (let ((template (simple-texlive-package
                     "texlive-adjustbox"
                     (list "/doc/latex/adjustbox/"
                           "/source/latex/adjustbox/")
                     (base32
 -                    "14vd0yd50bky2pbbjkn59q1aglnqpdhh8vwjdyan0jkzljsr2ch8"))))
 +                    "074nxbnl184b6iwhis5n85pilq3b2pld3bbrq0wc30hw462m898k"))))
      (package
        (inherit template)
        (arguments
@@@ -9430,7 -8675,7 +9432,7 @@@ provided box macros are @code{\\lapbox}
                     (list "/doc/latex/tcolorbox/"
                           "/tex/latex/tcolorbox/")
                     (base32
 -                    "172lcnk6964alsga5w6kcvjhpjjcw1g9df73k8pyhl5lf4fmxa29")
 +                    "1qnsbblkadzdn1fx2k21xnlwcb35pg9xya24chkm66jmidi22qp0")
                     #:trivial? #true)))
      (package
        (inherit template)
@@@ -1,7 -1,7 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
  ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
  ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
@@@ -682,12 -682,12 +682,12 @@@ logs to GNU ChangeLog format."
                     (git (assoc-ref inputs "git")))
                 (wrap-program (string-append out "/bin/gl")
                   `("PATH" ":" prefix (,(string-append git "/bin")))
 -                 `("PYTHONPATH" ":" =
 +                 `("GUIX_PYTHONPATH" ":" =
                     (,(string-append out "/lib/python"
                                      ,(version-major+minor
                                        (package-version python))
                                      "/site-packages:")
 -                    ,(getenv "PYTHONPATH"))))
 +                    ,(getenv "GUIX_PYTHONPATH"))))
                 #t))))))
      (native-inputs
       `(("git-for-tests" ,git-minimal)))
@@@ -988,7 -988,7 +988,7 @@@ collaboration using typical untrusted f
                (lambda (file)
                  (wrap-program (string-append (assoc-ref outputs "out")
                                               "/lib/cgit/filters/" file)
 -                  `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
 +                  `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
                '("syntax-highlighting.py"
                  "html-converters/md2html"))
               #t)))))
@@@ -1045,8 -1045,9 +1045,8 @@@ a built-in cache to decrease server I/
                                 (assoc-ref inputs "git") "/bin/git"
                                 "'"))
                 (("/usr/sbin/sendmail")
 -                (string-append (assoc-ref inputs "sendmail")
 -                               "/sbin/sendmail")))
 -             #t)))))
 +                (search-input-file inputs
 +                                   "/sbin/sendmail"))))))))
      (inputs
       `(("git" ,git)
         ("sendmail" ,sendmail)))
@@@ -1433,7 -1434,8 +1433,7 @@@ also walk each side of a merge and tes
                    (delete 'build)
                    (add-before 'install 'patch-scripts
                      (lambda* (#:key inputs #:allow-other-keys)
 -                      (let ((perl (string-append (assoc-ref inputs "perl")
 -                                                 "/bin/perl")))
 +                      (let ((perl (search-input-file inputs "/bin/perl")))
                          ;; This seems to take care of every shell script that
                          ;; invokes Perl.
                          (substitute* (find-files "." ".*")
                        (substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
                                       "src/lib/Gitolite/Hooks/Update.pm")
                          (("/usr/bin/perl")
 -                         (string-append (assoc-ref inputs "perl")
 -                                        "/bin/perl")))
 +                         (search-input-file inputs "/bin/perl")))
  
                        (substitute* "src/lib/Gitolite/Common.pm"
                          (("\"ssh-keygen")
@@@ -1596,7 -1599,7 +1596,7 @@@ visualize your public Git repositories 
  (define-public pre-commit
    (package
      (name "pre-commit")
-     (version "2.14.0")
+     (version "2.15.0")
      (source
       (origin
         ;; No tests in the PyPI tarball.
               (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0k6a9bmci5j0q0vmnmxxyx99h3i7lks8p7d76byadnxdh117ygqg"))))
+         (base32 "0hyynhg52qq8rd37cwk2gl1jjy7hpqh74zl2lg89kkdhhx0xfiaj"))))
      (build-system python-build-system)
      (arguments
       `(#:phases
                         ;; Ruby and Node tests require node and gem.
                         "--ignore=tests/languages/node_test.py"
                         "--ignore=tests/languages/ruby_test.py"
 -                       ;; FIXME: Python tests fail because of distlib version
 -                       ;; mismatch.  Even with python-distlib/next it is
 -                       ;; pulling version 0.3.0, while 0.3.1 is required.
 -                       "--ignore=tests/languages/python_test.py" "-k"
 +                       "-k"
                         (string-append
                          ;; TODO: these tests fail with AssertionError.  It may
                          ;; be possible to fix them.
                          "not test_install_existing_hooks_no_overwrite"
                          " and not test_uninstall_restores_legacy_hooks"
 -                        " and not test_installed_from_venv")))))
 +                        " and not test_installed_from_venv"
 +                        " and not test_healthy_venv_creator")))))
           (add-before 'reset-gzip-timestamps 'make-gz-writable
             (lambda* (#:key outputs #:allow-other-keys)
               ;; Make sure .gz files are writable so that the
       `(("git" ,git-minimal)
         ("python-covdefaults" ,python-covdefaults)
         ("python-coverage" ,python-coverage)
 -       ("python-distlib" ,python-distlib/next)
 +       ("python-distlib" ,python-distlib)
         ("python-pytest" ,python-pytest)
         ("python-pytest-env" ,python-pytest-env)
         ("python-re-assert" ,python-re-assert)
@@@ -1833,8 -1838,10 +1833,8 @@@ history.  It implements the changeset e
           (modify-phases %standard-phases
             (add-after 'unpack 'patch-paths
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((gpg (string-append (assoc-ref inputs "gnupg")
 -                                       "/bin/gpg"))
 -                   (openssl (string-append (assoc-ref inputs "openssl")
 -                                           "/bin/openssl")))
 +             (let ((gpg (search-input-file inputs "/bin/gpg"))
 +                   (openssl (search-input-file inputs "/bin/openssl")))
                 (substitute* "commitsigs.py"
                   (("b'gpg',") (string-append "b'" gpg "',"))
                   (("b'openssl',") (string-append "b'" openssl "',")))))))
@@@ -2577,7 -2584,7 +2577,7 @@@ by rclone usable with git-annex."
  (define-public fossil
    (package
      (name "fossil")
 -    (version "2.11")
 +    (version "2.14")
      (source
       (origin
         (method url-fetch)
                "https://www.fossil-scm.org/index.html/uv/"
                "fossil-src-" version ".tar.gz"))
         (sha256
 -        (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
 +        (base32 "1fazl117ph5z7xg7h6w7i32sf7rsa67499rg2llsxn3d34hckl5q"))
         (modules '((guix build utils)))
         (snippet
          '(begin
@@@ -2779,7 -2786,8 +2779,7 @@@ directory full of HOWTOs."
                 #t))
             (add-before 'install 'patch-git
               (lambda* (#:key inputs #:allow-other-keys)
 -               (let ((git (string-append (assoc-ref inputs "git")
 -                                         "/bin/git")))
 +               (let ((git (search-input-file inputs "/bin/git")))
                   (substitute* "bin/git-when-merged"
                     (("'git'") (string-append "'" git "'")))
                   #t)))
               (lambda* (#:key outputs #:allow-other-keys)
                 (wrap-program (string-append (assoc-ref outputs "out")
                                              "/bin/git-when-merged")
 -                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
                 #t)))))
        (inputs
         `(("git" ,git)
@@@ -2823,7 -2831,8 +2823,7 @@@ how information about the merge is disp
           (delete 'configure)
           (add-before 'install 'patch-git
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((git (string-append (assoc-ref inputs "git")
 -                                       "/bin/git")))
 +             (let ((git (search-input-file inputs "/bin/git")))
                 (substitute* "git-imerge"
                   (("'git'") (string-append "'" git "'")))
                 #t)))
             (lambda* (#:key outputs #:allow-other-keys)
               (wrap-program (string-append (assoc-ref outputs "out")
                                            "/bin/git-imerge")
 -               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
 +               `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
               #t)))))
      (inputs
       `(("git" ,git)
@@@ -3115,10 -3124,11 +3115,10 @@@ defects faster."
                 (substitute* "tests/test_main.py"
                   (("'gita\\\\n'") "'source\\n'")
                   (("'gita'") "'source'"))
 -               (invoke (string-append (assoc-ref inputs "git") "/bin/git")
 +               (invoke (search-input-file inputs "/bin/git")
                         "init")
                 (add-installed-pythonpath inputs outputs)
 -               (invoke (string-append (assoc-ref inputs "python-pytest")
 -                                      "/bin/pytest")
 +               (invoke (search-input-file inputs "/bin/pytest")
                         "-vv" "tests")))
             (add-after 'install 'install-shell-completions
               (lambda* (#:key outputs #:allow-other-keys)
diff --combined gnu/packages/video.scm
@@@ -39,7 -39,7 +39,7 @@@
  ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
  ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
  ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 -;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
 +;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
  ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
  ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
@@@ -53,7 -53,6 +53,7 @@@
  ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
 +;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
      (arguments
       `(#:configure-flags
         (list
 -        "--enable-libv4l2"
 +        "CFLAGS=-fcommon"
 +        ;; XXX: Broken API.
 +        ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
 +        ;; "--enable-libv4l2"
          "--enable-libmpeg2"
          "--enable-libmpeg2convert"
 -        "--enable-v4l"
 +        ;; XXX: Broken API.
 +        ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
 +        ;; "--enable-v4l"
          ;;; XXX: Not available.
          ;"--enable-bktr"
          ;"--enable-sunau"
         ("lzo" ,lzo)
         ("mjepgtools" ,mjpegtools)
         ("sdl" ,sdl)
 -       ("v4l-utils" ,v4l-utils)
 +       ;; ("v4l-utils" ,v4l-utils)
         ("x11" ,libx11)
         ("x264" ,libx264)
         ("xaw" ,libxaw)
@@@ -678,22 -672,12 +678,22 @@@ stream decoding"
                  "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
      (build-system gnu-build-system)
      (native-inputs
 -     `(("makeinfo" ,texinfo)))
 +     `(("config" ,config)
 +       ("makeinfo" ,texinfo)))
      (inputs
       `(("ncurses" ,ncurses)))
      (arguments
       `(#:phases
         (modify-phases %standard-phases
 +         (add-after 'unpack 'update-config-scripts
 +           (lambda* (#:key inputs native-inputs #:allow-other-keys)
 +             ;; Replace outdated config.guess and config.sub.
 +             (for-each (lambda (file)
 +                         (install-file
 +                          (search-input-file
 +                           (or native-inputs inputs)
 +                           (string-append "/bin/" file)) "."))
 +                       '("config.guess" "config.sub"))))
           (replace 'configure
                    (lambda* (#:key build inputs outputs #:allow-other-keys)
                      ;; This old `configure' script doesn't support
                        (invoke "./configure"
                                (string-append "--prefix=" out)
                                (string-append "--build=" build)
 -                              ;; The ancient config.guess is unable to
 -                              ;; guess the host triplet on mips64el.
 -                              ,@(if (string=? "mips64el-linux"
 -                                              (%current-system))
 -                                    '("--host=mips64el-unknown-linux-gnu")
 -                                    '())
 -                              ;; The same is also true with aarch64.
 -                              ,@(if (string=? "aarch64-linux"
 -                                              (%current-system))
 -                                    '("--host=aarch64-unknown-linux-gnu")
 -                                    '())
                                (string-append "--with-ncurses="
                                               ncurses))))))))
      (home-page "http://aa-project.sourceforge.net/aalib/")
@@@ -978,8 -973,10 +978,8 @@@ H.264 (MPEG-4 AVC) video streams."
               #t)))
           (add-before 'configure 'add-googletest
             (lambda* (#:key inputs #:allow-other-keys)
 -             (symlink
 -               (string-append (assoc-ref inputs "googletest")
 -                              "/include/gtest") "lib/gtest")
 -             #t))
 +             (symlink (search-input-directory inputs "/include/gtest")
 +                      "lib/gtest")))
           (replace 'build
             (lambda _
               (let ((-j (list "-j" (number->string (parallel-job-count)))))
@@@ -2440,7 -2437,8 +2440,7 @@@ other site that youtube-dl supports."
             ;; Explicitly invoke the input ffmpeg, instead of whichever one
             ;; happens to be in the user's $PATH at run time.
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
 -                                          "/bin/ffmpeg")))
 +             (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
                 (substitute* "src/you_get/processor/ffmpeg.py"
                   ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
                   ;; same string is also used when sniffing ffmpeg's output.
@@@ -4222,7 -4220,7 +4222,7 @@@ tools for styling them, including a bui
  (define-public pitivi
    ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
    (let ((latest-semver "0.999.0")
-         (%version "2021.01.0"))
+         (%version "2021.05.0"))
     (package
       (name "pitivi")
       (version (string-append latest-semver "-" %version))
                (commit %version)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "1jics10l16ismi5br6wxi4jxz3dd4p0c0xv8l0l3nvksvda4aafi"))))
+          (base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah"))))
       (build-system meson-build-system)
       (inputs
        `(("glib" ,glib)
                (let ((prog (string-append (assoc-ref outputs "out")
                                           "/bin/pitivi")))
                  (wrap-program prog
 -                  `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
 +                  `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
                    `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
                    ;; We've only added inputs for what Pitivi deems either
                    ;; necessary or optional.  Let the user's packages take
                    ;; precedence in case they have e.g. the full gst-plugins-bad.
                    `("GST_PLUGIN_SYSTEM_PATH" suffix
-                     (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
-                 #t)))))
+                     (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))))
       (home-page "http://www.pitivi.org")
       (synopsis "Video editor based on GStreamer Editing Services")
       (description "Pitivi is a video editor built upon the GStreamer Editing
@@@ -4599,8 -4596,9 +4598,8 @@@ create smoother and stable videos."
               (setenv "ZMQDIR"
                       (assoc-ref inputs "zeromq"))
               (setenv "UNITTEST_DIR"
 -                     (string-append (assoc-ref inputs "unittest++")
 -                                    "/include/UnitTest++"))
 -             #t)))))
 +                     (search-input-directory inputs
 +                                             "include/UnitTest++")))))))
      (home-page "https://openshot.org")
      (synopsis "Video-editing, animation, and playback library")
      (description "OpenShot Library (libopenshot) is a powerful C++ video
@@@ -4678,7 -4676,7 +4677,7 @@@ transitions, and effects and then expor
  (define-public shotcut
    (package
      (name "shotcut")
-     (version "21.06.29")
+     (version "21.08.29")
      (source
       (origin
         (method git-fetch)
               (commit (string-append "v" version))))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0384iv2129mpalia39x8mn5xlbgx9ip994700jzjjxdqfq23a9qm"))))
+         (base32 "0lj3ini0fymvcwxk8l1l8ms5519n5n87gdvh0yfhilwp0zqyqkc6"))))
      (build-system qt-build-system)
      (arguments
       `(#:tests? #f ;there are no tests
@@@ -4753,7 -4751,7 +4752,7 @@@ and audio capture, network stream playb
  (define-public dav1d
    (package
      (name "dav1d")
-     (version "0.9.1")
+     (version "0.9.2")
      (source
        (origin
          (method git-fetch)
                 (commit version)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "15ngaqyjbwkj0rd9mvxaqf3i9vzsnlrqgr50cnxxjqnpf7xdmslj"))))
+          (base32 "0bkps488h9s15ylvkm4fmfywgrpbw570glawpnv6khpq9n223dzl"))))
      (build-system meson-build-system)
      (native-inputs `(("nasm" ,nasm)))
      (home-page "https://code.videolan.org/videolan/dav1d")
diff --combined gnu/packages/vim.scm
             (lambda* (#:key inputs #:allow-other-keys)
               ;; One of the tests tests timezone-dependent functions.
               (setenv "TZDIR"
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))
 +                     (search-input-directory inputs "share/zoneinfo"))
  
               ;; Make sure the TERM environment variable is set for the tests
               (setenv "TERM" "xterm")
@@@ -771,7 -772,8 +771,7 @@@ refactor Vim in order to
         (modify-phases %standard-phases
           (add-after 'configure 'reference-nvim
             (lambda* (#:key inputs #:allow-other-keys)
 -             (let ((nvim (string-append (assoc-ref inputs "neovim")
 -                                        "/bin/nvim")))
 +             (let ((nvim (search-input-file inputs "/bin/nvim")))
                 ;; This substitution should change one line, and replaces the default
                 ;; value in the struct of options with an absolute store reference.
                 (substitute* "../source/src/main.c"
@@@ -978,6 -980,34 +978,34 @@@ asynchronous adapters (including tmux, 
  the job completes, errors will be loaded and parsed automatically.")
      (license license:vim)))
  
+ (define-public vim-gemini-vim
+   ;; No releases have been tagged.
+   (let ((commit "f300c54174fc0db8fb68f1bc04307b58612e9630")
+         (revision "1"))
+     (package
+       (name "vim-gemini-vim")
+       (version (git-version "0.0.0" revision commit))
+       (source
+         (origin
+           (method git-fetch)
+           (uri (git-reference
+                  (url "https://git.sr.ht/~torresjrjr/gemini.vim")
+                  (commit commit)))
+           (file-name (git-file-name name version))
+           (sha256
+            (base32 "05ffhhfahjqwxyrqmsinsahrs15wknzl2qbj8mznyv319mn2civ2"))))
+       (build-system copy-build-system)
+       (arguments
+        `(#:install-plan
+          '(("ftdetect" "share/vim/vimfiles/")
+            ("syntax" "share/vim/vimfiles/"))))
+       (home-page "https://git.sr.ht/~torresjrjr/gemini.vim")
+       (synopsis "Vim syntax highlighting plugin for Gemini")
+       (description "This Vim plugin provides a Vim syntax highlighting plugin
+ for Gemini Text, the text/gemini media type, as defined in the Gemini protocol
+ specification.")
+       (license license:gpl3))))
  (define-public vim-eunuch
    (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
          (revision "1"))
  This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
  help working on Vim buffers and the files they reference with one command.")
        (license license:vim))))
+ (define-public vim-slime
+   ;; No tagged releases.
+   (let ((commit "a522fed677e50175f52efc5848cc35209af33216")
+         (revision "1"))
+     (package
+       (name "vim-slime")
+       (version (git-version "0.0.0" revision commit))
+       (source
+         (origin
+           (method git-fetch)
+           (uri (git-reference
+                  (url "https://github.com/jpalardy/vim-slime")
+                  (commit commit)))
+           (file-name (git-file-name name version))
+           (sha256
+            (base32 "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4"))))
+       (build-system copy-build-system)
+       (arguments
+        `(#:install-plan
+          '(("autoload" "share/vim/vimfiles/")
+            ("doc" "share/vim/vimfiles/")
+            ("ftplugin" "share/vim/vimfiles/")
+            ("plugin" "share/vim/vimfiles/"))))
+       (home-page "https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/")
+       (synopsis "Vim plugin to give you some slime")
+       (description "SLIME is an Emacs plugin to turn Emacs into a Lisp IDE.  You
+ can type text in a file, send it to a live REPL, and avoid having to reload all
+ your code every time you make a change.  @code{Vim-slime} is an attempt at
+ getting some of these features into Vim.  It works with any REPL and isn't tied
+ to Lisp.")
+       (license license:expat))))
@@@ -1,7 -1,7 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
 -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
 -;;; Copyright © 2016, 2017, 2018. 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 +;;; Copyright © 2016, 2017, 2018. 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
  ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
  ;;; Copyright © 2017 Andy Patterson <ajpatter@uwaterloo.ca>
           ;; Configure, build and install QEMU user-emulation static binaries.
           (add-after 'configure 'configure-user-static
             (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (let* ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
 +             (let* ((gcc (search-input-file inputs "/bin/gcc"))
                      (static (assoc-ref outputs "static"))
                      ;; This is the common set of configure flags; it is
                      ;; duplicated here to isolate this phase from manipulations
@@@ -333,7 -333,8 +333,7 @@@ exec smbd $@"))
                       ("perl" ,perl)
                       ("flex" ,flex)
                       ("bison" ,bison)
 -                     ;; Using meson 0.57.1 enables reproducible QEMU builds.
 -                     ("meson" ,meson-next)
 +                     ("meson" ,meson)
                       ("ninja" ,ninja)
                       ("pkg-config" ,pkg-config)
                       ("python-wrapper" ,python-wrapper)
                       ("texinfo" ,texinfo)
                       ;; The following static libraries are required to build
                       ;; the static output of QEMU.
 -                     ("glib-static" ,glib-static)
 +                     ("glib:static" ,glib "static")
                       ("pcre:static" ,pcre "static")
                       ("zlib:static" ,zlib "static")))
      (home-page "https://www.qemu.org")
@@@ -371,6 -372,7 +371,7 @@@ server and embedded PowerPC, and S390 g
    (package
      (inherit qemu)
      (name "qemu-minimal")
+     (outputs '("out" "doc"))
      (synopsis
       "Machine emulator and virtualizer (without GUI) for the host architecture")
      (arguments
                     "--target-list=riscv32-softmmu,riscv64-softmmu")
                    (else       ; An empty list actually builds all the targets.
                     '()))))
-           `(cons ,target-list-arg ,configure-flags)))))
+           `(cons ,target-list-arg ,configure-flags)))
+        ((#:phases phases)
+         `(modify-phases ,phases
+            (delete 'configure-user-static)
+            (delete 'build-user-static)
+            (delete 'install-user-static)))))
  
      ;; Remove dependencies on optional libraries, notably GUI libraries.
      (native-inputs (fold alist-delete (package-native-inputs qemu)
-                          '("gettext")))
+                          '("gettext" "glib:static" "pcre:static" "zlib:static")))
      (inputs (fold alist-delete (package-inputs qemu)
                    '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
                      "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2"
                                         "ganeti-drbd-compat.patch"
                                         "ganeti-os-disk-size.patch"
                                         "ganeti-haskell-pythondir.patch"
 -                                       "ganeti-disable-version-symlinks.patch"
 -                                       "ganeti-preserve-PYTHONPATH.patch"))))
 +                                       "ganeti-disable-version-symlinks.patch"))))
      (build-system gnu-build-system)
      (arguments
       `(#:imported-modules (,@%gnu-build-system-modules
                             (guix build python-build-system))
         #:modules (,@%gnu-build-system-modules
                    ((guix build haskell-build-system) #:prefix haskell:)
 -                  ((guix build python-build-system) #:select (python-version))
                    (ice-9 rdelim))
  
         ;; The default test target includes a lot of checks that are only really
               (unless (file-exists? "vcs-version")
                 (call-with-output-file "vcs-version"
                   (lambda (port)
 -                   (format port "v~a~%" ,version))))
 -             #t))
 +                   (format port "v~a~%" ,version))))))
           (add-after 'unpack 'patch-absolute-file-names
             (lambda _
               (substitute* '("lib/utils/process.py"
                 (("ndisc6") (which "ndisc6"))
                 (("fping") (which "fping"))
                 (("grep") (which "grep"))
 -               (("ip addr") (string-append (which "ip") " addr")))
 -             #t))
 +               (("ip addr") (string-append (which "ip") " addr")))))
           (add-after 'unpack 'override-builtin-PATH
             (lambda _
               ;; Ganeti runs OS install scripts and similar with a built-in
               (substitute* "src/Ganeti/Constants.hs"
                 (("/sbin:/bin:/usr/sbin:/usr/bin")
                  "/run/setuid-programs:/run/current-system/profile/sbin:\
 -/run/current-system/profile/bin"))
 -             #t))
 +/run/current-system/profile/bin"))))
           (add-after 'bootstrap 'patch-sphinx-version-detection
             (lambda _
               ;; The build system runs 'sphinx-build --version' to verify that
               ;; .sphinx-build-real executable name created by the Sphinx wrapper.
               (substitute* "configure"
                 (("\\$SPHINX --version 2>&1")
 -                "$SPHINX --version 2>&1 | sed 's/.sphinx-build-real/sphinx-build/g'"))
 -             #t))
 +                "$SPHINX --version 2>&1 \
 +| sed 's/.sphinx-build-real/sphinx-build/g'"))))
  
           ;; The build system invokes Cabal and GHC, which do not work with
           ;; GHC_PACKAGE_PATH: <https://github.com/haskell/cabal/issues/3728>.
                 (("\\$\\(CABAL\\)")
                  "$(CABAL) --package-db=../package.conf.d")
                 (("\\$\\(GHC\\)")
 -                "$(GHC) -package-db=../package.conf.d"))
 -             #t))
 +                "$(GHC) -package-db=../package.conf.d"))))
           (add-after 'configure 'make-ghc-use-shared-libraries
             (lambda _
               (substitute* "Makefile"
 -               (("HFLAGS =") "HFLAGS = -dynamic -fPIC"))
 -             #t))
 +               (("HFLAGS =") "HFLAGS = -dynamic -fPIC"))))
           (add-after 'configure 'fix-installation-directories
             (lambda _
               (substitute* "Makefile"
                 ;; Similarly, do not attempt to install the sample ifup scripts
                 ;; to /etc/ganeti.
                 (("\\$\\(DESTDIR\\)\\$\\(ifupdir\\)")
 -                "$(DESTDIR)${prefix}$(ifupdir)"))
 -             #t))
 +                "$(DESTDIR)${prefix}$(ifupdir)"))))
           (add-before 'build 'adjust-tests
             (lambda _
               ;; Disable tests that can not run.  Do it early to prevent
                  "")
                 ;; This test requires networking.
                 (("test/py/import-export_unittest\\.bash")
 -                ""))
 -
 -             ;; Many of the Makefile targets reset PYTHONPATH before running
 -             ;; the Python interpreter, which does not work very well for us.
 -             (substitute* "Makefile"
 -               (("PYTHONPATH=")
 -                (string-append "PYTHONPATH=" (getenv "PYTHONPATH") ":")))
 -             #t))
 +                ""))))
           (add-after 'build 'build-bash-completions
             (lambda _
 -             (let ((orig-pythonpath (getenv "PYTHONPATH")))
 -               (setenv "PYTHONPATH" (string-append ".:" orig-pythonpath))
 -               (invoke "./autotools/build-bash-completion")
 -               (setenv "PYTHONPATH" orig-pythonpath)
 -               #t)))
 +             (invoke "python" "-m" "./autotools/build-bash-completion")))
           (add-before 'check 'pre-check
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Set TZDIR so that time zones are found.
 -             (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
 -                                            "/share/zoneinfo"))
 -
 -             ;; This test checks whether PYTHONPATH is untouched, and extends
 -             ;; it to include test directories if so.  Add an else branch for
 -             ;; our modified PYTHONPATH, in order to prevent a confusing test
 -             ;; failure where expired certificates are not cleaned because
 -             ;; check-cert-expired is silently crashing.
 -             (substitute* "test/py/ganeti-cleaner_unittest.bash"
 -               (("then export PYTHONPATH=(.*)" all testpath)
 -                (string-append all "else export PYTHONPATH="
 -                               (getenv "PYTHONPATH") ":" testpath "\n")))
 +             (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo"))
  
               (substitute* "test/py/ganeti.utils.process_unittest.py"
                 ;; This test attempts to run an executable with
                 (for-each (lambda (file)
                             (symlink "../../src/htools" file))
                           '("hspace" "hscan" "hinfo" "hbal" "hroller"
 -                           "hcheck" "hail" "hsqueeze")))
 -             #t))
 +                           "hcheck" "hail" "hsqueeze")))))
           (add-after 'install 'install-bash-completions
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                                        (cons (basename (car (reverse (string-split
                                                                       line #\ ))))
                                              progs))
 -                                (loop (read-line port) progs))))))))
 -               #t)))
 -         ;; Wrap all executables with PYTHONPATH.  We can't borrow the phase
 -         ;; from python-build-system because we also need to wrap the scripts
 -         ;; in $out/lib/ganeti such as "node-daemon-setup".
 +                                (loop (read-line port) progs)))))))))))
 +         ;; Wrap all executables with GUIX_PYTHONPATH.  We can't borrow
 +         ;; the phase from python-build-system because we also need to wrap
 +         ;; the scripts in $out/lib/ganeti such as "node-daemon-setup".
           (add-after 'install 'wrap
 -           (lambda* (#:key inputs outputs #:allow-other-keys)
 +           (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (sbin (string-append out "/sbin"))
 -                    (lib (string-append out "/lib"))
 -                    (python (assoc-ref inputs "python"))
 -                    (major+minor (python-version python))
 -                    (PYTHONPATH (string-append lib "/python" major+minor
 -                                               "/site-packages:"
 -                                               (getenv "PYTHONPATH"))))
 +                    (lib (string-append out "/lib")))
                 (define (shell-script? file)
                   (call-with-ascii-input-file file
                     (lambda (port)
  
                 (for-each (lambda (file)
                             (wrap-program file
 -                             `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
 +                             `("GUIX_PYTHONPATH" ":" prefix
 +                               (,(getenv "GUIX_PYTHONPATH")))))
                           (filter wrap?
                                   (append (find-files (string-append lib "/ganeti"))
 -                                         (find-files sbin))))
 -               #t))))))
 +                                         (find-files sbin))))))))))
      (native-inputs
       `(("haskell" ,ghc)
         ("cabal" ,cabal-install)
@@@ -970,7 -1014,8 +976,8 @@@ all common programming languages.  Val
                  "0qz4l7mlhq7hx53q606qgvkyzyr01glsw290v8ppzvxn1fydlrci"))))
      (build-system gnu-build-system)
      (native-inputs
-      `(("pkg-config" ,pkg-config)))
+      `(("pkg-config" ,pkg-config)
+        ("docbook2x" ,docbook2x)))
      (inputs
       `(("gnutls" ,gnutls)
         ("libcap" ,libcap)
@@@ -1063,6 -1108,7 +1070,6 @@@ It started as a side project of LXC bu
               (string-append "-Dinstall_prefix=" (assoc-ref %outputs "out"))
               "--sysconfdir=/etc"
               "--localstatedir=/var")
 -       #:meson ,meson-0.55
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'skip-directory-confusion
@@@ -1239,8 -1285,8 +1246,8 @@@ virtualization library."
             (lambda* (#:key inputs #:allow-other-keys)
               ;; Xen is not available for now - so only patch qemu.
               (substitute* "virtManager/createconn.py"
 -               (("/usr(/bin/qemu-system)" _ suffix)
 -                (string-append (assoc-ref inputs "qemu") suffix)))
 +               (("/usr(/bin/qemu-system-[a-zA-Z0-9_-]+)" _ suffix)
 +                (search-input-file inputs suffix)))
               #t))
           (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
             (lambda* (#:key inputs outputs #:allow-other-keys)
               #t))
           (add-after 'install 'glib-or-gtk-compile-schemas
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
 -         (add-after 'install 'glib-or-gtk-wrap
 +         (add-after 'wrap 'glib-or-gtk-wrap
             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
      (inputs
       `(("dconf" ,dconf)
@@@ -1347,9 -1393,10 +1354,9 @@@ domains, their live performance and res
             (lambda* (#:key inputs #:allow-other-keys)
               ;; The includes for libnl are located in a sub-directory.
               (setenv "C_INCLUDE_PATH"
 -                     (string-append (assoc-ref inputs "libnl")
 -                                    "/include/libnl3:"
 -                                    (or (getenv "C_INCLUDE_PATH") "")))
 -             #t))
 +                     (string-append
 +                      (search-input-directory inputs "/include/libnl3")
 +                      ":" (or (getenv "C_INCLUDE_PATH") "")))))
           (add-after 'configure 'fix-documentation
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (substitute* "Documentation/Makefile"
                 (("\\$\\(PYTHON\\)") "python2"))
               (substitute* "lib/Makefile"
                 (("\\$\\(PYTHON\\)")
 -                (string-append (assoc-ref inputs "python")
 -                               "/bin/python")))
 -             #t))
 +                (search-input-file inputs "/bin/python")))))
           (add-before 'build 'fix-symlink
             (lambda* (#:key inputs #:allow-other-keys)
               ;; The file 'images/google/protobuf/descriptor.proto' points to
               ;; /usr/include/..., which obviously does not exist.
               (let* ((file "google/protobuf/descriptor.proto")
                      (target (string-append "images/" file))
 -                    (source (string-append (assoc-ref inputs "protobuf")
 -                                           "/include/" file)))
 +                    (source (search-input-file
 +                             inputs
 +                             (string-append "include/" file))))
                 (delete-file target)
                 (symlink source target)
                 #t)))
                                           (string-take (string-take-right
                                                         (assoc-ref inputs "python") 5) 3)
                                           "/site-packages:"
 -                                         (getenv "PYTHONPATH"))))
 +                                         (or (getenv "GUIX_PYTHONPATH") ""))))
                 (wrap-program (string-append out "/bin/crit")
 -                 `("PYTHONPATH" ":" prefix (,path))))
 +                 `("GUIX_PYTHONPATH" ":" prefix (,path))))
               #t)))))
      (inputs
       `(("protobuf" ,protobuf)
diff --combined gnu/packages/web.scm
@@@ -19,7 -19,7 +19,7 @@@
  ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2016 Bake Timmons <b3timmons@speedymail.org>
  ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
- ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+ ;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
  ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
  ;;; Copyright © 2017 Petter <petter@mykolab.ch>
  ;;; Copyright © 2017, 2021 Pierre Langlois <pierre.langlois@gmx.com>
  ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  ;;; Copyright © 2020, 2021 Ryan Prior <rprior@protonmail.com>
  ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
  ;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
  ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
  ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
  ;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
 +;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -1034,7 -1032,7 +1034,7 @@@ libraries for working with JNLP applets
  (define-public jansson
    (package
      (name "jansson")
 -    (version "2.12")
 +    (version "2.13.1")
      (source (origin
               (method url-fetch)
               (uri
                               version ".tar.bz2"))
               (sha256
                (base32
 -               "1lp1mv8pjp5yziws66cy0dhpcam4bbjqhffk13v4vgdybp674pb4"))))
 +               "1g8h18vh8gyxlwfmvdivdp1siad26ywj5zr4j4avgdyjg7wa147f"))))
      (build-system gnu-build-system)
      (arguments
       `(#:configure-flags '("--disable-static")))
@@@ -3887,14 -3885,16 +3887,14 @@@ and IPv6 sockets, intended as a replace
  (define-public perl-io-socket-ssl
    (package
      (name "perl-io-socket-ssl")
 -    (version "2.066")
 +    (version "2.068")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://cpan/authors/id/S/SU/SULLR/"
                                    "IO-Socket-SSL-" version ".tar.gz"))
                (sha256
                 (base32
 -                "1kgbws7dwp2hh16qid7169dfkhmcwg7dz9ffbm6k0id5h53hciqd"))
 -              (patches (search-patches
 -                        "perl-io-socket-ssl-openssl-1.0.2f-fix.patch"))))
 +                "1ycgzg1l7p07y5wc0vzgnj122vm51p5aqpi4s56pp0piaq0gq824"))))
      (build-system perl-build-system)
      (propagated-inputs
       `(("perl-net-ssleay" ,perl-net-ssleay)
@@@ -4514,14 -4514,14 +4514,14 @@@ applications."
  (define-public perl-uri
    (package
      (name "perl-uri")
 -    (version "1.76")
 +    (version "5.05")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                                   "URI-" version ".tar.gz"))
               (sha256
                (base32
 -               "0gj1aj18k43kmzc3y1zhj5giinf8rksacf757r475xfna0fqxjdj"))))
 +               "1v3r3ck67w272kzfgm1nd3wb41av1hlnza56vkxxj1i7s3917hd5"))))
      (build-system perl-build-system)
      (native-inputs
       ;; For tests.
@@@ -4764,17 -4764,15 +4764,17 @@@ their web site."
  (define-public python-feedparser
    (package
      (name "python-feedparser")
 -    (version "6.0.2")
 +    (version "6.0.8")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "feedparser" version ".tar.gz"))
         (sha256
          (base32
 -         "0x0hm9brh3j71645pydvlkrwxaaca9dnwd7xahwjyjaz882s200v"))))
 +         "0qcnkyjjfj5gg5rhd1j4zzlqx5h34bma18zwgj68q95b0l543q2w"))))
      (build-system python-build-system)
 +    (propagated-inputs
 +     `(("python-sgmllib3k" ,python-sgmllib3k)))
      (arguments
       '(#:tests? #f))
      (home-page
@@@ -5094,12 -5092,6 +5094,12 @@@ fast and flexible way of exploring HTM
         ("pkg-config" ,pkg-config)))
      (inputs
       `(("libsoup" ,libsoup)))
 +    (arguments
 +     `(#:phases
 +       (modify-phases %standard-phases
 +         (add-before 'check 'set-home-for-tests
 +           (lambda _
 +             (setenv "HOME" "/tmp"))))))
      (home-page "https://gitlab.com/groups/uhttpmock")
      (synopsis "Library for mocking web service APIs which use HTTP or HTTPS")
      (description
@@@ -5397,13 -5389,7 +5397,13 @@@ developed as part of the Netsurf projec
                             "libcss-" version "-src.tar.gz"))
         (sha256
          (base32
 -         "1p66sdiiqm7w4jkq23hsf08khsnmq93hshh9f9m8sbirjdpf3p6j"))))
 +         "1p66sdiiqm7w4jkq23hsf08khsnmq93hshh9f9m8sbirjdpf3p6j"))
 +       (modules '((guix build utils)))
 +       (snippet
 +        '(begin
 +           ;; This can be removed with the next release.
 +           (substitute* "src/select/computed.c"
 +             (("css_unit unit;") "css_unit unit = CSS_UNIT_PX;"))))))
      (build-system gnu-build-system)
      (native-inputs
       `(("netsurf-buildsystem" ,netsurf-buildsystem)
@@@ -5734,7 -5720,7 +5734,7 @@@ w3c webidl files and a binding configur
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* '("test/bloom.c" "test/hashtable.c")
                 (("/usr/share/dict/words")
 -                (string-append (assoc-ref inputs "miscfiles") "/share/web2")))
 +                (search-input-file inputs "/share/web2")))
               #t))
           (add-after 'install 'install-more
             (lambda* (#:key outputs #:allow-other-keys)
@@@ -6012,16 -5998,17 +6012,17 @@@ deployments."
    (package
      (name "varnish")
      (home-page "https://varnish-cache.org/")
-     (version "6.5.1")
+     (version "7.0.0")
      (source (origin
                (method url-fetch)
                (uri (string-append home-page "_downloads/varnish-" version ".tgz"))
                (sha256
                 (base32
-                 "1dfdswri6lkfk6kml3szvffm91y49pajgqy1k5y26llqixl4r5hi"))))
+                 "11z0pa618lh925ih67wmp1gqk7i46l486j4spjy71g1n3w5mqylc"))))
      (build-system gnu-build-system)
      (arguments
       `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
+                                (string-append "CC=" ,(cc-for-target))
                                 ;; Use absolute path of GCC so it's found at runtime.
                                 (string-append "PTHREAD_CC="
                                                (assoc-ref %build-inputs "gcc")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'use-absolute-file-names
-            (lambda _
-              (substitute* '("bin/varnishtest/vtc_varnish.c"
-                             "bin/varnishtest/vtc_process.c"
-                             "bin/varnishd/mgt/mgt_vcc.c"
-                             "bin/varnishtest/tests/u00014.vtc")
-                (("/bin/sh") (which "sh")))
-              (substitute* "bin/varnishd/mgt/mgt_shmem.c"
-                (("rm -rf") (string-append (which "rm") " -rf")))
-              (substitute* "bin/varnishtest/vtc_main.c"
-                (("/bin/rm") (which "rm")))
-              #t))
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let* ((bash (assoc-ref inputs "bash-minimal"))
+                     (sh (string-append bash "/bin/sh"))
+                     (coreutils (assoc-ref inputs "coreutils"))
+                     (rm (string-append coreutils "/bin/rm")))
+                (substitute* '("bin/varnishtest/vtc_varnish.c"
+                               "bin/varnishtest/vtc_process.c"
+                               "bin/varnishtest/vtc_haproxy.c"
+                               "bin/varnishtest/tests/u00014.vtc"
+                               "bin/varnishd/mgt/mgt_vcc.c")
+                  (("/bin/sh") sh))
+                (substitute* "bin/varnishd/mgt/mgt_shmem.c"
+                  (("rm -rf") (string-append rm " -rf")))
+                (substitute* "bin/varnishtest/vtc_main.c"
+                  (("/bin/rm") rm)))))
           (add-before 'install 'patch-Makefile
             (lambda _
               (substitute* "Makefile"
                 ;; Do not create /var/varnish during install.
-                (("^install-data-am: install-data-local") "install-data-am: "))
-              #t))
+                (("^install-data-am: install-data-local") "install-data-am: "))))
           (add-after 'install 'wrap-varnishd
             ;; Varnish uses GCC to compile VCL, so wrap it with required GCC
             ;; environment variables to avoid propagating them to profiles.
                   ;; Add binutils to PATH so gcc finds the 'as' executable.
                   `("PATH" ":" prefix (,PATH))
                   ;; Make sure 'crti.o' et.al is found.
-                  `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH)))
-                #t))))))
+                  `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH)))))))))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("python-sphinx" ,python-sphinx)
         ("rst2man" ,python-docutils)))
      (inputs
-      `(("jemalloc" ,jemalloc)
+      `(("bash-minimal" ,bash-minimal)
+        ("coreutils" ,coreutils)
+        ("jemalloc" ,jemalloc)
         ("ncurses" ,ncurses)
-        ("pcre" ,pcre)
-        ("python" ,python-wrapper)
+        ("pcre2" ,pcre2)
+        ("python" ,python)
         ("readline" ,readline)))
      (synopsis "Web application accelerator")
      (description
@@@ -6086,14 -6077,14 +6091,14 @@@ configuration language."
    (package
      (name "varnish-modules")
      (home-page "https://github.com/varnish/varnish-modules")
-     (version "0.17.1")
+     (version "0.19.0")
      (source (origin
                (method git-fetch)
                (uri (git-reference (url home-page) (commit version)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
-                 "1mzkad9r4rpm1fi7j7skwrsyzzbwcapfnlvvl1ls3rng2djcqb5j"))))
+                 "0qq5g6bbd1a1ml1wk8jj9z39a899jzqbf7aizr3pvyz0f4kz8mis"))))
      (build-system gnu-build-system)
      (native-inputs
       `(("pkg-config" ,pkg-config)
@@@ -6612,8 -6603,9 +6617,8 @@@ Instagram and YouTube."
       `(#:phases
         (modify-phases %standard-phases
           (replace 'check
 -           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
 +           (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
 -               (add-installed-pythonpath inputs outputs)
                 (invoke "py.test" "tests")))))))
      (home-page "https://linkchecker.github.io/linkchecker/")
      (synopsis "Check websites for broken links")
@@@ -6631,7 -6623,7 +6636,7 @@@ file links."
  (define-public castor
    (package
      (name "castor")
-     (version "0.8.16")
+     (version "0.8.18")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
-         (base32 "0rwg1w7srjwa23mkypl8zk6674nhph4xsc6nc01f6g5k959szylr"))))
+         (base32 "1l72r6a917ymc9pn8dllbal1xdczfai376nvqkiys5fm4j4s3zmj"))))
      (build-system cargo-build-system)
      (arguments
       `(#:cargo-inputs
@@@ -7584,7 -7576,7 +7589,7 @@@ derivation by David Revoy from the orig
  (define-public nghttp2
    (package
      (name "nghttp2")
 -    (version "1.41.0")
 +    (version "1.44.0")
      (source
       (origin
         (method url-fetch)
                             "nghttp2-" version ".tar.xz"))
         (sha256
          (base32
 -         "1hk77vngjmvvzb5y1gi1aqwf6qywrc7yak08zvzb7x81qs6mphmb"))))
 +         "0p9wvva4g8hwj55x19rbyvnq2dbsnf65rphhxnpqs7ll54xlg6an"))))
      (build-system gnu-build-system)
      (outputs (list "out"
                     "lib"))              ; only libnghttp2
  
         ;; Required by tests.
         ("cunit" ,cunit)
 +       ("python" ,python)
         ("tzdata" ,tzdata-for-tests)))
      (inputs
       ;; Required to build the tools (i.e. without ‘--enable-lib-only’).
diff --combined gnu/packages/wm.scm
@@@ -8,7 -8,7 +8,7 @@@
  ;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
  ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 -;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2016, 2017, 2018, 2020 Nikita <nikita@n0.is>
  ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
  ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
@@@ -45,6 -45,7 +45,7 @@@
  ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
  ;;; Copyright © 2021 qblade <qblade@protonmail.com>
  ;;; Copyright © 2021 lasnesne <lasnesne@lagunposprasihopre.org>
+ ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -384,14 -385,14 +385,14 @@@ from many programming languages."
  (define-public i3lock
    (package
      (name "i3lock")
-     (version "2.11.1")
+     (version "2.13")
      (source (origin
                (method url-fetch)
                (uri (string-append "https://i3wm.org/i3lock/i3lock-"
                                    version ".tar.bz2"))
                (sha256
                 (base32
-                 "015dn534m7cxjvqdncpvaq9p8b2r4w5hp1yanbdy2abmhbcc7a7j"))))
+                 "02szjsaz7rqrdkd0r2nwgwa85c4hwfrcskxw7ryk695kmjcfhzv3"))))
      (build-system gnu-build-system)
      (native-inputs
       `(("pkg-config" ,pkg-config)))
  Despite the name it should work with any X11 window manager.")
      (license license:bsd-3)))
  
+ (define-public i3lock-blur
+   (package
+     (name "i3lock-blur")
+     (version "2.10")
+     (source (origin
+               (method git-fetch)
+               (uri
+                (git-reference
+                 (url "https://github.com/karulont/i3lock-blur")
+                 (commit version)))
+               (file-name (git-file-name name version))
+               (sha256
+                (base32
+                 "1bd5nrlga5g1sz1f64gnc3dqy8yfrr4q1ss59krymbpxa1hhf55c"))))
+     (build-system gnu-build-system)
+     (native-inputs
+      `(("pkg-config" ,pkg-config)
+        ("automake" ,automake)
+        ("autoconf" ,autoconf)))
+     (inputs
+      `(("cairo" ,cairo)
+        ("mesa" ,mesa)
+        ("libev" ,libev)
+        ("linux-pam" ,linux-pam)
+        ("libxcb" ,libxcb)
+        ("libxkbcommon" ,libxkbcommon)
+        ("xcb-util" ,xcb-util)
+        ("xcb-util-image" ,xcb-util-image)
+        ("xcb-util-xrm" ,xcb-util-xrm)))
+     (home-page "https://github.com/karulont/i3lock-blur")
+     (synopsis "Lightweight screen locker with transparent blurring background")
+     (description
+      "Simple X11 screen locker with transparent blurring background developed
+ alongside the i3 project.  Despite the name it should work with any X11 window
+ manager.")
+     (license license:expat)))
  (define-public i3blocks
    (package
      (name "i3blocks")
@@@ -613,10 -651,14 +651,10 @@@ Features include
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (icons (string-append out "/share/i3lock-fancy/icons/"))
 -                    (wmctrl (string-append (assoc-ref inputs "wmctrl")
 -                                           "/bin/wmctrl"))
 -                    (mconvert (string-append (assoc-ref inputs "imagemagick")
 -                                             "/bin/convert"))
 -                    (mimport (string-append (assoc-ref inputs "imagemagick")
 -                                            "/bin/import"))
 -                    (awk (string-append (assoc-ref inputs "gawk")
 -                                        "/bin/gawk")))
 +                    (wmctrl (search-input-file inputs "/bin/wmctrl"))
 +                    (mconvert (search-input-file inputs "/bin/convert"))
 +                    (mimport (search-input-file inputs "/bin/import"))
 +                    (awk (search-input-file inputs "/bin/gawk")))
  
                 (substitute* "lock"
                   (("\\$\\(command -V wmctrl\\)") wmctrl)
      (inputs
       `(("imagemagick" ,imagemagick)
         ("wmctrl" ,wmctrl)
+        ("i3lock" ,i3lock)
         ("gawk" ,gawk)))
      (home-page "https://github.com/meskarune/i3lock-fancy")
      (synopsis "Screen locker with screenshot function")
@@@ -919,7 -962,9 +958,7 @@@ experience."
                 (base32
                  "1xaz13iry3fdjhqk9xzg29kbv7hqj8dzzqxr5mhrj8f2m013jdc3"))))
      (build-system meson-build-system)
 -    (arguments
 -     `( #:meson ,meson-0.55
 -        #:build-type "release"))
 +    (arguments `(#:build-type "release"))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("wayland-protocols" ,wayland-protocols)
@@@ -1421,7 -1466,7 +1460,7 @@@ functionality to display information ab
  (define-public wlroots
    (package
      (name "wlroots")
 -    (version "0.12.0")
 +    (version "0.13.0")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
 -        (base32 "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn"))))
 +        (base32 "01plhbnsp5yg18arz0v8fr0pr9l4w4pdzwkg9px486qdvb3s1vgy"))))
      (build-system meson-build-system)
      (arguments
       `(#:configure-flags '("-Dlogind-provider=elogind")
 -       #:meson ,meson-0.55
         #:phases
         (modify-phases %standard-phases
           (add-before 'configure 'hardcode-paths
@@@ -1468,7 -1514,7 +1507,7 @@@ modules for building a Wayland composit
  (define-public sway
    (package
      (name "sway")
 -    (version "1.5.1")
 +    (version "1.6")
      (source
       (origin
         (method git-fetch)
               (commit version)))
         (file-name (git-file-name name version))
         (sha256
 -        (base32 "1xsa3h8zhf29p0mi90baxpr76jkd9pd1gr97ky8cnjbcs4isj9j0"))))
 +        (base32 "0vnplva11yafhbijrk68wy7pw0psn9jm0caaymswq1s951xsn1c8"))))
      (build-system meson-build-system)
      (arguments
       `(#:phases
                ("spdlog" ,spdlog)
                ("wayland" ,wayland)))
      (native-inputs
 -     `(("gcc" ,gcc-8)                   ; for #include <filesystem>
 -       ("glib:bin" ,glib "bin")
 +     `(("glib:bin" ,glib "bin")
         ("pkg-config" ,pkg-config)
         ("scdoc" ,scdoc)
         ("wayland-protocols" ,wayland-protocols)))
diff --combined gnu/packages/xdisorg.scm
@@@ -3,7 -3,7 +3,7 @@@
  ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
  ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
  ;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
 -;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021y Ludovic Courtès <ludo@gnu.org>
 +;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
  ;;; Copyright © 2015 Alexander I.Grafov <grafov@gmail.com>
  ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
@@@ -43,7 -43,6 +43,7 @@@
  ;;; Copyright © 2020 James Smith <jsubuntuxp@disroot.org>
  ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
  ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;; Copyright © 2021 Renzo Poddighe <renzo@poddighe.nl>
@@@ -51,7 -50,6 +51,7 @@@
  ;;; Copyright © 2021 Niklas Eklund <niklas.eklund@posteo.net>
  ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
  ;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
 +;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -234,7 -232,8 +234,7 @@@ program."
         (modify-phases %standard-phases
           (add-before 'build 'configure
             (lambda* (#:key inputs outputs #:allow-other-keys)
 -             (let ((xrandr (string-append (assoc-ref inputs "xrandr")
 -                                          "/bin/xrandr")))
 +             (let ((xrandr (search-input-file inputs "/bin/xrandr")))
                 (substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
                   (("/usr") (assoc-ref outputs "out")))
                 (substitute* "autorandr.py"
@@@ -423,14 -422,14 +423,14 @@@ avoiding password prompts when X11 forw
  (define-public libxkbcommon
    (package
      (name "libxkbcommon")
 -    (version "1.0.3")
 +    (version "1.3.0")
      (source (origin
               (method url-fetch)
               (uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
                                   version ".tar.xz"))
               (sha256
                (base32
 -               "0lmwglj16anhpaq0h830xsl1ivknv75i4lir9bk88aq73s2jy852"))))
 +               "0ysynzzgzd9jdrh1321r4bgw8wd5zljrlyn5y1a31g39xacf02bv"))))
      (build-system meson-build-system)
      (inputs
       `(("libx11" ,libx11)
@@@ -606,7 -605,7 +606,7 @@@ following the mouse."
  (define-public pixman
    (package
      (name "pixman")
 -    (version "0.38.4")
 +    (version "0.40.0")
      (source
       (origin
         (method url-fetch)
           "https://www.cairographics.org/releases/pixman-"
           version ".tar.gz"))
         (sha256
 -        (base32 "1ryxzdf048x7wsx4dlvrr1p00gzwfs7lybnhgc7ygbj0dvyxcrns"))
 +        (base32 "1z13n96m7x91j25qq9wlkxsbq04wfwjhw66ir17frna06zn0s83d"))
         (patches
          (search-patches
           "pixman-CVE-2016-5296.patch"))))
      (build-system gnu-build-system)
      (arguments
 -     '(#:configure-flags '("--disable-static")))
 +     `(#:configure-flags
 +       (list
 +        "--disable-static"
 +        "--enable-timers"
 +        "--enable-gnuplot")))
      (native-inputs
       `(("pkg-config" ,pkg-config)))
      (inputs
  manipulation, providing features such as image compositing and trapezoid
  rasterisation.")
      (home-page "http://www.pixman.org/")
 -    (license license:x11)))
 +    (license license:expat)))
  
  (define-public libdrm
    (package
      (name "libdrm")
 -    (version "2.4.103")
 +    (version "2.4.107")
      (source (origin
                (method url-fetch)
                (uri (string-append
                      version ".tar.xz"))
                (sha256
                 (base32
 -                "08h2nnf4w96b4ql7485mvjgbbsb8rwc0qa93fdm1cq34pbyszq1z"))))
 +                "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65"))))
      (build-system meson-build-system)
      (arguments
       `(#:configure-flags
  
         #:phases (modify-phases %standard-phases
                    (replace 'check
 -                    (lambda _
 -                      (invoke "meson" "test" "--timeout-multiplier" "5"))))))
 -    (inputs
 +                    (lambda* (#:key tests? #:allow-other-keys)
 +                      (when tests?
 +                        (invoke "meson" "test" "--timeout-multiplier" "5")))))))
 +    (propagated-inputs
       `(("libpciaccess" ,libpciaccess)))
      (native-inputs
       `(("pkg-config" ,pkg-config)))
@@@ -1442,12 -1436,15 +1442,12 @@@ the X.Org X Server version 1.7 and late
           (add-after 'split-outputs 'wrap
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((gtk (assoc-ref outputs "gtk"))
 -                    (python-version
 -                     (@ (guix build python-build-system) python-version))
 -                    (python (assoc-ref inputs "python"))
 -                    (sitedir (string-append gtk "/lib/python"
 -                                            (python-version python)
 -                                            "/site-packages")))
 +                    (site-packages (@ (guix build python-build-system)
 +                                      site-packages))
 +                    (site (site-packages inputs outputs)))
                 (wrap-program (string-append gtk "/bin/redshift-gtk")
 -                 `("PYTHONPATH" ":" prefix
 -                   (,(string-append sitedir ":" (getenv "PYTHONPATH"))))
 +                 `("GUIX_PYTHONPATH" ":" prefix
 +                   (,(string-append site ":" (getenv "GUIX_PYTHONPATH"))))
                   `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
                 #t))))))
      (outputs '("out" "gtk"))
@@@ -1560,7 -1557,7 +1560,7 @@@ protocol."
               ;; to Python libraries.
               (wrap-program (string-append (assoc-ref outputs "out")
                                            "/bin/gammastep-indicator")
 -               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
 +               `("PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
                 `("GI_TYPELIB_PATH" ":" prefix
                   (,(getenv "GI_TYPELIB_PATH")))))))))
      (native-inputs
@@@ -1695,45 -1692,30 +1695,45 @@@ Saver extension) library."
      (license license:gpl3+)))
  
  (define-public xsel
 -  (package
 -    (name "xsel")
 -    (version "1.2.0")
 -    (source (origin
 -              (method url-fetch)
 -              (uri (string-append "http://www.vergenet.net/~conrad/software"
 -                                  "/xsel/download/xsel-" version ".tar.gz"))
 -              (sha256
 -               (base32
 -                "070lbcpw77j143jrbkh0y1v10ppn1jwmjf92800w7x42vh4cw9xr"))))
 -    (build-system gnu-build-system)
 -    (inputs
 -     `(("libxt" ,libxt)))
 -    (home-page "http://www.vergenet.net/~conrad/software/xsel/")
 -    (synopsis "Manipulate X selection")
 -    (description
 -     "XSel is a command-line program for getting and setting the contents of
 +  ;; The 1.2.0 release no longer compiles with GCC 8 and upper, see:
 +  ;; https://github.com/kfish/xsel/commit/d88aa9a8dba9228e6780d6bb5a5720a36f854918.
 +  (let ((commit "062e6d373537c60829fa9b5dcddbcd942986b3c3")
 +        (revision "1"))
 +    (package
 +      (name "xsel")
 +      (version (git-version "1.2.0" revision commit))
 +      (source (origin
 +                (method git-fetch)
 +                (uri (git-reference
 +                      (url "https://github.com/kfish/xsel")
 +                      (commit commit)))
 +                (file-name (git-file-name name version))
 +                (sha256
 +                 (base32
 +                  "0fbf80zsc22vcqp59r9fdx4icxhrkv7l3lphw83326jrmkzy6kri"))))
 +      (build-system gnu-build-system)
 +      (arguments
 +       `(#:phases
 +         (modify-phases %standard-phases
 +           (replace 'bootstrap
 +             (lambda _
 +               (invoke "autoreconf" "-vfi"))))))
 +      (native-inputs `(("autoconf" ,autoconf)
 +                       ("automake" ,automake)
 +                       ("libtool" ,libtool)))
 +      (inputs
 +       `(("libxt" ,libxt)))
 +      (home-page "http://www.vergenet.net/~conrad/software/xsel/")
 +      (synopsis "Manipulate X selection")
 +      (description
 +       "XSel is a command-line program for getting and setting the contents of
  the X selection.  Normally this is only accessible by manually highlighting
  information and pasting it with the middle mouse button.
  
  XSel reads from standard input and writes to standard output by default,
  but can also follow a growing file, display contents, delete entries and more.")
 -    (license (license:x11-style "file://COPYING"
 -                                "See COPYING in the distribution."))))
 +      (license (license:x11-style "file://COPYING"
 +                                  "See COPYING in the distribution.")))))
  
  (define-public xdpyprobe
    (package
@@@ -2695,12 -2677,10 +2695,12 @@@ tools to complement clipnotify."
                        (gawk              (assoc-ref inputs "gawk"))
                        (util-linux        (assoc-ref inputs "util-linux"))
                        (xdotool           (assoc-ref inputs "xdotool"))
 -                      (xsel              (assoc-ref inputs "xsel")))
 +                      (xsel              (assoc-ref inputs "xsel"))
 +                      (guile             (search-input-file inputs "bin/guile")))
                   (for-each
                    (lambda (prog)
                      (wrap-script (string-append out "/bin/" prog)
 +                      #:guile guile
                        `("PATH" ":" prefix
                          ,(map (lambda (dir)
                                  (string-append dir "/bin"))
@@@ -3035,3 -3015,31 +3035,31 @@@ System.  This includes such features a
  BounceKeys, and SlowKeys.  It includes a graphical program to help with
  MouseKeys-acceleration management.")
      (license license:bsd-3)))
+ (define-public wlsunset
+   (package
+     (name "wlsunset")
+     (version "0.2.0")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://git.sr.ht/~kennylevinsen/wlsunset/")
+              (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "0hhsddh3rs066rbsjksr8kcwg8lvglbvs67dq0r5wx5c1xcwb51w"))))
+     (build-system meson-build-system)
+     (inputs
+      `(("wayland" ,wayland)
+        ("wayland-protocols" ,wayland-protocols)))
+     (native-inputs
+      `(("pkg-config" ,pkg-config)))
+     (synopsis "Day/night gamma adjustments for Wayland compositors")
+     (home-page "https://sr.ht/~kennylevinsen/wlsunset/")
+     (description
+      "wlunset adjusts gamma based on day-night cycles on Wayland compositors
+ that support @samp{wlr-gamma-control-unstable-v1}.  It is also known as a blue
+ light filter or night light.")
+     (license license:expat)))
diff --combined gnu/packages/xfce.scm
@@@ -15,6 -15,7 +15,7 @@@
  ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
  ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
  ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
+ ;;; Copyright © 2021 André A. Gomes <andremegafone@gmail.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -254,7 -255,7 +255,7 @@@ to share commonly used Xfce widgets amo
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out")))
                 (wrap-program (string-append out "/bin/catfish")
 -                 `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
 +                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
                   `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))
         #:tests? #f))
      (native-inputs
@@@ -435,7 -436,8 +436,7 @@@ management D-Bus specification."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* (string-append "plugins/clock/clock.c")
                 (("/usr/share/zoneinfo")
 -                (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
 -             #t)))))
 +                (search-input-directory inputs "share/zoneinfo"))))))))
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("intltool" ,intltool)
@@@ -780,7 -782,7 +781,7 @@@ like appearance, display, keyboard and 
  (define-public thunar
    (package
      (name "thunar")
-     (version "4.16.8")
+     (version "4.16.8")                            ;stable version = even minor
      (source (origin
                (method url-fetch)
                (uri (string-append "https://archive.xfce.org/src/xfce/"
      (inputs
       `(("exo" ,exo)
         ("gobject-introspection" ,gobject-introspection)
+        ("gvfs" ,gvfs)
         ("libexif" ,libexif)
         ("libgudev" ,libgudev)
         ("libnotify" ,libnotify)
diff --combined gnu/packages/xml.scm
@@@ -5,7 -5,7 +5,7 @@@
  ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
  ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
 -;;; Copyright © 2015, 2016, 2017, 2018, 2021 Efraim Flashner <efraim@flashner.co.il>
 +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
  ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
  ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
@@@ -121,7 -121,8 +121,7 @@@ the entire document."
  (define-public expat
    (package
      (name "expat")
 -    (version "2.2.9")
 -    (replacement expat-2.4.1)
 +    (version "2.4.1")
      (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
                (origin
                  (method url-fetch)
                              "/expat-" version ".tar.xz")))
                  (sha256
                   (base32
 -                  "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
 +                  "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
      (build-system gnu-build-system)
      (arguments
 -     '(#:configure-flags '("--disable-static")))
 +     '(#:phases (modify-phases %standard-phases
 +                  (add-after 'install 'move-static-library
 +                    (lambda* (#:key outputs #:allow-other-keys)
 +                      (let ((out    (assoc-ref outputs "out"))
 +                            (static (assoc-ref outputs "static")))
 +                        (mkdir-p (string-append static "/lib"))
 +                        (link (string-append out "/lib/libexpat.a")
 +                              (string-append static "/lib/libexpat.a"))
 +                        (delete-file (string-append out "/lib/libexpat.a"))
 +                        (substitute* (string-append out "/lib/libexpat.la")
 +                          (("old_library=.*")
 +                           "old_library=''"))))))))
 +    (outputs '("out" "static"))
      (home-page "https://libexpat.github.io/")
      (synopsis "Stream-oriented XML parser library written in C")
      (description
@@@ -157,6 -146,24 +157,6 @@@ stream-oriented parser in which an appl
  things the parser might find in the XML document (like start tags).")
      (license license:expat)))
  
 -;; Replacement package to fix CVE-2013-0340.
 -(define expat-2.4.1
 -  (package
 -    (inherit expat)
 -    (version "2.4.1")
 -    (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
 -              (origin
 -                (method url-fetch)
 -                (uri (list (string-append "mirror://sourceforge/expat/expat/"
 -                                          version "/expat-" version ".tar.xz")
 -                           (string-append
 -                            "https://github.com/libexpat/libexpat/releases/download/R_"
 -                            (string-map dot->underscore version)
 -                            "/expat-" version ".tar.xz")))
 -                (sha256
 -                 (base32
 -                  "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))))
 -
  (define-public libebml
    (package
      (name "libebml")
@@@ -184,43 -191,35 +184,43 @@@ hierarchical form with variable field l
  (define-public libxml2
    (package
      (name "libxml2")
 -    (version "2.9.10")
 +    (version "2.9.12")
      (source (origin
               (method url-fetch)
               (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
                                   version ".tar.gz"))
               (sha256
                (base32
 -               "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
 +               "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8"))
 +             (patches (search-patches "libxml2-parent-pointers.patch"
 +                                      "libxml2-terminating-newline.patch"
 +                                      "libxml2-xpath-recursion-limit.patch"))))
      (build-system gnu-build-system)
 -    (outputs '("out" "static"))
 +    (outputs '("out" "static" "doc"))
      (arguments
       `(#:phases (modify-phases %standard-phases
 -                  (add-after 'install 'move-static-libs
 +                  (add-after 'install 'use-other-outputs
                      (lambda* (#:key outputs #:allow-other-keys)
 -                      (let ((src (string-append (assoc-ref outputs "out") "/lib"))
 +                      (let ((src (assoc-ref outputs "out"))
 +                            (doc (string-append (assoc-ref outputs "doc") "/share"))
                              (dst (string-append (assoc-ref outputs "static")
                                                  "/lib")))
 +                        (mkdir-p doc)
                          (mkdir-p dst)
 +                        (for-each (lambda (dir)
 +                                    (rename-file (string-append src "/share/" dir)
 +                                                 (string-append doc "/" dir)))
 +                                  '("doc" "gtk-doc"))
                          (for-each (lambda (ar)
                                      (rename-file ar (string-append dst "/"
                                                                     (basename ar))))
 -                                  (find-files src "\\.a$"))
 +                                  (find-files (string-append src "/lib") "\\.a$"))
  
                          ;; Remove reference to the static library from the .la
                          ;; file such that Libtool does the right thing when both
                          ;; the shared and static variants are available.
 -                        (substitute* (string-append src "/libxml2.la")
 -                          (("^old_library='libxml2.a'") "old_library=''"))
 -                        #t))))))
 +                        (substitute* (string-append src "/lib/libxml2.la")
 +                          (("^old_library='libxml2.a'") "old_library=''"))))))))
      (home-page "http://www.xmlsoft.org/")
      (synopsis "C parser for XML")
      (inputs `(("xz" ,xz)))
@@@ -295,89 -294,13 +295,14 @@@ formulas and hyperlinks to multiple wor
      (license (list license:bsd-2
                     license:public-domain)))) ; third_party/md5
  
- ;; This is the latest stable release.
- (define-public libxmlplusplus
-   (package
-     (name "libxmlplusplus")
-     (version "3.2.0")
-     (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/libxmlplusplus/libxmlplusplus")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga"))))
-     (build-system gnu-build-system)
-     (arguments
-      `(#:phases
-        (modify-phases %standard-phases
-          (add-after 'unpack 'fix-documentation
-            (lambda* (#:key inputs #:allow-other-keys)
-              (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
-                                           "/xml/dtd/docbook"))
-                    (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
-                                           "/xml/xsl/docbook-xsl-"
-                                           ,(package-version docbook-xsl))))
-                (substitute* '("examples/dom_xpath/example.xml"
-                               "docs/manual/libxml++_without_code.xml")
-                  (("http://.*/docbookx\\.dtd")
-                   (string-append xmldoc "/docbookx.dtd")))
-                (setenv "SGML_CATALOG_FILES"
-                        (string-append xmldoc "/catalog.xml"))
-                (substitute* "docs/manual/docbook-customisation.xsl"
-                  (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
-                   (string-append xsldoc "/html/chunk.xsl"))))
-              #t)))))
-     (propagated-inputs
-      `(("libxml2" ,libxml2)))
-     (inputs
-      `(("glibmm" ,glibmm-2.64)))
-     (native-inputs
-      `(("autoconf" ,autoconf)
-        ("automake" ,automake)
-        ("doxygen" ,doxygen)
-        ("docbook-xml" ,docbook-xml)
-        ("docbook-xsl" ,docbook-xsl)
-        ("graphviz" ,graphviz) ; for dot
-        ("libtool" ,libtool)
-        ("libxslt" ,libxslt)
-        ("mm-common" ,mm-common)
-        ("perl" ,perl)
-        ("pkg-config" ,pkg-config)))
-     (home-page "https://github.com/libxmlplusplus/libxmlplusplus/")
-     (synopsis "C++ bindings for libxml2")
-     (description
-      "libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files.
- It uses libxml2 to access the XML files.")
-     (license license:lgpl2.1+)))
- ;; This is the last release providing the 2.6 API, hence the name.
- ;; This is needed by tascam-gtk
- (define-public libxmlplusplus-2.6
-   (package
-     (inherit libxmlplusplus)
-     (name "libxmlplusplus")
-     (version "2.40.1")
-     (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/libxmlplusplus/libxmlplusplus")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9"))))))
  (define-public python-libxml2
    (package/inherit libxml2
      (name "python-libxml2")
      (source (origin
                (inherit (package-source libxml2))
 -              (patches (cons (search-patch "python-libxml2-utf8.patch")
 -                             (origin-patches (package-source libxml2))))))
 +              (patches
 +                (append (search-patches "python-libxml2-utf8.patch")
 +                        (origin-patches (package-source libxml2))))))
      (build-system python-build-system)
      (outputs '("out"))
      (arguments
                   (format #f "ROOT = r'~a'" libxml2))
                  ;; For 'iconv.h'.
                  (("/opt/include")
 -                 (string-append glibc "/include"))))
 -            #t)))))
 +                 (string-append glibc "/include")))))))))
      (inputs `(("libxml2" ,libxml2)))
      (synopsis "Python bindings for the libxml2 library")))
  
@@@ -2571,18 -2495,15 +2496,18 @@@ The central program included in this pa
  (define-public python-elementpath
    (package
      (name "python-elementpath")
 -    (version "1.4.0")
 +    (version "2.0.3")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "elementpath" version))
         (sha256
          (base32
 -         "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
 +         "1kxx573ywqfh6j6aih2i6hhsya6kz79qq4bgz6yskwk6b18jyr8z"))))
      (build-system python-build-system)
 +    ;; The test suite is not run, to avoid a dependency cycle with
 +    ;; python-xmlschema.
 +    (arguments `(#:tests? #f))
      (home-page
       "https://github.com/sissaschool/elementpath")
      (synopsis
@@@ -2599,20 -2520,13 +2524,20 @@@ because lxml.etree already has its own 
  (define-public python-lxml
    (package
      (name "python-lxml")
 -    (version "4.4.2")
 +    (version "4.6.3")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "lxml" version))
         (sha256
 -        (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
 +        (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))
 +       ;; Adapt a test to libxml2 2.9.12, taken from this commit:
 +       ;; https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047e
 +       (modules '((guix build utils)))
 +       (snippet
 +        '(substitute* "src/lxml/tests/test_etree.py"
 +             (("self\\.assertEqual\\(\\{'hha': None\\}, el\\.nsmap\\)")
 +              "self.assertEqual({}, el.nsmap)")))))
      (build-system python-build-system)
      (arguments
       `(#:phases (modify-phases %standard-phases
@@@ -2635,7 -2549,7 +2560,7 @@@ libxml2 and libxslt."
  (define-public python-xmlschema
    (package
      (name "python-xmlschema")
 -    (version "1.1.2")
 +    (version "1.2.5")
      (source (origin
                ;; Unit tests are not distributed with the PyPI archive.
                (method git-fetch)
                (file-name (git-file-name name version))
                (sha256
                 (base32
 -                "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
 +                "0rsa75x86gdjalvy4riq7613szb616hff80crx006chyppzdkxmq"))))
      (build-system python-build-system)
      (arguments
       '(#:phases
         (modify-phases %standard-phases
           (replace 'check
 -           (lambda* (#:key (tests? #t) #:allow-other-keys)
 +           (lambda* (#:key tests? #:allow-other-keys)
               (if tests?
 -                 (begin
 -                   (setenv "PYTHONPATH"
 -                           (string-append "./build/lib:"
 -                                          (getenv "PYTHONPATH")))
 -                   (invoke "python" "-m" "unittest" "-v"))
 -                 (format #t "test suite not run~%"))
 -             #t)))))
 +                 ;; Disable test_export_remote__issue_187, which is known to
 +                 ;; fail (see:
 +                 ;; https://github.com/sissaschool/xmlschema/issues/206).
 +                 (invoke "python" "-m" "unittest" "-v"
 +                         "-k" "not test_export_remote__issue_187")
 +                 (format #t "test suite not run~%")))))))
      (native-inputs
       `(("python-lxml" ,python-lxml)))   ;for tests
      (propagated-inputs
@@@ -1,7 -1,6 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
  ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 +;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
  ;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
  ;;;
  ;;; This file is part of GNU Guix.
@@@ -22,7 -21,7 +22,7 @@@
  (define-module (guix build-system dune)
    #:use-module (guix store)
    #:use-module (guix utils)
 -  #:use-module (guix derivations)
 +  #:use-module (guix gexp)
    #:use-module (guix search-paths)
    #:use-module (guix build-system)
    #:use-module ((guix build-system gnu) #:prefix gnu:)
                  #:allow-other-keys
                  #:rest arguments)
    "Return a bag for NAME."
+   ;; Flags that put dune into reproducible build mode.
+   (define dune-release-flags
+     (if (version>=? (package-version dune) "2.5.0")
+         ;; For dune >= 2.5.0 this is just --release.
+         ''("--release")
+         ;; --release does not exist before 2.5.0.  Replace with flags compatible
+         ;; with our old ocaml4.07-dune (1.11.3)
+         ''("--root" "." "--ignore-promoted-rules" "--no-config"
+            "--profile" "release")))
    (define private-keywords
 -    '(#:source #:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
 +    '(#:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
  
    (and (not target)                               ;XXX: no cross-compilation
         (let ((base (ocaml:lower name
             (build-inputs `(("dune" ,dune)
                             ,@(bag-build-inputs base)))
             (build dune-build)
-            (arguments (strip-keyword-arguments private-keywords arguments))))))
+            (arguments (append
+                        `(#:dune-release-flags ,dune-release-flags)
+                        (strip-keyword-arguments private-keywords arguments)))))))
  
 -(define* (dune-build store name inputs
 -                     #:key (guile #f)
 +(define* (dune-build name inputs
 +                     #:key
 +                     guile source
                       (outputs '("out"))
                       (search-paths '())
                       (build-flags ''())
                       (out-of-source? #t)
                       (jbuild? #f)
                       (package #f)
-                      (profile "release")
+                      (dune-release-flags ''())
                       (tests? #t)
                       (test-flags ''())
                       (test-target "test")
    "Build SOURCE using OCAML, and with INPUTS. This assumes that SOURCE
  provides a 'setup.ml' file as its build system."
    (define builder
 -    `(begin
 -       (use-modules ,@modules)
 -       (dune-build #:source ,(match (assoc-ref inputs "source")
 -                               (((? derivation? source))
 -                                (derivation->output-path source))
 -                               ((source)
 -                                source)
 -                               (source
 -                                source))
 -                   #:system ,system
 -                   #:outputs %outputs
 -                   #:inputs %build-inputs
 -                   #:search-paths ',(map search-path-specification->sexp
 -                                         search-paths)
 -                   #:phases ,phases
 -                   #:test-flags ,test-flags
 -                   #:build-flags ,build-flags
 -                   #:out-of-source? ,out-of-source?
 -                   #:jbuild? ,jbuild?
 -                   #:package ,package
 -                   #:dune-release-flags ,dune-release-flags
 -                   #:tests? ,tests?
 -                   #:test-target ,test-target
 -                   #:install-target ,install-target
 -                   #:validate-runpath? ,validate-runpath?
 -                   #:patch-shebangs? ,patch-shebangs?
 -                   #:strip-binaries? ,strip-binaries?
 -                   #:strip-flags ,strip-flags
 -                   #:strip-directories ,strip-directories)))
 +    (with-imported-modules imported-modules
 +      #~(begin
 +          (use-modules #$@modules)
 +          (dune-build #:source #$source
 +                      #:system #$system
 +                      #:outputs (list #$@(map (lambda (name)
 +                                                #~(cons #$name
 +                                                        (ungexp output name)))
 +                                              outputs))
 +                      #:inputs (map (lambda (tuple)
 +                                      (apply cons tuple))
 +                                    '#$inputs)
 +                      #:search-paths '#$(map search-path-specification->sexp
 +                                             search-paths)
 +                      #:phases #$phases
 +                      #:test-flags #$test-flags
 +                      #:build-flags #$build-flags
 +                      #:out-of-source? #$out-of-source?
 +                      #:jbuild? #$jbuild?
 +                      #:package #$package
-                       #:profile #$profile
++                      #:dune-release-flags #$dune-release-flags
 +                      #:tests? #$tests?
 +                      #:test-target #$test-target
 +                      #:install-target #$install-target
 +                      #:validate-runpath? #$validate-runpath?
 +                      #:patch-shebangs? #$patch-shebangs?
 +                      #:strip-binaries? #$strip-binaries?
 +                      #:strip-flags #$strip-flags
 +                      #:strip-directories #$strip-directories))))
  
 -  (define guile-for-build
 -    (match guile
 -      ((? package?)
 -       (package-derivation store guile system #:graft? #f))
 -      (#f                                         ; the default
 -       (let* ((distro (resolve-interface '(gnu packages commencement)))
 -              (guile  (module-ref distro 'guile-final)))
 -         (package-derivation store guile system #:graft? #f)))))
 -
 -  (build-expression->derivation store name builder
 -                                #:system system
 -                                #:inputs inputs
 -                                #:modules imported-modules
 -                                #:outputs outputs
 -                                #:guile-for-build guile-for-build))
 +  (gexp->derivation name builder
 +                    #:system system
 +                    #:target #f
 +                    #:guile-for-build guile))
  
  (define dune-build-system
    (build-system
diff --combined guix/build-system/go.scm
@@@ -2,7 -2,7 +2,8 @@@
  ;;; Copyright © 2016 Petter <petter@mykolab.ch>
  ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
  ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 +;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+ ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
  
  (define-module (guix build-system go)
    #:use-module (guix utils)
 -  #:use-module (guix derivations)
 +  #:use-module (guix gexp)
 +  #:use-module (guix store)
 +  #:use-module (guix monads)
    #:use-module (guix search-paths)
    #:use-module (guix build-system)
    #:use-module (guix build-system gnu)
    #:use-module (guix packages)
    #:use-module (ice-9 match)
    #:use-module (ice-9 regex)
+   #:use-module (srfi srfi-1)
    #:export (%go-build-system-modules
              go-build
              go-build-system
@@@ -81,6 -80,24 +83,24 @@@ present) if a pseudo-version pattern i
  commit hash and its date rather than a proper release tag."
    (regexp-exec %go-pseudo-version-rx version))
  
+ (define (go-target target)
+     ;; Parse the nix-system equivalent of the target and set the
+     ;; target for compilation accordingly.
+     (match (string-split (gnu-triplet->nix-system target) #\-)
+       ((arch os)
+        (list (match arch
+                ("aarch64" "arm64")
+                ("armhf" "arm")
+                ("powerpc64le" "ppc64le")
+                ("powerpc64" "ppc64")
+                ("i686" "386")
+                ("x86_64" "amd64")
+                ("mips64el" "mips64le")
+                (_ arch))
+              (match os
+                ((or "mingw32" "cygwin") "windows")
+                (_ os))))))
  (define %go-build-system-modules
    ;; Build-side modules imported and used by default.
    `((guix build go-build-system)
                  #:rest arguments)
    "Return a bag for NAME."
    (define private-keywords
 -    '(#:source #:target #:go #:inputs #:native-inputs))
 +    '(#:target #:go #:inputs #:native-inputs))
  
-   (and (not target)                               ;XXX: no cross-compilation
-        (bag
-          (name name)
-          (system system)
-          (host-inputs `(,@(if source
-                               `(("source" ,source))
-                               '())
-                         ,@inputs
-                         ;; Keep the standard inputs of 'gnu-build-system'.
-                         ,@(standard-packages)))
-          (build-inputs `(("go" ,go)
-                          ,@native-inputs))
-          (outputs outputs)
-          (build go-build)
-          (arguments (strip-keyword-arguments private-keywords arguments)))))
+   (bag
+     (name name)
+     (system system)
+     (target target)
+     (build-inputs `(,@(if source
+                         `(("source" ,source))
+                         '())
+                      ,@`(("go" ,go))
+                      ,@native-inputs
+                      ,@(if target '() inputs)
+                      ,@(if target
+                          ;; Use the standard cross inputs of
+                          ;; 'gnu-build-system'.
+                          (standard-cross-packages target 'host)
+                          '())
+                      ;; Keep the standard inputs of 'gnu-build-system'.
+                      ,@(standard-packages)))
+     (host-inputs (if target inputs '()))
+     ;; The cross-libc is really a target package, but for bootstrapping
+     ;; reasons, we can't put it in 'host-inputs'.  Namely, 'cross-gcc' is a
+     ;; native package, so it would end up using a "native" variant of
+     ;; 'cross-libc' (built with 'gnu-build'), whereas all the other packages
+     ;; would use a target variant (built with 'gnu-cross-build'.)
+     (target-inputs (if target
+                      (standard-cross-packages target 'target)
+                      '()))
+     (outputs outputs)
+     (build (if target go-cross-build go-build))
+     (arguments (strip-keyword-arguments private-keywords arguments))))
  
 -(define* (go-build store name inputs
 +(define* (go-build name inputs
                     #:key
 -                   (phases '(@ (guix build go-build-system)
 -                               %standard-phases))
 +                   source
 +                   (phases '%standard-phases)
                     (outputs '("out"))
                     (search-paths '())
                     (install-source? #t)
                     (tests? #t)
                     (allow-go-reference? #f)
                     (system (%current-system))
+                    (goarch (first (go-target (%current-system))))
+                    (goos (last (go-target (%current-system))))
                     (guile #f)
                     (imported-modules %go-build-system-modules)
                     (modules '((guix build go-build-system)
                                (guix build union)
                                (guix build utils))))
    (define builder
 -   `(begin
 -      (use-modules ,@modules)
 -      (go-build #:name ,name
 -                #:source ,(match (assoc-ref inputs "source")
 -                                 (((? derivation? source))
 -                                  (derivation->output-path source))
 -                                 ((source)
 -                                  source)
 -                                 (source
 -                                  source))
 -                #:system ,system
 -                #:phases ,phases
 -                #:outputs %outputs
 -                #:goarch ,goarch
 -                #:goos ,goos
 -                #:search-paths ',(map search-path-specification->sexp
 -                                      search-paths)
 -                #:install-source? ,install-source?
 -                #:import-path ,import-path
 -                #:unpack-path ,unpack-path
 -                #:build-flags ,build-flags
 -                #:tests? ,tests?
 -                #:allow-go-reference? ,allow-go-reference?
 -                #:inputs %build-inputs)))
 -
 -  (define guile-for-build
 -    (match guile
 -      ((? package?)
 -       (package-derivation store guile system #:graft? #f))
 -      (#f                                         ; the default
 -       (let* ((distro (resolve-interface '(gnu packages commencement)))
 -              (guile  (module-ref distro 'guile-final)))
 -         (package-derivation store guile system
 -                             #:graft? #f)))))
 -
 -  (build-expression->derivation store name builder
 -                                #:inputs inputs
 -                                #:system system
 -                                #:modules imported-modules
 -                                #:outputs outputs
 -                                #:guile-for-build guile-for-build))
 +    (with-imported-modules imported-modules
 +      #~(begin
 +          (use-modules #$@modules)
 +          (go-build #:name #$name
 +                    #:source #+source
 +                    #:system #$system
 +                    #:phases #$phases
 +                    #:outputs #$(outputs->gexp outputs)
++                    #:goarch #$goarch
++                    #:goos #$goos
 +                    #:search-paths '#$(sexp->gexp
 +                                       (map search-path-specification->sexp
 +                                            search-paths))
 +                    #:install-source? #$install-source?
 +                    #:import-path #$import-path
 +                    #:unpack-path #$unpack-path
 +                    #:build-flags #$build-flags
 +                    #:tests? #$tests?
 +                    #:allow-go-reference? #$allow-go-reference?
 +                    #:inputs #$(input-tuples->gexp inputs)))))
 +
 +  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
 +                                                  system #:graft? #f)))
 +    (gexp->derivation name builder
 +                      #:system system
 +                      #:guile-for-build guile)))
  
+ (define* (go-cross-build store name
+                          #:key
+                          target native-drvs target-drvs
+                          (phases '(@ (guix build go-build-system)
+                                      %standard-phases))
+                          (outputs '("out"))
+                          (search-paths '())
+                          (native-search-paths '())
+                          (install-source? #t)
+                          (import-path "")
+                          (unpack-path "")
+                          (build-flags ''())
+                          (tests? #f) ; nothing can be done
+                          (allow-go-reference? #f)
+                          (system (%current-system))
+                          (goarch (first (go-target target)))
+                          (goos (last (go-target target)))
+                          (guile #f)
+                          (imported-modules %go-build-system-modules)
+                          (modules '((guix build go-build-system)
+                                     (guix build union)
+                                     (guix build utils))))
+   "Cross-build NAME using GO, where TARGET is a GNU triplet and with INPUTS."
+   (define builder
+     `(begin
+        (use-modules ,@modules)
+        (let ()
+          (define %build-host-inputs
+            ',(map (match-lambda
+                     ((name (? derivation? drv) sub ...)
+                      `(,name . ,(apply derivation->output-path drv sub)))
+                     ((name path)
+                      `(,name . ,path)))
+                   native-drvs))
+          (define %build-target-inputs
+            ',(map (match-lambda
+                     ((name (? derivation? drv) sub ...)
+                      `(,name . ,(apply derivation->output-path drv sub)))
+                     ((name (? package? pkg) sub ...)
+                      (let ((drv (package-cross-derivation store pkg
+                                                           target system)))
+                        `(,name . ,(apply derivation->output-path drv sub))))
+                     ((name path)
+                      `(,name . ,path)))
+                   target-drvs))
+          (go-build #:name ,name
+                    #:source ,(match (assoc-ref native-drvs "source")
+                                     (((? derivation? source))
+                                      (derivation->output-path source))
+                                     ((source)
+                                      source)
+                                     (source
+                                       source))
+                    #:system ,system
+                    #:phases ,phases
+                    #:outputs %outputs
+                    #:target ,target
+                    #:goarch ,goarch
+                    #:goos ,goos
+                    #:inputs %build-target-inputs
+                    #:native-inputs %build-host-inputs
+                    #:search-paths ',(map search-path-specification->sexp
+                                          search-paths)
+                    #:native-search-paths ',(map
+                                              search-path-specification->sexp
+                                              native-search-paths)
+                    #:install-source? ,install-source?
+                    #:import-path ,import-path
+                    #:unpack-path ,unpack-path
+                    #:build-flags ,build-flags
+                    #:tests? ,tests?
+                    #:allow-go-reference? ,allow-go-reference?
+                    #:inputs %build-inputs))))
+     (define guile-for-build
+       (match guile
+              ((? package?)
+               (package-derivation store guile system #:graft? #f))
+              (#f                               ; the default
+               (let* ((distro (resolve-interface '(gnu packages commencement)))
+                      (guile  (module-ref distro 'guile-final)))
+                 (package-derivation store guile system #:graft? #f)))))
+     (build-expression->derivation store name builder
+                                   #:system system
+                                   #:inputs (append native-drvs target-drvs)
+                                   #:outputs outputs
+                                   #:modules imported-modules
+                                   #:guile-for-build guile-for-build))
  (define go-build-system
    (build-system
      (name 'go)
@@@ -1,7 -1,6 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
  ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 +;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -21,8 -20,7 +21,8 @@@
  (define-module (guix build-system linux-module)
    #:use-module (guix store)
    #:use-module (guix utils)
 -  #:use-module (guix derivations)
 +  #:use-module (guix gexp)
 +  #:use-module (guix monads)
    #:use-module (guix search-paths)
    #:use-module (guix build-system)
    #:use-module (guix build-system gnu)
                  #:rest arguments)
    "Return a bag for NAME."
    (define private-keywords
 -    `(#:source #:target #:gcc #:kmod #:linux #:inputs #:native-inputs
 +    `(#:target #:gcc #:kmod #:linux #:inputs #:native-inputs
        ,@(if target '() '(#:target))))
  
    (bag
      (build (if target linux-module-build-cross linux-module-build))
      (arguments (strip-keyword-arguments private-keywords arguments))))
  
 -(define* (linux-module-build store name inputs
 +(define* (linux-module-build name inputs
                               #:key
 -                             target
 +                             source target
                               (search-paths '())
                               (tests? #t)
 -                             (phases '(@ (guix build linux-module-build-system)
 -                                         %standard-phases))
 +                             (phases '%standard-phases)
                               (outputs '("out"))
                               (make-flags ''())
                               (system (%current-system))
+                              (source-directory ".")
                               (guile #f)
                               (substitutable? #t)
                               (imported-modules
                                          (guix build utils))))
    "Build SOURCE using LINUX, and with INPUTS."
    (define builder
 -    `(begin
 -       (use-modules ,@modules)
 -       (linux-module-build #:name ,name
 -                     #:source ,(match (assoc-ref inputs "source")
 -                                      (((? derivation? source))
 -                                       (derivation->output-path source))
 -                                      ((source)
 -                                       source)
 -                                      (source
 -                                       source))
 -                     #:source-directory ,source-directory
 -                     #:search-paths ',(map search-path-specification->sexp
 -                                           search-paths)
 -                     #:phases ,phases
 -                     #:system ,system
 -                     #:target ,target
 -                     #:arch ,(system->arch (or target system))
 -                     #:tests? ,tests?
 -                     #:outputs %outputs
 -                     #:make-flags ,make-flags
 -                     #:inputs %build-inputs)))
 +    (with-imported-modules imported-modules
 +      #~(begin
 +          (use-modules #$@(sexp->gexp modules))
 +          (linux-module-build #:name #$name
 +                              #:source #+source
++                              #:source-directory #$source-directory
 +                              #:search-paths '#$(sexp->gexp
 +                                                 (map search-path-specification->sexp
 +                                                      search-paths))
 +                              #:phases #$phases
 +                              #:system #$system
 +                              #:target #$target
 +                              #:arch #$(system->arch (or target system))
 +                              #:tests? #$tests?
 +                              #:outputs #$(outputs->gexp outputs)
 +                              #:make-flags #$make-flags
 +                              #:inputs #$(input-tuples->gexp inputs)))))
  
 -  (define guile-for-build
 -    (match guile
 -      ((? package?)
 -       (package-derivation store guile system #:graft? #f))
 -      (#f                                         ; the default
 -       (let* ((distro (resolve-interface '(gnu packages commencement)))
 -              (guile  (module-ref distro 'guile-final)))
 -         (package-derivation store guile system #:graft? #f)))))
 -
 -  (build-expression->derivation store name builder
 -                                #:system system
 -                                #:inputs inputs
 -                                #:modules imported-modules
 -                                #:outputs outputs
 -                                #:guile-for-build guile-for-build
 -                                #:substitutable? substitutable?))
 +  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
 +                                                  system #:graft? #f)))
 +    (gexp->derivation name builder
 +                      #:system system
 +                      #:guile-for-build guile
 +                      #:substitutable? substitutable?)))
  
  (define* (linux-module-build-cross
 -          store name
 +          name
            #:key
 -          target native-drvs target-drvs
 +          source target
 +          build-inputs target-inputs host-inputs
            (guile #f)
            (outputs '("out"))
            (make-flags ''())
            (search-paths '())
            (native-search-paths '())
            (tests? #f)
 -          (phases '(@ (guix build linux-module-build-system)
 -                      %standard-phases))
 +          (phases '%standard-phases)
            (system (%current-system))
            (substitutable? #t)
            (imported-modules
            (modules '((guix build linux-module-build-system)
                       (guix build utils))))
    (define builder
 -    `(begin
 -       (use-modules ,@modules)
 -       (let ()
 -         (define %build-host-inputs
 -           ',(map (match-lambda
 -                    ((name (? derivation? drv) sub ...)
 -                     `(,name . ,(apply derivation->output-path drv sub)))
 -                    ((name path)
 -                     `(,name . ,path)))
 -                  native-drvs))
 +    (with-imported-modules imported-modules
 +      #~(begin
 +          (use-modules #$@(sexp->gexp modules))
  
 -         (define %build-target-inputs
 -           ',(map (match-lambda
 -                    ((name (? derivation? drv) sub ...)
 -                     `(,name . ,(apply derivation->output-path drv sub)))
 -                    ((name (? package? pkg) sub ...)
 -                     (let ((drv (package-cross-derivation store pkg
 -                                                          target system)))
 -                       `(,name . ,(apply derivation->output-path drv sub))))
 -                    ((name path)
 -                     `(,name . ,path)))
 -                  target-drvs))
 +          (define %build-host-inputs
 +            '#+(input-tuples->gexp build-inputs))
  
 -         (linux-module-build #:name ,name
 -                             #:source ,(match (assoc-ref native-drvs "source")
 -                                         (((? derivation? source))
 -                                          (derivation->output-path source))
 -                                         ((source)
 -                                          source)
 -                                         (source
 -                                          source))
 -                             #:system ,system
 -                             #:target ,target
 -                             #:arch ,(system->arch (or target system))
 -                             #:outputs %outputs
 -                             #:make-flags ,make-flags
 -                             #:inputs %build-target-inputs
 -                             #:native-inputs %build-host-inputs
 -                             #:search-paths
 -                             ',(map search-path-specification->sexp
 -                                    search-paths)
 -                             #:native-search-paths
 -                             ',(map
 -                                search-path-specification->sexp
 -                                native-search-paths)
 -                             #:phases ,phases
 -                             #:tests? ,tests?))))
 +          (define %build-target-inputs
 +            (append #$(input-tuples->gexp host-inputs)
 +                    #+(input-tuples->gexp target-inputs)))
  
 -  (define guile-for-build
 -    (match guile
 -      ((? package?)
 -       (package-derivation store guile system #:graft? #f))
 -      (#f                                         ; the default
 -       (let* ((distro (resolve-interface '(gnu packages commencement)))
 -              (guile  (module-ref distro 'guile-final)))
 -         (package-derivation store guile system #:graft? #f)))))
 +          (linux-module-build #:name #$name
 +                              #:source #+source
 +                              #:system #$system
 +                              #:target #$target
 +                              #:arch #$(system->arch (or target system))
 +                              #:outputs #$(outputs->gexp outputs)
 +                              #:make-flags #$make-flags
 +                              #:inputs %build-target-inputs
 +                              #:native-inputs %build-host-inputs
 +                              #:search-paths
 +                              '#$(sexp->gexp
 +                                  (map search-path-specification->sexp
 +                                       search-paths))
 +                              #:native-search-paths
 +                              '#$(map
 +                                  search-path-specification->sexp
 +                                  native-search-paths)
 +                              #:phases #$phases
 +                              #:tests? #$tests?))))
  
 -  (build-expression->derivation store name builder
 -                                #:system system
 -                                #:inputs (append native-drvs target-drvs)
 -                                #:outputs outputs
 -                                #:modules imported-modules
 -                                #:guile-for-build guile-for-build
 -                                #:substitutable? substitutable?))
 +  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
 +                                                  system #:graft? #f)))
 +    (gexp->derivation name builder
 +                      #:system system
 +                      #:guile-for-build guile
 +                      #:substitutable? substitutable?)))
  
  (define linux-module-build-system
    (build-system
diff --combined guix/import/elpa.scm
@@@ -4,6 -4,7 +4,7 @@@
  ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
  ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
  ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
+ ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -80,6 -81,7 +81,7 @@@ NAMES (strings).
    (let ((elpa-archives
           '((gnu . "https://elpa.gnu.org/packages")
             (gnu/http . "http://elpa.gnu.org/packages") ;for testing
+            (nongnu . "https://elpa.nongnu.org/nongnu")
             (melpa-stable . "https://stable.melpa.org/packages")
             (melpa . "https://melpa.org/packages"))))
      (assq-ref elpa-archives repo)))
@@@ -257,7 -259,7 +259,7 @@@ RECIPE.
       ((assoc-ref recipe #:commit)
        => (lambda (commit) (cons 'commit commit)))
       (else
-       '(branch . "master"))))
+       '())))
  
    (let-values (((directory commit) (download-git-repository url ref)))
      `(origin
@@@ -350,7 -352,9 +352,7 @@@ type '<elpa-package>'.
                            (elpa-package-inputs pkg))))
  
    (define dependencies
 -    (map (lambda (n)
 -           (let ((new-n (elpa-name->package-name n)))
 -             (list new-n (list 'unquote (string->symbol new-n)))))
 +    (map (compose string->symbol elpa-name->package-name)
           dependencies-names))
  
    (define (maybe-inputs input-type inputs)
        (()
         '())
        ((inputs ...)
 -       (list (list input-type
 -                   (list 'quasiquote inputs))))))
 +       (list (list input-type `(list ,@inputs))))))
  
    (define melpa-source
      (melpa-recipe->origin melpa-recipe))
diff --combined guix/lint.scm
@@@ -82,7 -82,6 +82,7 @@@
    #:export (check-description-style
              check-inputs-should-be-native
              check-inputs-should-not-be-an-input-at-all
 +            check-input-labels
              check-wrapper-inputs
              check-patch-file-names
              check-patch-headers
@@@ -504,37 -503,6 +504,37 @@@ of a package, and INPUT-NAMES, a list o
           (package-input-intersection (package-direct-inputs package)
                                       input-names))))
  
 +(define (check-input-labels package)
 +  "Emit a warning for labels that differ from the corresponding package name."
 +  (define (check input-kind package-inputs)
 +    (define (warning label name)
 +      (make-warning package
 +                    (G_ "label '~a' does not match package name '~a'")
 +                    (list label name)
 +                    #:field input-kind))
 +
 +    (append-map (match-lambda
 +                  (((? string? label) (? package? dependency))
 +                   (if (string=? label (package-name dependency))
 +                       '()
 +                       (list (warning label (package-name dependency)))))
 +                  (((? string? label) (? package? dependency) output)
 +                   (let ((expected (string-append (package-name dependency)
 +                                                  ":" output)))
 +                     (if (string=? label expected)
 +                         '()
 +                         (list (warning label expected)))))
 +                  (_
 +                   '()))
 +                (package-inputs package)))
 +
 +  (append-map (match-lambda
 +                ((kind proc)
 +                 (check kind proc)))
 +              `((native-inputs ,package-native-inputs)
 +                (inputs ,package-inputs)
 +                (propagated-inputs ,package-propagated-inputs))))
 +
  (define (report-wrap-program-error package wrapper-name)
    "Warn that \"bash-minimal\" is missing from 'inputs', while WRAPPER-NAME
  requires it."
@@@ -1594,7 -1562,11 +1594,11 @@@ Disarchive entry refers to non-existen
                                                #:field 'source)))))))
                     ((? content?)
                      '())))
-                '()))))
+                '()))
+           (_
+            (list (make-warning package
+                                (G_ "unsupported source type")
+                                #:field 'source)))))
        (match-lambda*
          (('swh-error url method response)
           (response->warning url method response))
@@@ -1783,10 -1755,6 +1787,10 @@@ them for PACKAGE.
       (name        'inputs-should-not-be-input)
       (description "Identify inputs that shouldn't be inputs at all")
       (check       check-inputs-should-not-be-an-input-at-all))
 +   (lint-checker
 +     (name        'input-labels)
 +     (description "Identify input labels that do not match package names")
 +     (check       check-input-labels))
     (lint-checker
       (name        'wrapper-inputs)
       (description "Make sure 'wrap-program' can finds its interpreter.")
diff --combined guix/packages.scm
@@@ -5,7 -5,6 +5,7 @@@
  ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
  ;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 +;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
  ;;;
  ;;; This file is part of GNU Guix.
@@@ -24,8 -23,6 +24,8 @@@
  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
  
  (define-module (guix packages)
 +  #:use-module ((guix build utils) #:select (compressor tarball?
 +                                                        strip-store-file-name))
    #:use-module (guix utils)
    #:use-module (guix records)
    #:use-module (guix store)
@@@ -55,7 -52,7 +55,8 @@@
    #:re-export (%current-system
                 %current-target-system
                 search-path-specification)         ;for convenience
 +  #:re-export-and-replace (delete)                ;used as syntactic keyword
+   #:replace ((define-public* . define-public))
    #:export (content-hash
              content-hash?
              content-hash-algorithm
              package-supported-systems
              package-properties
              package-location
+             package-definition-location
              hidden-package
              hidden-package?
              package-superseded
              deprecated-package
              package-field-location
  
 +            this-package-input
 +            this-package-native-input
 +
 +            lookup-package-input
 +            lookup-package-native-input
 +            lookup-package-propagated-input
 +            lookup-package-direct-input
 +
 +            prepend                               ;syntactic keyword
 +            replace                               ;syntactic keyword
 +            modify-inputs
 +
              package-direct-sources
              package-transitive-sources
              package-direct-inputs
@@@ -289,8 -275,8 +291,8 @@@ as base32.  Otherwise, it must be a byt
               (default '()) (delayed))
  
    (snippet   origin-snippet (default #f))         ; sexp or #f
 -  (patch-flags  origin-patch-flags                ; list of strings
 -                (default '("-p1")))
 +  (patch-flags  origin-patch-flags                ; string-list gexp
 +                (default %default-patch-flags))
  
    ;; Patching requires Guile, GNU Patch, and a few more.  These two fields are
    ;; used to specify these dependencies when needed.
@@@ -338,9 -324,6 +340,9 @@@ specifications to 'hash'.
  
  (set-record-type-printer! <origin> print-origin)
  
 +(define %default-patch-flags
 +  #~("-p1"))
 +
  (define (origin-actual-file-name origin)
    "Return the file name of ORIGIN, either its 'file-name' field or the file
  name of its URI."
    ;; This is the list of system types that are supported.  By default, we
    ;; expect all packages to build successfully here.
    '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"
 -    "powerpc64le-linux"))
 +    "powerpc64le-linux" "powerpc-linux"))
  
  (define %hurd-systems
    ;; The GNU/Hurd systems for which support is being developed.
    ;;
    ;; XXX: MIPS is unavailable in CI:
    ;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
 -  (fold delete %supported-systems '("mips64el-linux")))
 +  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
 +
 +(define-inlinable (sanitize-inputs inputs)
 +  "Sanitize INPUTS by turning it into a list of name/package tuples if it's
 +not already the case."
 +  (cond ((null? inputs) inputs)
 +        ((and (pair? (car inputs))
 +              (string? (caar inputs)))
 +         inputs)
 +        (else (map add-input-label inputs))))
  
+ (define-syntax current-location-vector
+   (lambda (s)
+     "Like 'current-source-location' but expand to a literal vector with
+ one-indexed line numbers."
+     ;; Storing a literal vector in .go files is more efficient than storing an
+     ;; alist: less initialization code, fewer relocations, etc.
+     (syntax-case s ()
+       ((_)
+        (match (syntax-source s)
+          (#f #f)
+          (properties
+           (let ((file   (assq-ref properties 'filename))
+                 (line   (assq-ref properties 'line))
+                 (column (assq-ref properties 'column)))
+             (and file line column
+                  #`#(#,file #,(+ 1 line) #,column)))))))))
+ (define-inlinable (sanitize-location loc)
+   ;; Convert LOC to a vector or to #f.
+   (cond ((vector? loc) loc)
+         ((not loc) loc)
+         (else (vector (location-file loc)
+                       (location-line loc)
+                       (location-column loc)))))
+ (define-syntax-parameter current-definition-location
+   ;; Location of the encompassing 'define-public'.
+   (const #f))
+ (define-syntax define-public*
+   (lambda (s)
+     "Like 'define-public' but set 'current-definition-location' for the
+ lexical scope of its body."
+     (define location
+       (match (syntax-source s)
+         (#f #f)
+         (properties
+          (let ((line   (assq-ref properties 'line))
+                (column (assq-ref properties 'column)))
+            ;; Don't repeat the file name since it's redundant with 'location'.
+            ;; Encode the whole thing so that it fits in a fixnum on 32-bit
+            ;; platforms, which leaves us 29 bits: 7 bits for COLUMN (which is
+            ;; almost always zero), and 22 bits for LINE.
+            (and line column
+                 (logior (ash (logand #x7f column) 22)
+                         (logand (- (expt 2 22) 1) (+ 1 line))))))))
+     (syntax-case s ()
+       ((_ prototype body ...)
+        #`(define-public prototype
+            (syntax-parameterize ((current-definition-location
+                                   (lambda (s) #,location)))
+              body ...))))))
  ;; A package.
  (define-record-type* <package>
    package make-package
               (default '()) (thunked))
  
    (inputs package-inputs                  ; input packages or derivations
 -          (default '()) (thunked))
 +          (default '()) (thunked)
 +          (sanitize sanitize-inputs))
    (propagated-inputs package-propagated-inputs    ; same, but propagated
 -                     (default '()) (thunked))
 +                     (default '()) (thunked)
 +                     (sanitize sanitize-inputs))
    (native-inputs package-native-inputs    ; native input packages/derivations
 -                 (default '()) (thunked))
 +                 (default '()) (thunked)
 +                 (sanitize sanitize-inputs))
  
    (outputs package-outputs                ; list of strings
             (default '("out")))
  
    (properties package-properties (default '()))   ; alist for anything else
  
-   (location package-location
-             (default (and=> (current-source-location)
-                             source-properties->location))
-             (innate)))
+   (location package-location-vector
+             (default (current-location-vector))
+             (innate) (sanitize sanitize-location))
+   (definition-location package-definition-location-code
+                        (default (current-definition-location))
+                        (innate)))
  
 +(define (add-input-label input)
 +  "Add an input label to INPUT."
 +  (match input
 +    ((? package? package)
 +     (list (package-name package) package))
 +    (((? package? package) output)                ;XXX: ugly?
 +     (list (package-name package) package output))
 +    ((? gexp-input?)       ;XXX: misplaced because 'native?' field is ignored?
 +     (let ((obj    (gexp-input-thing input))
 +           (output (gexp-input-output input)))
 +       `(,(if (package? obj)
 +              (package-name obj)
 +              "_")
 +         ,obj
 +         ,@(if (string=? output "out") '() (list output)))))
 +    (x
 +     `("_" ,x))))
 +
  (set-record-type-printer! <package>
                            (lambda (package port)
                              (let ((loc    (package-location package))
                                                         package)
                                                        16)))))
  
+ (define (package-location package)
+   "Return the source code location of PACKAGE as a <location> record, or #f if
+ it is not known."
+   (match (package-location-vector package)
+     (#f #f)
+     (#(file line column) (location file line column))))
+ (define (package-definition-location package)
+   "Like 'package-location', but return the location of the definition
+ itself--i.e., that of the enclosing 'define-public' form, if any, or #f."
+   (match (package-definition-location-code package)
+     (#f #f)
+     (code
+      (let ((column (bit-extract code 22 29))
+            (line   (bit-extract code 0 21)))
+       (match (package-location-vector package)
+         (#f #f)
+         (#(file _ _) (location file line column)))))))
  (define-syntax-rule (package/inherit p overrides ...)
    "Like (package (inherit P) OVERRIDES ...), except that the same
  transformation is done to the package P's replacement, if any.  P must be a bare
@@@ -494,7 -522,6 +571,7 @@@ it has in Guix.
  user interfaces, ignores."
    (package
      (inherit p)
 +    (location (package-location p))
      (properties `((hidden? . #t)
                    ,@(package-properties p)))))
  
@@@ -518,6 -545,12 +595,6 @@@ object.
  (define (package-field-location package field)
    "Return the source code location of the definition of FIELD for PACKAGE, or
  #f if it could not be determined."
 -  (define (goto port line column)
 -    (unless (and (= (port-column port) (- column 1))
 -                 (= (port-line port) (- line 1)))
 -      (unless (eof-object? (read-char port))
 -        (goto port line column))))
 -
    (match (package-location package)
      (($ <location> file line column)
       (match (search-path %load-path file)
              ;; In general we want to keep relative file names for modules.
              (call-with-input-file file-found
                (lambda (port)
 -                (goto port line column)
 +                (go-to-location port line column)
                  (match (read port)
                    (('package inits ...)
                     (let ((field (assoc field inits)))
          #f)))
      (_ #f)))
  
 +(define-syntax-rule (this-package-input name)
 +  "Return the input NAME of the package being defined--i.e., an input
 +from the ‘inputs’ or ‘propagated-inputs’ field.  Native inputs are not
 +considered.  If this input does not exist, return #f instead."
 +  (or (lookup-package-input this-package name)
 +      (lookup-package-propagated-input this-package name)))
 +
 +(define-syntax-rule (this-package-native-input name)
 +  "Return the native package input NAME of the package being defined--i.e.,
 +an input from the ‘native-inputs’ field.  If this native input does not
 +exist, return #f instead."
 +  (lookup-package-native-input this-package name))
  
  ;; Error conditions.
  
@@@ -612,12 -633,8 +689,12 @@@ identifiers.  The result is inferred fr
    (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
                                  'canonical-package))
           (ref       (lambda (module var)
 -                      (canonical
 -                       (module-ref (resolve-interface module) var)))))
 +                      ;; Make sure 'canonical-package' is not influenced by
 +                      ;; '%current-target-system' since we're going to use the
 +                      ;; native package anyway.
 +                      (parameterize ((%current-target-system #f))
 +                        (canonical
 +                         (module-ref (resolve-interface module) var))))))
      `(("tar"   ,(ref '(gnu packages base) 'tar))
        ("xz"    ,(ref '(gnu packages compression) 'xz))
        ("bzip2" ,(ref '(gnu packages compression) 'bzip2))
@@@ -650,7 -667,7 +727,7 @@@ the build code of derivation.
                             #:key
                             inputs
                             (snippet #f)
 -                           (flags '("-p1"))
 +                           (flags %default-patch-flags)
                             (modules '())
                             (guile-for-build (%guile-for-build))
                             (system (%current-system)))
@@@ -674,7 -691,20 +751,7 @@@ specifies modules in scope when evaluat
            ((package) package)
            (#f        #f)))))
  
 -  (define decompression-type
 -    (cond ((string-suffix? "gz" source-file-name)  "gzip")
 -          ((string-suffix? "Z" source-file-name)  "gzip")
 -          ((string-suffix? "bz2" source-file-name) "bzip2")
 -          ((string-suffix? "lz" source-file-name)  "lzip")
 -          ((string-suffix? "zip" source-file-name) "unzip")
 -          (else "xz")))
 -
 -  (define original-file-name
 -    ;; Remove the store prefix plus the slash, hash, and hyphen.
 -    (let* ((sans (string-drop source-file-name
 -                              (+ (string-length (%store-prefix)) 1)))
 -           (dash (string-index sans #\-)))
 -      (string-drop sans (+ 1 dash))))
 +  (define original-file-name (strip-store-file-name source-file-name))
  
    (define (numeric-extension? file-name)
      ;; Return true if FILE-NAME ends with digits.
  
    (define (tarxz-name file-name)
      ;; Return a '.tar.xz' file name based on FILE-NAME.
 -    (let ((base (cond ((numeric-extension? file-name)
 -                       original-file-name)
 -                      ((checkout? file-name)
 -                       (string-drop-right file-name 9))
 -                      (else (file-sans-extension file-name)))))
 +    (let ((base (if (numeric-extension? file-name)
 +                    original-file-name
 +                    (file-sans-extension file-name))))
        (string-append base
                       (if (equal? (file-extension base) "tar")
                           ".xz"
    (define instantiate-patch
      (match-lambda
        ((? string? patch)                          ;deprecated
 -       (interned-file patch #:recursive? #t))
 +       (local-file patch #:recursive? #t))
        ((? struct? patch)                          ;origin, local-file, etc.
 -       (lower-object patch system))))
 -
 -  (mlet %store-monad ((tar ->     (lookup-input "tar"))
 -                      (xz ->      (lookup-input "xz"))
 -                      (patch ->   (lookup-input "patch"))
 -                      (locales -> (lookup-input "locales"))
 -                      (decomp ->  (lookup-input decompression-type))
 -                      (patches    (sequence %store-monad
 -                                            (map instantiate-patch patches))))
 +       patch)))
 +
 +  (let ((tar     (lookup-input "tar"))
 +        (gzip    (lookup-input "gzip"))
 +        (bzip2   (lookup-input "bzip2"))
 +        (lzip    (lookup-input "lzip"))
 +        (xz      (lookup-input "xz"))
 +        (patch   (lookup-input "patch"))
 +        (locales (lookup-input "locales"))
 +        (comp    (and=> (compressor source-file-name) lookup-input))
 +        (patches (map instantiate-patch patches)))
      (define build
        (with-imported-modules '((guix build utils))
          #~(begin
              (use-modules (ice-9 ftw)
 +                         (ice-9 match)
 +                         (ice-9 regex)
                           (srfi srfi-1)
 +                         (srfi srfi-26)
                           (guix build utils))
  
              ;; The --sort option was added to GNU tar in version 1.28, released
                              (lambda (name)
                                (not (member name '("." "..")))))))
  
 -            ;; Encoding/decoding errors shouldn't be silent.
 -            (fluid-set! %default-port-conversion-strategy 'error)
 -
 -            (when #+locales
 -              ;; First of all, install a UTF-8 locale so that UTF-8 file names
 -              ;; are correctly interpreted.  During bootstrap, LOCALES is #f.
 -              (setenv "LOCPATH"
 -                      (string-append #+locales "/lib/locale/"
 -                                     #+(and locales
 -                                            (version-major+minor
 -                                             (package-version locales)))))
 -              (setlocale LC_ALL "en_US.utf8"))
 -
 -            (setenv "PATH" (string-append #+xz "/bin" ":"
 -                                          #+decomp "/bin"))
 -
 -            ;; SOURCE may be either a directory or a tarball.
 -            (if (file-is-directory? #+source)
 -                (let* ((store     (%store-directory))
 -                       (len       (+ 1 (string-length store)))
 -                       (base      (string-drop #+source len))
 -                       (dash      (string-index base #\-))
 -                       (directory (string-drop base (+ 1 dash))))
 -                  (mkdir directory)
 -                  (copy-recursively #+source directory))
 -                #+(if (string=? decompression-type "unzip")
 -                      #~(invoke "unzip" #+source)
 -                      #~(invoke (string-append #+tar "/bin/tar")
 -                                "xvf" #+source)))
 -
 -            (let ((directory (first-file ".")))
 -              (format (current-error-port)
 -                      "source is under '~a'~%" directory)
 -              (chdir directory)
 -
 -              (for-each apply-patch '#+patches)
 -
 -              (let ((result #+(if snippet
 -                                  #~(let ((module (make-fresh-user-module)))
 -                                      (module-use-interfaces!
 -                                       module
 -                                       (map resolve-interface '#+modules))
 -                                      ((@ (system base compile) compile)
 -                                       '#+snippet
 -                                       #:to 'value
 -                                       #:opts %auto-compilation-options
 -                                       #:env module))
 -                                  #~#t)))
 -                ;; Issue a warning unless the result is #t.
 -                (unless (eqv? result #t)
 -                  (format (current-error-port) "\
 -## WARNING: the snippet returned `~s'.  Return values other than #t
 -## are deprecated.  Please migrate this package so that its snippet
 -## reports errors by raising an exception, and otherwise returns #t.~%"
 -                          result))
 -                (unless result
 -                  (error "snippet returned false")))
 -
 -              (chdir "..")
 -
 +            (define (repack directory output)
 +              ;; Write to OUTPUT a compressed tarball containing DIRECTORY.
                (unless tar-supports-sort?
                  (call-with-output-file ".file_list"
                    (lambda (port)
                                (find-files directory
                                            #:directories? #t
                                            #:fail-on-error? #t)))))
 -              (apply invoke
 -                     (string-append #+tar "/bin/tar")
 -                     "cvfa" #$output
 +
 +              (apply invoke #+(file-append tar "/bin/tar")
 +                     "cvfa" output
                       ;; Avoid non-determinism in the archive.  Set the mtime
                       ;; to 1 as is the case in the store (software like gzip
                       ;; behaves differently when it stumbles upon mtime = 0).
                       "--mtime=@1"
 -                     "--owner=root:0"
 -                     "--group=root:0"
 +                     "--owner=root:0" "--group=root:0"
                       (if tar-supports-sort?
 -                         `("--sort=name"
 -                           ,directory)
 +                         `("--sort=name" ,directory)
                           '("--no-recursion"
 -                           "--files-from=.file_list")))))))
 +                           "--files-from=.file_list"))))
 +
 +            ;; Encoding/decoding errors shouldn't be silent.
 +            (fluid-set! %default-port-conversion-strategy 'error)
  
 -    (let ((name (tarxz-name original-file-name)))
 +            (when #+locales
 +              ;; First of all, install a UTF-8 locale so that UTF-8 file names
 +              ;; are correctly interpreted.  During bootstrap, LOCALES is #f.
 +              (setenv "LOCPATH"
 +                      (string-append #+locales "/lib/locale/"
 +                                     #+(and locales
 +                                            (version-major+minor
 +                                             (package-version locales)))))
 +              (setlocale LC_ALL "en_US.utf8"))
 +
 +            (setenv "PATH"
 +                    (string-append #+xz "/bin"
 +                                   (if #+comp
 +                                       (string-append ":" #+comp "/bin")
 +                                       "")))
 +
 +            (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args)))
 +
 +            ;; SOURCE may be either a directory, a tarball or a simple file.
 +            (let ((name (strip-store-file-name #+source))
 +                  (command (and=> #+comp (cut string-append <> "/bin/"
 +                                              (compressor #+source)))))
 +              (if (file-is-directory? #+source)
 +                  (copy-recursively #+source name)
 +                  (cond
 +                   ((tarball? #+source)
 +                    (invoke (string-append #+tar "/bin/tar") "xvf" #+source))
 +                   ((and=> (compressor #+source) (cut string= "unzip" <>))
 +                    ;; Note: Referring to the store unzip here (#+unzip)
 +                    ;; would introduce a cycle.
 +                    (invoke "unzip" #+source))
 +                   (else
 +                    (copy-file #+source name)
 +                    (when command
 +                      (invoke command "--decompress" name))))))
 +
 +            (let* ((file (first-file "."))
 +                   (directory (if (file-is-directory? file)
 +                                  file
 +                                  ".")))
 +              (format (current-error-port) "source is at '~a'~%" file)
 +
 +              (with-directory-excursion directory
 +
 +                (for-each apply-patch '#+patches)
 +
 +                #+(if snippet
 +                      #~(let ((module (make-fresh-user-module)))
 +                          (module-use-interfaces!
 +                           module
 +                           (map resolve-interface '#+modules))
 +                          ((@ (system base compile) compile)
 +                           '#+(if (pair? snippet)
 +                                  (sexp->gexp snippet)
 +                                  snippet)
 +                           #:to 'value
 +                           #:opts %auto-compilation-options
 +                           #:env module))
 +                      #~#t))
 +
 +              ;; If SOURCE is a directory (such as a checkout), return a
 +              ;; directory.  Otherwise create a tarball.
 +              (cond
 +               ((file-is-directory? #+source)
 +                (copy-recursively directory #$output
 +                                  #:log (%make-void-port "w")))
 +               ((not #+comp)
 +                (copy-file file #$output))
 +               (else
 +                (repack directory #$output)))))))
 +
 +    (let ((name (if (or (checkout? original-file-name)
 +                        (not (compressor original-file-name)))
 +                    original-file-name
 +                    (tarxz-name original-file-name))))
        (gexp->derivation name build
                          #:graft? #f
                          #:system system
@@@ -909,98 -919,6 +986,98 @@@ preserved, and only duplicate propagate
        ((input rest ...)
         (loop rest (cons input result) propagated first? seen)))))
  
 +(define (lookup-input inputs name)
 +  "Lookup NAME among INPUTS, an input list."
 +  ;; Note: Currently INPUTS is assumed to be an input list that contains input
 +  ;; labels.  In the future, input labels will be gone and this procedure will
 +  ;; check package names.
 +  (match (assoc-ref inputs name)
 +    ((obj) obj)
 +    ((obj _) obj)
 +    (#f #f)))
 +
 +(define (lookup-package-input package name)
 +  "Look up NAME among PACKAGE's inputs.  Return it if found, #f otherwise."
 +  (lookup-input (package-inputs package) name))
 +
 +(define (lookup-package-native-input package name)
 +  "Look up NAME among PACKAGE's native inputs.  Return it if found, #f
 +otherwise."
 +  (lookup-input (package-native-inputs package) name))
 +
 +(define (lookup-package-propagated-input package name)
 +  "Look up NAME among PACKAGE's propagated inputs.  Return it if found, #f
 +otherwise."
 +  (lookup-input (package-propagated-inputs package) name))
 +
 +(define (lookup-package-direct-input package name)
 +  "Look up NAME among PACKAGE's direct inputs.  Return it if found, #f
 +otherwise."
 +  (lookup-input (package-direct-inputs package) name))
 +
 +(define (inputs-sans-labels inputs)
 +  "Return INPUTS stripped of any input labels."
 +  (map (match-lambda
 +         ((label obj) obj)
 +         ((label obj output) `(,obj ,output)))
 +       inputs))
 +
 +(define (replace-input name replacement inputs)
 +  "Replace input NAME by REPLACEMENT within INPUTS."
 +  (map (lambda (input)
 +         (match input
 +           (((? string? label) . _)
 +            (if (string=? label name)
 +                (match replacement        ;does REPLACEMENT specify an output?
 +                  ((_ _) (cons label replacement))
 +                  (_     (list label replacement)))
 +                input))))
 +       inputs))
 +
 +(define-syntax prepend
 +  (lambda (s)
 +    (syntax-violation 'prepend
 +                      "'prepend' may only be used within 'modify-inputs'"
 +                      s)))
 +
 +(define-syntax replace
 +  (lambda (s)
 +    (syntax-violation 'replace
 +                      "'replace' may only be used within 'modify-inputs'"
 +                      s)))
 +
 +(define-syntax modify-inputs
 +  (syntax-rules (delete prepend append replace)
 +    "Modify the given package inputs, as returned by 'package-inputs' & co.,
 +according to the given clauses.  The example below removes the GMP and ACL
 +inputs of Coreutils and adds libcap:
 +
 +  (modify-inputs (package-inputs coreutils)
 +    (delete \"gmp\" \"acl\")
 +    (append libcap))
 +
 +Other types of clauses include 'prepend' and 'replace'."
 +    ;; Note: This macro hides the fact that INPUTS, as returned by
 +    ;; 'package-inputs' & co., is actually an alist with labels.  Eventually,
 +    ;; it will operate on list of inputs without labels.
 +    ((_ inputs (delete name) clauses ...)
 +     (modify-inputs (alist-delete name inputs)
 +                    clauses ...))
 +    ((_ inputs (delete names ...) clauses ...)
 +     (modify-inputs (fold alist-delete inputs (list names ...))
 +                    clauses ...))
 +    ((_ inputs (prepend lst ...) clauses ...)
 +     (modify-inputs (append (list lst ...) (inputs-sans-labels inputs))
 +                    clauses ...))
 +    ((_ inputs (append lst ...) clauses ...)
 +     (modify-inputs (append (inputs-sans-labels inputs) (list lst ...))
 +                    clauses ...))
 +    ((_ inputs (replace name replacement) clauses ...)
 +     (modify-inputs (replace-input name replacement inputs)
 +                    clauses ...))
 +    ((_ inputs)
 +     inputs)))
 +
  (define (package-direct-sources package)
    "Return all source origins associated with PACKAGE; including origins in
  PACKAGE's inputs."
@@@ -1323,6 -1241,10 +1400,6 @@@ matching package and returns a replacem
  ;;; Package derivations.
  ;;;
  
 -(define %derivation-cache
 -  ;; Package to derivation-path mapping.
 -  (make-weak-key-hash-table 100))
 -
  (define (cache! cache package system thunk)
    "Memoize in CACHE the return values of THUNK as the derivation of PACKAGE on
  SYSTEM."
@@@ -1350,51 -1272,56 +1427,51 @@@ Return the cached result when available
              (#f (cache! cache package key thunk))
              (value value)))
           (#f
 -          (cache! cache package key thunk)))))
 -    ((_ package system body ...)
 -     (cached (=> %derivation-cache) package system body ...))))
 -
 -(define* (expand-input store package input system #:optional cross-system)
 -  "Expand INPUT, an input tuple, such that it contains only references to
 -derivation paths or store paths.  PACKAGE is only used to provide contextual
 -information in exceptions."
 -  (define (intern file)
 -    ;; Add FILE to the store.  Set the `recursive?' bit to #t, so that
 -    ;; file permissions are preserved.
 -    (add-to-store store (basename file) #t "sha256" file))
 -
 -  (define derivation
 -    (if cross-system
 -        (cut package-cross-derivation store <> cross-system system
 -             #:graft? #f)
 -        (cut package-derivation store <> system #:graft? #f)))
 +          (cache! cache package key thunk)))))))
  
 -  (match input
 -    (((? string? name) (? package? package))
 -     (list name (derivation package)))
 -    (((? string? name) (? package? package)
 -      (? string? sub-drv))
 -     (list name (derivation package)
 -           sub-drv))
 -    (((? string? name)
 -      (and (? string?) (? derivation-path?) drv))
 -     (list name drv))
 -    (((? string? name)
 -      (and (? string?) (? file-exists? file)))
 -     ;; Add FILE to the store.  When FILE is in the sub-directory of a
 -     ;; store path, it needs to be added anyway, so it can be used as a
 -     ;; source.
 -     (list name (intern file)))
 -    (((? string? name) (? struct? source))
 -     ;; 'package-source-derivation' calls 'lower-object', which can throw
 -     ;; '&gexp-input-error'.  However '&gexp-input-error' lacks source
 -     ;; location info, so we catch and rethrow here (XXX: not optimal
 -     ;; performance-wise).
 -     (guard (c ((gexp-input-error? c)
 -                (raise (condition
 -                        (&package-input-error
 -                         (package package)
 -                         (input   (gexp-error-invalid-input c)))))))
 -       (list name (package-source-derivation store source system))))
 -    (x
 -     (raise (condition (&package-input-error
 -                        (package package)
 -                        (input   x)))))))
 +(define* (expand-input package input system #:key target)
 +  "Expand INPUT, an input tuple, to a name/<gexp-input> tuple.  PACKAGE is
 +only used to provide contextual information in exceptions."
 +  (with-monad %store-monad
 +    (match input
 +      ;; INPUT doesn't need to be lowered here because it'll be lowered down
 +      ;; the road in the gexp that refers to it.  However, packages need to be
 +      ;; special-cased to pass #:graft? #f (only the "tip" of the package
 +      ;; graph needs to have #:graft? #t).  Lowering them here also allows
 +      ;; 'bag->derivation' to delete non-eq? packages that lead to the same
 +      ;; derivation.
 +      (((? string? name) (? package? package))
 +       (mlet %store-monad ((drv (if target
 +                                    (package->cross-derivation package
 +                                                               target system
 +                                                               #:graft? #f)
 +                                    (package->derivation package system
 +                                                         #:graft? #f))))
 +         (return (list name (gexp-input drv #:native? (not target))))))
 +      (((? string? name) (? package? package) (? string? output))
 +       (mlet %store-monad ((drv (if target
 +                                    (package->cross-derivation package
 +                                                               target system
 +                                                               #:graft? #f)
 +                                    (package->derivation package system
 +                                                         #:graft? #f))))
 +         (return (list name (gexp-input drv output #:native? (not target))))))
 +
 +      (((? string? name) (? file-like? thing))
 +       (return (list name (gexp-input thing #:native? (not target)))))
 +      (((? string? name) (? file-like? thing) (? string? output))
 +       (return (list name (gexp-input thing output #:native? (not target)))))
 +      (((? string? name)
 +        (and (? string?) (? file-exists? file)))
 +       ;; Add FILE to the store.  When FILE is in the sub-directory of a
 +       ;; store path, it needs to be added anyway, so it can be used as a
 +       ;; source.
 +       (return (list name (gexp-input (local-file file #:recursive? #t)
 +                                      #:native? (not target)))))
 +      (x
 +       (raise (condition (&package-input-error
 +                          (package package)
 +                          (input   x))))))))
  
  (define %bag-cache
    ;; 'eq?' cache mapping packages to system+target+graft?-dependent bags.
@@@ -1442,51 -1369,45 +1519,51 @@@ and return it.
                                   (&package-error
                                    (package package))))))))))))
  
 -(define %graft-cache
 -  ;; 'eq?' cache mapping package objects to a graft corresponding to their
 -  ;; replacement package.
 -  (make-weak-key-hash-table 200))
 +(define (input-graft system)
 +  "Return a monadic procedure that, given a package with a graft, returns a
 +graft, and #f otherwise."
 +  (with-monad %store-monad
 +    (match-lambda*
 +      (((? package? package) output)
 +       (let ((replacement (package-replacement package)))
 +         (if replacement
 +             ;; XXX: We should use a separate cache instead of abusing the
 +             ;; object cache.
 +             (mcached (mlet %store-monad ((orig (package->derivation package system
 +                                                                     #:graft? #f))
 +                                          (new  (package->derivation replacement system
 +                                                                     #:graft? #t)))
 +                        (return (graft
 +                                  (origin orig)
 +                                  (origin-output output)
 +                                  (replacement new)
 +                                  (replacement-output output))))
 +                      package 'graft output system)
 +             (return #f))))
 +      (_
 +       (return #f)))))
  
 -(define (input-graft store system)
 -  "Return a procedure that, given a package with a replacement and an output name,
 -returns a graft, and #f otherwise."
 -  (match-lambda*
 -    (((? package? package) output)
 -     (let ((replacement (package-replacement package)))
 -       (and replacement
 -            (cached (=> %graft-cache) package (cons output system)
 -                    (let ((orig (package-derivation store package system
 -                                                    #:graft? #f))
 -                          (new  (package-derivation store replacement system
 -                                                    #:graft? #t)))
 -                      (graft
 -                        (origin orig)
 -                        (origin-output output)
 -                        (replacement new)
 -                        (replacement-output output)))))))))
 -
 -(define (input-cross-graft store target system)
 +(define (input-cross-graft target system)
    "Same as 'input-graft', but for cross-compilation inputs."
 -  (match-lambda*
 -    (((? package? package) output)
 -     (let ((replacement (package-replacement package)))
 -       (and replacement
 -            (let ((orig (package-cross-derivation store package target system
 -                                                  #:graft? #f))
 -                  (new  (package-cross-derivation store replacement
 -                                                  target system
 -                                                  #:graft? #t)))
 -              (graft
 -                (origin orig)
 -                (origin-output output)
 -                (replacement new)
 -                (replacement-output output))))))))
 +  (with-monad %store-monad
 +    (match-lambda*
 +      (((? package? package) output)
 +       (let ((replacement (package-replacement package)))
 +         (if replacement
 +             (mlet %store-monad ((orig (package->cross-derivation package
 +                                                                  target system
 +                                                                  #:graft? #f))
 +                                 (new  (package->cross-derivation replacement
 +                                                                  target system
 +                                                                  #:graft? #t)))
 +               (return (graft
 +                         (origin orig)
 +                         (origin-output output)
 +                         (replacement new)
 +                         (replacement-output output))))
 +             (return #f))))
 +      (_
 +       (return #f)))))
  
  (define* (fold-bag-dependencies proc seed bag
                                  #:key (native? #t))
@@@ -1521,7 -1442,7 +1598,7 @@@ dependencies; otherwise, restrict to ta
        ((head . tail)
         (loop tail result visited)))))
  
 -(define* (bag-grafts store bag)
 +(define* (bag-grafts bag)
    "Return the list of grafts potentially applicable to BAG.  Potentially
  applicable grafts are collected by looking at direct or indirect dependencies
  of BAG that have a 'replacement'.  Whether a graft is actually applicable
@@@ -1530,199 -1451,158 +1607,199 @@@ to (see 'graft-derivation'.)
    (define system (bag-system bag))
    (define target (bag-target bag))
  
 -  (define native-grafts
 -    (let ((->graft (input-graft store system)))
 -      (parameterize ((%current-system system)
 -                     (%current-target-system #f))
 -        (fold-bag-dependencies (lambda (package output grafts)
 -                                 (match (->graft package output)
 -                                   (#f    grafts)
 -                                   (graft (cons graft grafts))))
 -                               '()
 -                               bag))))
 -
 -  (define target-grafts
 -    (if target
 -        (let ((->graft (input-cross-graft store target system)))
 +  (mlet %store-monad
 +      ((native-grafts
 +        (let ((->graft (input-graft system)))
            (parameterize ((%current-system system)
 -                         (%current-target-system target))
 +                         (%current-target-system #f))
              (fold-bag-dependencies (lambda (package output grafts)
 -                                     (match (->graft package output)
 -                                       (#f    grafts)
 -                                       (graft (cons graft grafts))))
 -                                   '()
 -                                   bag
 -                                   #:native? #f)))
 -        '()))
 -
 -  ;; We can end up with several identical grafts if we stumble upon packages
 -  ;; that are not 'eq?' but map to the same derivation (this can happen when
 -  ;; using things like 'package-with-explicit-inputs'.)  Hence the
 -  ;; 'delete-duplicates' call.
 -  (delete-duplicates
 -   (append native-grafts target-grafts)))
 -
 -(define* (package-grafts store package
 -                         #:optional (system (%current-system))
 -                         #:key target)
 +                                     (mlet %store-monad ((grafts grafts))
 +                                       (>>= (->graft package output)
 +                                            (match-lambda
 +                                              (#f    (return grafts))
 +                                              (graft (return (cons graft grafts)))))))
 +                                   (return '())
 +                                   bag))))
 +
 +       (target-grafts
 +        (if target
 +            (let ((->graft (input-cross-graft target system)))
 +              (parameterize ((%current-system system)
 +                             (%current-target-system target))
 +                (fold-bag-dependencies
 +                 (lambda (package output grafts)
 +                   (mlet %store-monad ((grafts grafts))
 +                     (>>= (->graft package output)
 +                          (match-lambda
 +                            (#f    (return grafts))
 +                            (graft (return (cons graft grafts)))))))
 +                 (return '())
 +                 bag
 +                 #:native? #f)))
 +            (return '()))))
 +
 +    ;; We can end up with several identical grafts if we stumble upon packages
 +    ;; that are not 'eq?' but map to the same derivation (this can happen when
 +    ;; using things like 'package-with-explicit-inputs'.)  Hence the
 +    ;; 'delete-duplicates' call.
 +    (return (delete-duplicates
 +             (append native-grafts target-grafts)))))
 +
 +(define* (package-grafts* package
 +                          #:optional (system (%current-system))
 +                          #:key target)
    "Return the list of grafts applicable to PACKAGE as built for SYSTEM and
  TARGET."
    (let* ((package (or (package-replacement package) package))
           (bag     (package->bag package system target)))
 -    (bag-grafts store bag)))
 -
 -(define* (bag->derivation store bag
 -                          #:optional context)
 +    (bag-grafts bag)))
 +
 +(define package-grafts
 +  (store-lower package-grafts*))
 +
 +(define-inlinable (derivation=? drv1 drv2)
 +  "Return true if DRV1 and DRV2 are equal."
 +  (or (eq? drv1 drv2)
 +      (string=? (derivation-file-name drv1)
 +                (derivation-file-name drv2))))
 +
 +(define (input=? input1 input2)
 +  "Return true if INPUT1 and INPUT2 are equivalent."
 +  (match input1
 +    ((label1 obj1 . outputs1)
 +     (match input2
 +       ((label2 obj2 . outputs2)
 +        (and (string=? label1 label2)
 +             (equal? outputs1 outputs2)
 +             (or (and (derivation? obj1) (derivation? obj2)
 +                      (derivation=? obj1 obj2))
 +                 (equal? obj1 obj2))))))))
 +
 +(define* (bag->derivation bag #:optional context)
    "Return the derivation to build BAG for SYSTEM.  Optionally, CONTEXT can be
  a package object describing the context in which the call occurs, for improved
  error reporting."
    (if (bag-target bag)
 -      (bag->cross-derivation store bag)
 -      (let* ((system     (bag-system bag))
 -             (inputs     (bag-transitive-inputs bag))
 -             (input-drvs (map (cut expand-input store context <> system)
 -                              inputs))
 -             (paths      (delete-duplicates
 -                          (append-map (match-lambda
 -                                       ((_ (? package? p) _ ...)
 -                                        (package-native-search-paths
 -                                         p))
 -                                       (_ '()))
 -                                      inputs))))
 -
 -        (apply (bag-build bag)
 -               store (bag-name bag) input-drvs
 +      (bag->cross-derivation bag)
 +      (mlet* %store-monad ((system ->  (bag-system bag))
 +                           (inputs ->  (bag-transitive-inputs bag))
 +                           (input-drvs (mapm %store-monad
 +                                             (cut expand-input context <> system)
 +                                             inputs))
 +                           (paths ->   (delete-duplicates
 +                                        (append-map (match-lambda
 +                                                      ((_ (? package? p) _ ...)
 +                                                       (package-native-search-paths
 +                                                        p))
 +                                                      (_ '()))
 +                                                    inputs))))
 +        ;; It's possible that INPUTS contains packages that are not 'eq?' but
 +        ;; that lead to the same derivation.  Delete those duplicates to avoid
 +        ;; issues down the road, such as duplicate entries in '%build-inputs'.
 +        (apply (bag-build bag) (bag-name bag)
 +               (delete-duplicates input-drvs input=?)
                 #:search-paths paths
                 #:outputs (bag-outputs bag) #:system system
                 (bag-arguments bag)))))
  
 -(define* (bag->cross-derivation store bag
 -                                #:optional context)
 +(define* (bag->cross-derivation bag #:optional context)
    "Return the derivation to build BAG, which is actually a cross build.
  Optionally, CONTEXT can be a package object denoting the context of the call.
  This is an internal procedure."
 -  (let* ((system      (bag-system bag))
 -         (target      (bag-target bag))
 -         (host        (bag-transitive-host-inputs bag))
 -         (host-drvs   (map (cut expand-input store context <> system target)
 -                           host))
 -         (target*     (bag-transitive-target-inputs bag))
 -         (target-drvs (map (cut expand-input store context <> system)
 -                           target*))
 -         (build       (bag-transitive-build-inputs bag))
 -         (build-drvs  (map (cut expand-input store context <> system)
 -                           build))
 -         (all         (append build target* host))
 -         (paths       (delete-duplicates
 -                       (append-map (match-lambda
 -                                    ((_ (? package? p) _ ...)
 -                                     (package-search-paths p))
 -                                    (_ '()))
 -                                   all)))
 -         (npaths      (delete-duplicates
 -                       (append-map (match-lambda
 -                                    ((_ (? package? p) _ ...)
 -                                     (package-native-search-paths
 -                                      p))
 -                                    (_ '()))
 -                                   all))))
 -
 -    (apply (bag-build bag)
 -           store (bag-name bag)
 -           #:native-drvs build-drvs
 -           #:target-drvs (append host-drvs target-drvs)
 +  (mlet* %store-monad ((system ->   (bag-system bag))
 +                       (target ->   (bag-target bag))
 +                       (host ->     (bag-transitive-host-inputs bag))
 +                       (host-drvs   (mapm %store-monad
 +                                          (cut expand-input context <>
 +                                               system #:target target)
 +                                          host))
 +                       (target* ->  (bag-transitive-target-inputs bag))
 +                       (target-drvs (mapm %store-monad
 +                                          (cut expand-input context <> system)
 +                                          target*))
 +                       (build ->    (bag-transitive-build-inputs bag))
 +                       (build-drvs  (mapm %store-monad
 +                                          (cut expand-input context <> system)
 +                                          build))
 +                       (all ->      (append build target* host))
 +                       (paths ->    (delete-duplicates
 +                                     (append-map (match-lambda
 +                                                   ((_ (? package? p) _ ...)
 +                                                    (package-search-paths p))
 +                                                   (_ '()))
 +                                                 all)))
 +                       (npaths ->   (delete-duplicates
 +                                     (append-map (match-lambda
 +                                                   ((_ (? package? p) _ ...)
 +                                                    (package-native-search-paths
 +                                                     p))
 +                                                   (_ '()))
 +                                                 all))))
 +
 +    (apply (bag-build bag) (bag-name bag)
 +           #:build-inputs (delete-duplicates build-drvs input=?)
 +           #:host-inputs (delete-duplicates host-drvs input=?)
 +           #:target-inputs (delete-duplicates target-drvs input=?)
             #:search-paths paths
             #:native-search-paths npaths
             #:outputs (bag-outputs bag)
             #:system system #:target target
             (bag-arguments bag))))
  
 -(define* (package-derivation store package
 -                             #:optional (system (%current-system))
 -                             #:key (graft? (%graft?)))
 +(define bag->derivation*
 +  (store-lower bag->derivation))
 +
 +(define graft-derivation*
 +  (store-lift graft-derivation))
 +
 +(define* (package->derivation package
 +                              #:optional (system (%current-system))
 +                              #:key (graft? (%graft?)))
    "Return the <derivation> object of PACKAGE for SYSTEM."
  
    ;; Compute the derivation and cache the result.  Caching is important
    ;; because some derivations, such as the implicit inputs of the GNU build
    ;; system, will be queried many, many times in a row.
 -  (cached package (cons system graft?)
 -          (let* ((bag (package->bag package system #f #:graft? graft?))
 -                 (drv (bag->derivation store bag package)))
 -            (if graft?
 -                (match (bag-grafts store bag)
 -                  (()
 -                   drv)
 -                  (grafts
 -                   (let ((guile (package-derivation store (guile-for-grafts)
 -                                                    system #:graft? #f)))
 -                     ;; TODO: As an optimization, we can simply graft the tip
 -                     ;; of the derivation graph since 'graft-derivation'
 -                     ;; recurses anyway.
 -                     (graft-derivation store drv grafts
 -                                       #:system system
 -                                       #:guile guile))))
 -                drv))))
 -
 -(define* (package-cross-derivation store package target
 -                                   #:optional (system (%current-system))
 -                                   #:key (graft? (%graft?)))
 +  (mcached (mlet* %store-monad ((bag -> (package->bag package system #f
 +                                                      #:graft? graft?))
 +                                (drv (bag->derivation bag package)))
 +             (if graft?
 +                 (>>= (bag-grafts bag)
 +                      (match-lambda
 +                        (()
 +                         (return drv))
 +                        (grafts
 +                         (mlet %store-monad ((guile (package->derivation
 +                                                     (default-guile)
 +                                                     system #:graft? #f)))
 +                           (graft-derivation* drv grafts
 +                                              #:system system
 +                                              #:guile guile)))))
 +                 (return drv)))
 +           package system #f graft?))
 +
 +(define* (package->cross-derivation package target
 +                                    #:optional (system (%current-system))
 +                                    #:key (graft? (%graft?)))
    "Cross-build PACKAGE for TARGET (a GNU triplet) from host SYSTEM (a Guix
  system identifying string)."
 -  (cached package (list system target graft?)
 -          (let* ((bag (package->bag package system target #:graft? graft?))
 -                 (drv (bag->derivation store bag package)))
 -            (if graft?
 -                (match (bag-grafts store bag)
 -                  (()
 -                   drv)
 -                  (grafts
 -                   (graft-derivation store drv grafts
 -                                     #:system system
 -                                     #:guile
 -                                     (package-derivation store (guile-for-grafts)
 -                                                         system #:graft? #f))))
 -                drv))))
 +  (mcached (mlet* %store-monad ((bag -> (package->bag package system target
 +                                                      #:graft? graft?))
 +                                (drv (bag->derivation bag package)))
 +             (if graft?
 +                 (>>= (bag-grafts bag)
 +                      (match-lambda
 +                        (()
 +                         (return drv))
 +                        (grafts
 +                         (mlet %store-monad ((guile (package->derivation
 +                                                     (default-guile)
 +                                                     system #:graft? #f)))
 +                           (graft-derivation* drv grafts
 +                                              #:system system
 +                                              #:guile guile)))))
 +                 (return drv)))
 +           package system target graft?))
  
  (define* (package-output store package
                           #:optional (output "out") (system (%current-system)))
@@@ -1770,11 -1650,11 +1847,11 @@@ unless you know what you are doing.
                    out)
                store))))
  
 -(define package->derivation
 -  (store-lift package-derivation))
 +(define package-derivation
 +  (store-lower package->derivation))
  
 -(define package->cross-derivation
 -  (store-lift package-cross-derivation))
 +(define package-cross-derivation
 +  (store-lower package->cross-derivation))
  
  (define-gexp-compiler (package-compiler (package <package>) system target)
    ;; Compile PACKAGE to a derivation for SYSTEM, optionally cross-compiled for
               (content-hash-value hash)
               name #:system system))
      (($ <origin> uri method hash name (= force (patches ...)) snippet
 -        (flags ...) inputs (modules ...) guile-for-build)
 +                 flags inputs (modules ...) guile-for-build)
       ;; Patches and/or a snippet.
       (mlet %store-monad ((source (method uri
                                           (content-hash-algorithm hash)
diff --combined tests/hackage.scm
@@@ -2,7 -2,6 +2,7 @@@
  ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
  ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 +;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
@@@ -179,7 -178,9 +179,7 @@@ librar
          ('base32
           (? string? hash)))))
      ('build-system 'haskell-build-system)
 -    ('inputs
 -     ('quasiquote
 -      (("ghc-http" ('unquote 'ghc-http)))))
 +    ('inputs ('list 'ghc-http))
      ('home-page "http://test.org")
      ('synopsis (? string?))
      ('description (? string?))
          ('base32
           (? string? hash)))))
      ('build-system 'haskell-build-system)
 -    ('inputs
 -     ('quasiquote
 -      (("ghc-b" ('unquote 'ghc-b))
 -       ("ghc-http" ('unquote 'ghc-http)))))
 -    ('native-inputs
 -     ('quasiquote
 -      (("ghc-haskell-gi" ('unquote 'ghc-haskell-gi)))))
 +    ('inputs ('list 'ghc-b 'ghc-http))
 +    ('native-inputs ('list 'ghc-haskell-gi))
      ('home-page "http://test.org")
      ('synopsis (? string?))
      ('description (? string?))
@@@ -312,8 -318,6 +312,6 @@@ executable caba
      mtl        >= 2.0      && < 3
  ")
  
- ;; Fails: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25138
- (test-expect-fail 1)
  (test-assert "hackage->guix-package test flag executable"
    (eval-test-with-cabal test-cabal-flag-executable match-ghc-foo))
  
@@@ -347,7 -351,9 +345,7 @@@ executable caba
          ('base32
           (? string? hash)))))
      ('build-system 'haskell-build-system)
 -    ('inputs
 -     ('quasiquote
 -      (("ghc-http" ('unquote 'ghc-http)))))
 +    ('inputs ('list 'ghc-http))
      ('arguments
       ('quasiquote
        ('#:cabal-revision
@@@ -411,7 -417,9 +409,7 @@@ executable caba
          ('base32
           (? string? hash)))))
      ('build-system 'haskell-build-system)
 -    ('inputs
 -     ('quasiquote
 -      (("ghc-http" ('unquote 'ghc-http)))))
 +    ('inputs ('list 'ghc-http))
      ('home-page "http://test.org")
      ('synopsis (? string?))
      ('description (? string?))
diff --combined tests/packages.scm
@@@ -1,8 -1,6 +1,8 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 -;;; Copyright © Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 +;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
  ;;; You should have received a copy of the GNU General Public License
  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
  
 -(define-module (test-packages)
 +(define-module (testpackages)
    #:use-module (guix tests)
    #:use-module (guix store)
    #:use-module (guix monads)
    #:use-module (guix grafts)
 -  #:use-module ((guix gexp) #:select (local-file local-file-file))
 +  #:use-module (guix gexp)
    #:use-module (guix utils)
 +  #:use-module ((guix build utils) #:select (tarball?))
    #:use-module ((guix diagnostics)
                  ;; Rename the 'location' binding to allow proper syntax
                  ;; matching when setting the 'location' field of a package.
@@@ -35,7 -32,6 +35,7 @@@
                                    (else name))))
    #:use-module ((gcrypt hash) #:prefix gcrypt:)
    #:use-module (guix derivations)
 +  #:use-module (guix download)
    #:use-module (guix packages)
    #:use-module (guix grafts)
    #:use-module (guix search-paths)
@@@ -55,7 -51,6 +55,7 @@@
    #:use-module (gnu packages version-control)
    #:use-module (gnu packages xml)
    #:use-module (srfi srfi-1)
 +  #:use-module (srfi srfi-11)
    #:use-module (srfi srfi-26)
    #:use-module (srfi srfi-34)
    #:use-module (srfi srfi-35)
    ;; inputs.  See <https://bugs.gnu.org/35872>.
    (let* ((dep (dummy-package "dep" (version "2")))
           (old (dummy-package "foo" (version "1")
 -                             (propagated-inputs `(("dep" ,dep)))))
 +                             (propagated-inputs (list dep))))
           (drv (package-derivation %store old))
           (tx  (mock ((gnu packages) find-best-packages-by-name
                       (const (list old)))
               (bar (dummy-package "bar" (version "0")
                                   (replacement old)))
               (new (dummy-package "foo" (version "1")
 -                                 (inputs `(("bar" ,bar)))))
 +                                 (inputs (list bar))))
               (tx  (mock ((gnu packages) find-best-packages-by-name
                           (const (list new)))
                          (transaction-upgrade-entry
                  (eq? item new)))
               (null? (manifest-transaction-remove tx)))))))
  
+ (test-assert "package-definition-location"
+   (let ((location   (package-location hello))
+         (definition (package-definition-location hello)))
+     ;; Check for the usual layout of (define-public hello (package ...)).
+     (and (string=? (location-file location)
+                    (location-file definition))
+          (= 0 (location-column definition))
+          (= 2 (location-column location))
+          (= (location-line definition)
+             (- (location-line location) 1)))))
  (test-assert "package-field-location"
    (let ()
      (define (goto port line column)
  (test-assert "package-transitive-inputs"
    (let* ((a (dummy-package "a"))
           (b (dummy-package "b"
 -              (propagated-inputs `(("a" ,a)))))
 +              (propagated-inputs (list a))))
           (c (dummy-package "c"
 -              (inputs `(("a" ,a)))))
 +              (inputs (list a))))
           (d (dummy-package "d"
                (propagated-inputs `(("x" "something.drv")))))
           (e (dummy-package "e"
 -              (inputs `(("b" ,b) ("c" ,c) ("d" ,d))))))
 +              (inputs (list b c d)))))
      (and (null? (package-transitive-inputs a))
           (equal? `(("a" ,a)) (package-transitive-inputs b))
           (equal? `(("a" ,a)) (package-transitive-inputs c))
           (b (dummy-package "b"
                (build-system trivial-build-system)
                (supported-systems '("x" "y"))
 -              (inputs `(("a" ,a)))))
 +              (inputs (list a))))
           (c (dummy-package "c"
                (build-system trivial-build-system)
                (supported-systems '("y" "z"))
 -              (inputs `(("b" ,b)))))
 +              (inputs (list b))))
           (d (dummy-package "d"
                (build-system trivial-build-system)
                (supported-systems '("x" "y" "z"))
 -              (inputs `(("b" ,b) ("c" ,c)))))
 +              (inputs (list b c))))
           (e (dummy-package "e"
                (build-system trivial-build-system)
                (supported-systems '("x" "y" "z"))
 -              (inputs `(("d" ,d))))))
 +              (inputs (list d)))))
      (list (package-transitive-supported-systems a)
            (package-transitive-supported-systems b)
            (package-transitive-supported-systems c)
                       (build-system trivial-build-system))))))
      (let* ((a (dummy-package/no-implicit "a"))
             (b (dummy-package/no-implicit "b"
 -                (propagated-inputs `(("a" ,a)))))
 +                (propagated-inputs (list a))))
             (c (dummy-package/no-implicit "c"
 -                (inputs `(("a" ,a)))))
 +                (inputs (list a))))
             (d (dummy-package/no-implicit "d"
 -                (native-inputs `(("b" ,b)))))
 +                (native-inputs (list b))))
             (e (dummy-package/no-implicit "e"
 -                (inputs `(("c" ,c) ("d" ,d))))))
 +                (inputs (list c d)))))
        (lset= eq?
               (list a b c d e)
               (package-closure (list e))
         (u (dummy-origin))
         (i (dummy-origin))
         (a (dummy-package "a"))
 -       (b (dummy-package "b"
 -            (inputs `(("a" ,a) ("i" ,i)))))
 +       (b (dummy-package "b" (inputs (list a i))))
         (c (package (inherit b) (source o)))
         (d (dummy-package "d"
              (build-system trivial-build-system)
 -            (source u) (inputs `(("c" ,c))))))
 +            (source u) (inputs (list c)))))
    (test-assert "package-direct-sources, no source"
      (null? (package-direct-sources a)))
    (test-equal "package-direct-sources, #f source"
                (supported-systems '("x86_64-linux"))))
           (p (dummy-package "foo"
                (build-system gnu-build-system)
 -              (inputs `(("d" ,d)))
 +              (inputs (list d))
                (supported-systems '("x86_64-linux" "armhf-linux")))))
      (and (supported-package? p "x86_64-linux")
           (not (supported-package? p "i686-linux"))
      (build-derivations %store (list drv))
      (call-with-input-file output get-string-all)))
  
 +\f
 +;;;
 +;;; Source derivation with snippets.
 +;;;
 +
  (unless (network-reachable?) (test-skip 1))
  (test-equal "package-source-derivation, snippet"
    "OK"
      (and (build-derivations %store (list (pk 'snippet-drv drv)))
           (call-with-input-file out get-string-all))))
  
 +;; Note: lzip is not part of bootstrap-coreutils&co, so is not included to
 +;; avoid having to rebuild the world.
 +(define compressors '(("gzip"  . "gz")
 +                      ("xz"    . "xz")
 +                      ("bzip2" . "bz2")
 +                      (#f      . #f)))
 +
 +(for-each
 + (match-lambda
 +   ((comp . ext)
 +    (unless (network-reachable?) (test-skip 1))
 +    (test-equal (string-append "origin->derivation, single file with snippet "
 +                               "(compression: " (if comp comp "None") ")")
 +      "2 + 2 = 4"
 +      (let*-values
 +          (((name) "maths")
 +           ((compressed-name) (if comp
 +                                  (string-append name "." ext)
 +                                  name))
 +           ((file hash) (test-file %store compressed-name "2 + 2 = 5"))
 +           ;; Create an origin using the above computed file and its hash.
 +           ((source) (origin
 +                       (method url-fetch)
 +                       (uri (string-append "file://" file))
 +                       (file-name compressed-name)
 +                       (patch-inputs `(("tar"   ,%bootstrap-coreutils&co)
 +                                       ("xz"    ,%bootstrap-coreutils&co)
 +                                       ("bzip2" ,%bootstrap-coreutils&co)
 +                                       ("gzip"  ,%bootstrap-coreutils&co)))
 +                       (patch-guile %bootstrap-guile)
 +                       (modules '((guix build utils)))
 +                       (snippet `(substitute* ,name
 +                                   (("5") "4")))
 +                       (hash (content-hash hash))))
 +           ;; Build origin.
 +           ((drv) (run-with-store %store (origin->derivation source)))
 +           ((out) (derivation->output-path drv)))
 +        ;; Decompress the resulting tar.xz and return its content.
 +        (and (build-derivations %store (list drv))
 +             (if (tarball? out)
 +                 (let* ((bin #~(string-append #+%bootstrap-coreutils&co
 +                                              "/bin"))
 +                        (f (computed-file
 +                            name
 +                            (with-imported-modules '((guix build utils))
 +                              #~(begin
 +                                  (use-modules (guix build utils))
 +                                  (setenv "PATH" #+bin)
 +                                  (invoke "tar" "xvf" #+out)
 +                                  (copy-file #+name #$output)))))
 +                        (drv (run-with-store %store (lower-object f)))
 +                        (_ (build-derivations %store (list drv))))
 +                   (call-with-input-file (derivation->output-path drv)
 +                     get-string-all))
 +                 (call-with-input-file out get-string-all)))))))
 + compressors)
 +
  (test-assert "return value"
    (let ((drv (package-derivation %store (dummy-package "p"))))
      (and (derivation? drv)
           (file-exists? (derivation-file-name drv)))))
  
 +(test-assert "package-derivation, inputs deduplicated"
 +  (let* ((dep (dummy-package "dep"))
 +         (p0  (dummy-package "p" (inputs (list dep))))
 +         (p1  (package (inherit p0)
 +                       (inputs `(("dep" ,(package (inherit dep)))
 +                                 ,@(package-inputs p0))))))
 +    ;; Here P1 ends up with two non-eq? copies of DEP, under the same label.
 +    ;; They should be deduplicated so that P0 and P1 lead to the same
 +    ;; derivation rather than P1 ending up with duplicate entries in its
 +    ;; '%build-inputs' variable.
 +    (string=? (derivation-file-name (package-derivation %store p0))
 +              (derivation-file-name (package-derivation %store p1)))))
 +
 +(test-assert "package-derivation, different system"
 +  ;; Make sure the 'system' argument of 'package-derivation' is respected.
 +  (let* ((system (if (string=? (%current-system) "x86_64-linux")
 +                     "aarch64-linux"
 +                     "x86_64-linux"))
 +         (drv    (package-derivation %store (dummy-package "p")
 +                                     system #:graft? #f)))
 +    (define right-system?
 +      (mlambdaq (drv)
 +        (and (string=? (derivation-system drv) system)
 +             (every (compose right-system? derivation-input-derivation)
 +                    (derivation-inputs drv)))))
 +
 +    (right-system? drv)))
 +
  (test-assert "package-output"
    (let* ((package  (dummy-package "p"))
           (drv      (package-derivation %store package)))
  
  (let ((dummy (dummy-package "foo" (inputs `(("x" ,(current-module)))))))
    (test-equal "&package-input-error"
 -    (list dummy (current-module))
 +    (list dummy `("x" ,(current-module)))
      (guard (c ((package-input-error? c)
                 (list (package-error-package c)
                       (package-error-invalid-input c))))
    (parameterize ((%graft? #f))
      (let* ((dep (dummy-package "dep"))
             (p   (dummy-package "p"
 -                  (inputs `(("dep" ,dep "non-existent"))))))
 +                  (inputs (list `(,dep "non-existent"))))))
        (guard (c ((derivation-missing-output-error? c)
                   (and (string=? (derivation-missing-output c) "non-existent")
                        (equal? (package-derivation %store dep)
  
  (test-assert "search paths"
    (let* ((p (make-prompt-tag "return-search-paths"))
 +         (t (make-parameter "guile-0"))
           (s (build-system
 -             (name 'raw)
 -             (description "Raw build system with direct store access")
 -             (lower (lambda* (name #:key source inputs system target
 -                                   #:allow-other-keys)
 -                      (bag
 -                        (name name)
 -                        (system system) (target target)
 -                        (build-inputs inputs)
 -                        (build
 -                         (lambda* (store name inputs
 +              (name 'raw)
 +              (description "Raw build system with direct store access")
 +              (lower (lambda* (name #:key source inputs system target
 +                                    #:allow-other-keys)
 +                       (bag
 +                         (name name)
 +                         (system system) (target target)
 +                         (build-inputs inputs)
 +                         (build
 +                          (lambda* (name inputs
                                           #:key outputs system search-paths)
 -                           search-paths)))))))
 +                            (if (string=? name (t))
 +                                (abort-to-prompt p search-paths)
 +                                (gexp->derivation name
 +                                                  #~(mkdir #$output))))))))))
           (x (list (search-path-specification
                     (variable "GUILE_LOAD_PATH")
                     (files '("share/guile/site/2.0")))
                                 (lambda (k search-paths)
                                   search-paths))))))
        (and (null? (collect (package-derivation %store a)))
 -           (equal? x (collect (package-derivation %store b)))
 -           (equal? x (collect (package-derivation %store c)))))))
 +           (parameterize ((t "guile-foo-0"))
 +             (equal? x (collect (package-derivation %store b))))
 +           (parameterize ((t "guile-bar-0"))
 +             (equal? x (collect (package-derivation %store c))))))))
  
  (test-assert "package-transitive-native-search-paths"
    (let* ((sp (lambda (name)
           (p1 (dummy-package "p1" (native-search-paths (sp "PATH1"))))
           (p2 (dummy-package "p2"
                 (native-search-paths (sp "PATH2"))
 -               (inputs `(("p0" ,p0)))
 -               (propagated-inputs `(("p1" ,p1)))))
 +               (inputs (list p0))
 +               (propagated-inputs (list p1))))
           (p3 (dummy-package "p3"
                 (native-search-paths (sp "PATH3"))
 -               (native-inputs `(("p0" ,p0)))
 -               (propagated-inputs `(("p2" ,p2))))))
 +               (native-inputs (list p0))
 +               (propagated-inputs (list p2)))))
      (lset= string=?
             '("PATH1" "PATH2" "PATH3")
             (map search-path-specification-variable
           (dep*  (package (inherit dep) (replacement new)))
           (dummy (dummy-package "dummy"
                    (arguments '(#:implicit-inputs? #f))
 -                  (inputs `(("dep" ,dep*))))))
 +                  (inputs (list dep*)))))
      (equal? (package-grafts %store dummy)
              (list (graft
                      (origin (package-derivation %store dep))
           (dep   (package (inherit new) (version "0.0")))
           (dep*  (package (inherit dep) (replacement new)))
           (prop  (dummy-package "propagated"
 -                  (propagated-inputs `(("dep" ,dep*)))
 +                  (propagated-inputs (list dep*))
                    (arguments '(#:implicit-inputs? #f))))
           (dummy (dummy-package "dummy"
                    (arguments '(#:implicit-inputs? #f))
 -                  (inputs `(("prop" ,prop))))))
 +                  (inputs (list prop)))))
      (equal? (package-grafts %store dummy)
              (list (graft
                      (origin (package-derivation %store dep))
           (dep  (package (inherit new) (version "0") (replacement new)))
           (p1   (dummy-package "intermediate1"
                   (arguments '(#:implicit-inputs? #f))
 -                 (inputs `(("dep" ,dep)))))
 +                 (inputs (list dep))))
           (p2   (dummy-package "intermediate2"
                   (arguments '(#:implicit-inputs? #f))
                   ;; Here we copy DEP to have an equivalent package that is not
                   ;; 'eq?' to DEP.  This is similar to what happens with
                   ;; 'package-with-explicit-inputs' & co.
 -                 (inputs `(("dep" ,(package (inherit dep)))))))
 +                 (inputs (list (package (inherit dep))))))
           (p3   (dummy-package "final"
                   (arguments '(#:implicit-inputs? #f))
 -                 (inputs `(("p1" ,p1) ("p2" ,p2))))))
 +                 (inputs (list p1 p2)))))
      (equal? (package-grafts %store p3)
              (list (graft
                      (origin (package-derivation %store
              (p0* (package (inherit p0) (version "1.1")))
              (p1  (dummy-package "p1"
                     (arguments '(#:implicit-inputs? #f))
 -                   (inputs `(("p0" ,p0)
 -                             ("p0:lib" ,p0 "lib"))))))
 +                   (inputs (list p0 `(,p0 "lib"))))))
      (lset= equal? (pk (package-grafts %store p1))
             (list (graft
                     (origin (package-derivation %store p0))
                                 #t)))))
           (p2r (dummy-package "P2"
                  (build-system trivial-build-system)
 -                (inputs `(("p1" ,p1)))
 +                (inputs (list p1))
                  (arguments
                   `(#:guile ,%bootstrap-guile
                     #:builder (let ((out (assoc-ref %outputs "out")))
                                 #t)))))
           (p3  (dummy-package "p3"
                  (build-system trivial-build-system)
 -                (inputs `(("p2" ,p2)))
 +                (inputs (list p2))
                  (arguments
                   `(#:guile ,%bootstrap-guile
                     #:builder (let ((out (assoc-ref %outputs "out")))
                         (bag (name name) (system system) (target target)
                              (build-inputs native-inputs)
                              (host-inputs inputs)
 -                            (build (lambda* (store name inputs
 -                                                   #:key system target
 -                                                   #:allow-other-keys)
 -                                     (build-expression->derivation
 -                                      store "foo" '(mkdir %output))))))))
 +                            (build (lambda* (name inputs
 +                                                  #:key system target
 +                                                  #:allow-other-keys)
 +                                     (gexp->derivation "foo"
 +                                                       #~(mkdir #$output))))))))
           (bs    (build-system
                    (name 'build-system-without-cross-compilation)
                    (description "Does not support cross compilation.")
                    (lower lower)))
           (dep   (dummy-package "dep" (build-system bs)))
           (pkg   (dummy-package "example"
 -                  (native-inputs `(("dep" ,dep)))))
 +                  (native-inputs (list dep))))
           (do-not-build (lambda (continue store lst . _) lst)))
      (equal? (with-build-handler do-not-build
                (parameterize ((%current-target-system "powerpc64le-linux-gnu")
  (test-assert "package->bag, propagated inputs"
    (let* ((dep    (dummy-package "dep"))
           (prop   (dummy-package "prop"
 -                   (propagated-inputs `(("dep" ,dep)))))
 +                   (propagated-inputs (list dep))))
           (dummy  (dummy-package "dummy"
 -                   (inputs `(("prop" ,prop)))))
 +                   (inputs (list prop))))
           (inputs (bag-transitive-inputs (package->bag dummy #:graft? #f))))
      (match (assoc "dep" inputs)
        (("dep" package)
                                         `(("libxml2" ,libxml2))
                                         '()))))
           (pkg (dummy-package "foo"
 -                (native-inputs `(("dep" ,dep)))))
 +                (native-inputs (list dep))))
           (bag (package->bag pkg (%current-system) "i586-gnu")))
      (equal? (parameterize ((%current-system "x86_64-linux"))
                (bag-transitive-inputs bag))
                                         `(("libxml2" ,libxml2))
                                         '()))))
           (pkg (dummy-package "foo"
 -                (native-inputs `(("dep" ,dep)))))
 +                (native-inputs (list dep))))
           (bag (package->bag pkg (%current-system) "foo86-hurd")))
      (equal? (parameterize ((%current-target-system "foo64-gnu"))
                (bag-transitive-inputs bag))
              (parameterize ((%current-target-system #f))
                (bag-transitive-inputs bag)))))
  
 -(test-assert "bag->derivation"
 +(test-assertm "bag->derivation"
    (parameterize ((%graft? #f))
      (let ((bag (package->bag gnu-make))
            (drv (package-derivation %store gnu-make)))
        (parameterize ((%current-system "foox86-hurd")) ;should have no effect
 -        (equal? drv (bag->derivation %store bag))))))
 +        (mlet %store-monad ((bag-drv (bag->derivation bag)))
 +          (return (equal? drv bag-drv)))))))
  
  (test-assert "bag->derivation, cross-compilation"
    (parameterize ((%graft? #f))
             (drv    (package-cross-derivation %store gnu-make target)))
        (parameterize ((%current-system "foox86-hurd") ;should have no effect
                       (%current-target-system "foo64-linux-gnu"))
 -        (equal? drv (bag->derivation %store bag))))))
 +        (mlet %store-monad ((bag-drv (bag->derivation bag)))
 +          (return (equal? drv bag-drv)))))))
  
  (when (or (not (network-reachable?)) (shebang-too-long?))
    (test-skip 1))
                      (build-system trivial-build-system)))
           (glib    (dummy-package "glib"
                      (build-system trivial-build-system)
 -                    (propagated-inputs `(("libffi" ,libffi)))))
 +                    (propagated-inputs (list libffi))))
           (gobject (dummy-package "gobject-introspection"
                      (build-system trivial-build-system)
 -                    (inputs `(("glib" ,glib)))
 -                    (propagated-inputs `(("libffi" ,libffi)))))
 +                    (inputs (list glib))
 +                    (propagated-inputs (list libffi))))
           (rewrite (package-input-rewriting/spec
                     `(("glib" . ,identity)))))
      (and (= (length (package-transitive-inputs gobject))
                      (build-system trivial-build-system)))
           (glib    (dummy-package "glib"
                      (build-system trivial-build-system)
 -                    (propagated-inputs `(("libffi" ,libffi)))))
 +                    (propagated-inputs (list libffi))))
           (gobject (dummy-package "gobject-introspection"
                      (build-system trivial-build-system)
 -                    (inputs `(("glib" ,glib)))
 -                    (propagated-inputs `(("libffi" ,libffi)))))
 +                    (inputs (list glib))
 +                    (propagated-inputs (list libffi))))
           (rewrite (package-input-rewriting `((,glib . ,glib)))))
      (and (= (length (package-transitive-inputs gobject))
              (length (package-transitive-inputs (rewrite gobject))))
    (package-location (specification->package "guile@2"))
    (specification->location "guile@2"))
  
 +(test-eq "this-package-input, exists"
 +  hello
 +  (package-arguments
 +   (dummy-package "a"
 +     (inputs `(("hello" ,hello)))
 +     (arguments (this-package-input "hello")))))
 +
 +(test-eq "this-package-input, exists in propagated-inputs"
 +  hello
 +  (package-arguments
 +   (dummy-package "a"
 +     (propagated-inputs `(("hello" ,hello)))
 +     (arguments (this-package-input "hello")))))
 +
 +(test-eq "this-package-input, does not exist"
 +  #f
 +  (package-arguments
 +   (dummy-package "a"
 +     (arguments (this-package-input "hello")))))
 +
 +(test-eq "this-package-native-input, exists"
 +  hello
 +  (package-arguments
 +   (dummy-package "a"
 +     (native-inputs `(("hello" ,hello)))
 +     (arguments (this-package-native-input "hello")))))
 +
 +(test-eq "this-package-native-input, does not exists"
 +  #f
 +  (package-arguments
 +   (dummy-package "a"
 +     (arguments (this-package-native-input "hello")))))
 +
  (test-end "packages")
  
  ;;; Local Variables:
diff --combined tests/store.scm
                                               (derivation->output-path drv)))
                               (list d1 d2)))))
  
+ (test-equal "map/accumulate-builds cutoff" ;https://issues.guix.gnu.org/50264
+   (iota 20)
+   ;; Make sure that, when the cutoff is reached, 'map/accumulate-builds' still
+   ;; returns the right result and calls the build handler by batches.
+   (let* ((b  (add-text-to-store %store "build" "echo $foo > $out" '()))
+          (s  (add-to-store %store "bash" #t "sha256"
+                            (search-bootstrap-binary "bash"
+                                                     (%current-system))))
+          (d  (map (lambda (i)
+                     (derivation %store (string-append "the-thing-"
+                                                       (number->string i))
+                                 s `("-e" ,b)
+                                 #:env-vars `(("foo" . ,(random-text)))
+                                 #:sources (list b s)
+                                 #:properties `((n . ,i))))
+                   (iota 20)))
+          (calls '()))
+     (define lst
+       (with-build-handler (lambda (continue store things mode)
+                             (set! calls (cons things calls))
+                             (continue #f))
+         (map/accumulate-builds %store
+                                (lambda (d)
+                                  (build-derivations %store (list d))
+                                  (assq-ref (derivation-properties d) 'n))
+                                d
+                                #:cutoff 7)))
+     (match (reverse calls)
+       (((batch1 ...) (batch2 ...) (batch3 ...))
+        (and (equal? (map derivation-file-name (take d 8)) batch1)
+             (equal? (map derivation-file-name (take (drop d 8) 8)) batch2)
+             (equal? (map derivation-file-name (drop d 16)) batch3)
+             lst)))))
  (test-assert "mapm/accumulate-builds"
    (let* ((d1 (run-with-store %store
                 (gexp->derivation "foo" #~(mkdir #$output))))
                   (d (build-expression->derivation
                       %store "foo" `(display ,s)
                       #:guile-for-build
 -                     (package-derivation s %bootstrap-guile (%current-system)))))
 +                     (package-derivation %store %bootstrap-guile
 +                                         (%current-system)))))
              (guard (c ((store-protocol-error? c) #t))
                (build-derivations %store (list d))))))))
     "Here’s a Greek letter: λ."))