summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am242
-rw-r--r--NEWS11
-rw-r--r--TODO18
-rw-r--r--build-aux/hydra/gnu-system.scm (renamed from hydra.scm)2
-rw-r--r--doc/guix.texi7
-rw-r--r--gnu-system.am263
-rw-r--r--gnu/packages/bdb.scm6
-rw-r--r--gnu/packages/gd.scm68
-rw-r--r--gnu/packages/ghostscript.scm20
-rw-r--r--gnu/packages/graphviz.scm124
-rw-r--r--gnu/packages/gtk.scm109
-rw-r--r--gnu/packages/imagemagick.scm92
-rw-r--r--gnu/packages/libpng.scm5
-rw-r--r--gnu/packages/linux.scm97
-rw-r--r--gnu/packages/make-bootstrap.scm192
-rw-r--r--gnu/packages/pkg-config.scm5
-rw-r--r--gnu/packages/scheme.scm73
-rw-r--r--gnu/packages/subversion.scm58
-rw-r--r--gnu/packages/version-control.scm36
-rw-r--r--guix/build-system/trivial.scm2
-rw-r--r--guix/build/download.scm4
-rw-r--r--guix/derivations.scm5
-rw-r--r--guix/download.scm9
-rw-r--r--guix/scripts/gc.scm8
-rw-r--r--guix/scripts/package.scm6
-rwxr-xr-xguix/scripts/substitute-binary.scm100
-rw-r--r--guix/store.scm26
m---------nix-upstream10
-rwxr-xr-xnix/sync-with-upstream5
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/eo.po266
-rw-r--r--tests/store.scm18
32 files changed, 1349 insertions, 539 deletions
diff --git a/Makefile.am b/Makefile.am
index 4a7e787c73..418b63a377 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,8 @@ nodist_noinst_SCRIPTS =				\
   pre-inst-env					\
   test-env
 
+include gnu-system.am
+
 MODULES =					\
   guix/scripts/build.scm			\
   guix/scripts/download.scm			\
@@ -66,150 +68,7 @@ MODULES =					\
   guix/packages.scm				\
   guix/snix.scm					\
   guix.scm					\
-  gnu/packages.scm				\
-  gnu/packages/acl.scm				\
-  gnu/packages/algebra.scm			\
-  gnu/packages/aspell.scm			\
-  gnu/packages/attr.scm				\
-  gnu/packages/autotools.scm			\
-  gnu/packages/avahi.scm			\
-  gnu/packages/base.scm				\
-  gnu/packages/bash.scm				\
-  gnu/packages/bdb.scm				\
-  gnu/packages/bdw-gc.scm			\
-  gnu/packages/bison.scm			\
-  gnu/packages/bootstrap.scm			\
-  gnu/packages/cdrom.scm			\
-  gnu/packages/cflow.scm			\
-  gnu/packages/check.scm			\
-  gnu/packages/cmake.scm			\
-  gnu/packages/compression.scm			\
-  gnu/packages/cpio.scm				\
-  gnu/packages/cppi.scm				\
-  gnu/packages/cross-base.scm			\
-  gnu/packages/cryptsetup.scm			\
-  gnu/packages/curl.scm				\
-  gnu/packages/cyrus-sasl.scm			\
-  gnu/packages/dejagnu.scm			\
-  gnu/packages/ddrescue.scm			\
-  gnu/packages/dwm.scm				\
-  gnu/packages/ed.scm				\
-  gnu/packages/emacs.scm			\
-  gnu/packages/fdisk.scm			\
-  gnu/packages/file.scm				\
-  gnu/packages/flex.scm				\
-  gnu/packages/fontutils.scm			\
-  gnu/packages/freeipmi.scm			\
-  gnu/packages/gawk.scm				\
-  gnu/packages/gcal.scm				\
-  gnu/packages/gcc.scm				\
-  gnu/packages/gdb.scm				\
-  gnu/packages/gdbm.scm				\
-  gnu/packages/gettext.scm			\
-  gnu/packages/ghostscript.scm			\
-  gnu/packages/glib.scm				\
-  gnu/packages/global.scm			\
-  gnu/packages/gnupg.scm			\
-  gnu/packages/gnutls.scm			\
-  gnu/packages/gperf.scm			\
-  gnu/packages/gprolog.scm			\
-  gnu/packages/groff.scm			\
-  gnu/packages/grub.scm				\
-  gnu/packages/grue-hunter.scm			\
-  gnu/packages/gsasl.scm			\
-  gnu/packages/gtk.scm				\
-  gnu/packages/guile.scm			\
-  gnu/packages/gv.scm				\
-  gnu/packages/help2man.scm			\
-  gnu/packages/hugs.scm				\
-  gnu/packages/icu4c.scm			\
-  gnu/packages/idutils.scm			\
-  gnu/packages/indent.scm			\
-  gnu/packages/irssi.scm			\
-  gnu/packages/ld-wrapper.scm			\
-  gnu/packages/less.scm				\
-  gnu/packages/lesstif.scm			\
-  gnu/packages/libapr.scm			\
-  gnu/packages/libdaemon.scm			\
-  gnu/packages/libevent.scm			\
-  gnu/packages/libffi.scm			\
-  gnu/packages/libidn.scm			\
-  gnu/packages/libjpeg.scm			\
-  gnu/packages/libphidget.scm			\
-  gnu/packages/libpng.scm			\
-  gnu/packages/libsigsegv.scm			\
-  gnu/packages/libtiff.scm			\
-  gnu/packages/libunistring.scm			\
-  gnu/packages/libusb.scm			\
-  gnu/packages/libunwind.scm			\
-  gnu/packages/linux.scm			\
-  gnu/packages/linux-initrd.scm			\
-  gnu/packages/lout.scm				\
-  gnu/packages/lsh.scm				\
-  gnu/packages/lsof.scm				\
-  gnu/packages/lua.scm				\
-  gnu/packages/lvm.scm				\
-  gnu/packages/m4.scm				\
-  gnu/packages/mailutils.scm			\
-  gnu/packages/make-bootstrap.scm		\
-  gnu/packages/mit-krb5.scm			\
-  gnu/packages/mp3.scm				\
-  gnu/packages/multiprecision.scm		\
-  gnu/packages/mysql.scm			\
-  gnu/packages/nano.scm				\
-  gnu/packages/ncurses.scm			\
-  gnu/packages/netpbm.scm			\
-  gnu/packages/nettle.scm			\
-  gnu/packages/ocaml.scm			\
-  gnu/packages/oggvorbis.scm			\
-  gnu/packages/openldap.scm			\
-  gnu/packages/openssl.scm			\
-  gnu/packages/parted.scm			\
-  gnu/packages/patchelf.scm			\
-  gnu/packages/pcre.scm				\
-  gnu/packages/pdf.scm				\
-  gnu/packages/perl.scm				\
-  gnu/packages/pkg-config.scm			\
-  gnu/packages/plotutils.scm			\
-  gnu/packages/popt.scm				\
-  gnu/packages/pth.scm				\
-  gnu/packages/python.scm			\
-  gnu/packages/qemu.scm				\
-  gnu/packages/ratpoison.scm			\
-  gnu/packages/readline.scm			\
-  gnu/packages/recutils.scm			\
-  gnu/packages/rsync.scm			\
-  gnu/packages/samba.scm			\
-  gnu/packages/scheme.scm			\
-  gnu/packages/screen.scm			\
-  gnu/packages/shishi.scm			\
-  gnu/packages/smalltalk.scm			\
-  gnu/packages/sqlite.scm			\
-  gnu/packages/ssh.scm				\
-  gnu/packages/subversion.scm			\
-  gnu/packages/system.scm			\
-  gnu/packages/tcl.scm				\
-  gnu/packages/tcsh.scm				\
-  gnu/packages/texinfo.scm			\
-  gnu/packages/texlive.scm			\
-  gnu/packages/time.scm				\
-  gnu/packages/tmux.scm				\
-  gnu/packages/tor.scm				\
-  gnu/packages/unrtf.scm			\
-  gnu/packages/version-control.scm		\
-  gnu/packages/vim.scm				\
-  gnu/packages/vpn.scm				\
-  gnu/packages/w3m.scm				\
-  gnu/packages/wdiff.scm			\
-  gnu/packages/wget.scm				\
-  gnu/packages/which.scm			\
-  gnu/packages/wordnet.scm			\
-  gnu/packages/xlockmore.scm			\
-  gnu/packages/xml.scm				\
-  gnu/packages/xorg.scm				\
-  gnu/packages/zile.scm				\
-  gnu/packages/zip.scm				\
-  gnu/system/vm.scm
+  $(GNU_SYSTEM_MODULES)
 
 # Because of the autoload hack in (guix build download), we must build it
 # first to avoid errors on systems where (gnutls) is unavailable.
@@ -219,99 +78,6 @@ GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go
 
 nobase_dist_guilemodule_DATA = $(MODULES)
 
-patchdir = $(guilemoduledir)/gnu/packages/patches
-dist_patch_DATA =						\
-  gnu/packages/patches/automake-skip-amhello-tests.patch	\
-  gnu/packages/patches/bigloo-gc-shebangs.patch			\
-  gnu/packages/patches/binutils-ld-new-dtags.patch		\
-  gnu/packages/patches/cmake-fix-tests.patch			\
-  gnu/packages/patches/cpio-gets-undeclared.patch		\
-  gnu/packages/patches/diffutils-gets-undeclared.patch		\
-  gnu/packages/patches/emacs-configure-sh.patch			\
-  gnu/packages/patches/findutils-absolute-paths.patch		\
-  gnu/packages/patches/flac-fix-memcmp-not-declared.patch	\
-  gnu/packages/patches/flex-bison-tests.patch			\
-  gnu/packages/patches/gawk-shell.patch				\
-  gnu/packages/patches/gcc-cross-environment-variables.patch	\
-  gnu/packages/patches/gettext-gets-undeclared.patch		\
-  gnu/packages/patches/glib-tests-desktop.patch			\
-  gnu/packages/patches/glib-tests-homedir.patch			\
-  gnu/packages/patches/glib-tests-prlimit.patch			\
-  gnu/packages/patches/glibc-bootstrap-system.patch		\
-  gnu/packages/patches/glibc-no-ld-so-cache.patch		\
-  gnu/packages/patches/grub-gets-undeclared.patch		\
-  gnu/packages/patches/guile-1.8-cpp-4.5.patch			\
-  gnu/packages/patches/guile-default-utf8.patch			\
-  gnu/packages/patches/guile-linux-syscalls.patch		\
-  gnu/packages/patches/guile-relocatable.patch			\
-  gnu/packages/patches/libapr-skip-getservbyname-test.patch	\
-  gnu/packages/patches/libevent-dns-tests.patch			\
-  gnu/packages/patches/libtool-skip-tests.patch			\
-  gnu/packages/patches/lsh-guile-compat.patch			\
-  gnu/packages/patches/lsh-no-root-login.patch			\
-  gnu/packages/patches/lsh-pam-service-name.patch		\
-  gnu/packages/patches/m4-gets-undeclared.patch			\
-  gnu/packages/patches/m4-readlink-EINVAL.patch			\
-  gnu/packages/patches/m4-s_isdir.patch				\
-  gnu/packages/patches/make-impure-dirs.patch			\
-  gnu/packages/patches/mcron-install.patch			\
-  gnu/packages/patches/perl-no-sys-dirs.patch			\
-  gnu/packages/patches/python-fix-dbm.patch			\
-  gnu/packages/patches/procps-make-3.82.patch			\
-  gnu/packages/patches/qemu-multiple-smb-shares.patch		\
-  gnu/packages/patches/readline-link-ncurses.patch		\
-  gnu/packages/patches/scheme48-tests.patch			\
-  gnu/packages/patches/tar-gets-undeclared.patch		\
-  gnu/packages/patches/tcsh-fix-autotest.patch			\
-  gnu/packages/patches/teckit-cstdio.patch			\
-  gnu/packages/patches/vpnc-script.patch			\
-  gnu/packages/patches/w3m-fix-compile.patch			\
-  gnu/packages/patches/xpdf-constchar.patch
-
-bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
-bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
-bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
-
-dist_bootstrap_x86_64_linux_DATA =		\
-  gnu/packages/bootstrap/x86_64-linux/bash	\
-  gnu/packages/bootstrap/x86_64-linux/mkdir	\
-  gnu/packages/bootstrap/x86_64-linux/tar	\
-  gnu/packages/bootstrap/x86_64-linux/xz
-
-dist_bootstrap_i686_linux_DATA =		\
-  gnu/packages/bootstrap/i686-linux/bash	\
-  gnu/packages/bootstrap/i686-linux/mkdir	\
-  gnu/packages/bootstrap/i686-linux/tar	\
-  gnu/packages/bootstrap/i686-linux/xz
-
-# Big bootstrap binaries are not included in the tarball.  Instead, they
-# are downloaded.
-nodist_bootstrap_x86_64_linux_DATA =					\
-  gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
-nodist_bootstrap_i686_linux_DATA =					\
-  gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
-
-# Those files must remain executable, so they remain executable once
-# imported into the store.
-install-data-hook:
-	chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
-
-DISTCLEANFILES =				\
-  $(nodist_bootstrap_x86_64_linux_DATA)		\
-  $(nodist_bootstrap_i686_linux_DATA)
-
-# Method to download a file from an external source.
-DOWNLOAD_FILE =								\
-  GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"	\
-  $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)"	\
-           "$(top_srcdir)/build-aux/download.scm"
-
-gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c"
-gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c"
 
 nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm
 
@@ -361,7 +127,7 @@ EXTRA_DIST =					\
   ROADMAP					\
   TODO						\
   .dir-locals.el				\
-  hydra.scm					\
+  build-aux/hydra/gnu-system.scm		\
   build-aux/download.scm			\
   build-aux/sync-synopses.scm			\
   srfi/srfi-64.scm				\
diff --git a/NEWS b/NEWS
index 3a946ec59d..8ef620e24f 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,10 @@ See the manual for details.
 This option instructs to fall back to local builds when the substituter fails
 to download a substitute.
 
+*** New ‘--requisites’ option for “guix gc”
+
+See the manual for details.
+
 ** Bugs fixed
 *** “guix --help” now works when using Guile 2.0.5
 *** Binary substituter multi-threading and pipe issues fixed
@@ -41,6 +45,13 @@ See commits 0332386 and 101d9f3 for details.
 
 *** Binary substituter gracefully handles lack of network connectivity
 
+*** Daemon properly handles rebuilds of multiple-output derivations
+
+Previously it would fail when rebuilding a multiple-output derivation when
+some (but not all) of its outputs were already present.  See
+http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00038.html and
+https://github.com/NixOS/nix/issues/122 .
+
 * Changes in 0.2 (since 0.1)
 
 ** Package management
diff --git a/TODO b/TODO
index 9eb5cc16ca..4cb243bc4a 100644
--- a/TODO
+++ b/TODO
@@ -41,8 +41,10 @@ Like scripts/build-remote.pl in Nix.
 * user interface
 ** Add a package.el (Emacs) back-end
 
-Unfortunately package.el is monolithic, so most likely we’d have to
-write a new one based on it, as opposed to actually using it.
+package.el is quite monolithic, but we may be able to reuse/extend
+‘package-menu-mode’ or at least ‘tabulated-list-mode’.
+
+** add guile-ncurses interface
 
 * extend <origin>
 ** add OpenPGP signatures:
@@ -82,6 +84,11 @@ create a new ‘dir’.
       ("i3" ,p3)))
 #+END_SRC
 
+
+* add ‘make-sha256-port’ binding for ‘gcry_md_write’ & co.
+
+This should make `derivation-hash' faster.
+
 * synchronize package descriptions with GSRC and/or the [[http://directory.fsf.org][FSD]]
 
 Meta-data for GNU packages, including descriptions and synopses, can be
@@ -89,11 +96,8 @@ dumped from the FSD:
 http://directory.fsf.org/wiki?title=GNU/Export&action=purge .
 We could periodically synchronize with that.
 
-* support cross-compilation
-
-Implement ‘package-cross-derivation’, and add the corresponding code in
-‘gnu-build-system’.  Then, actually bootstrap a cross-compilation
-environment–e.g., a cross-GNU environment.
+See http://lists.gnu.org/archive/html/bug-guix/2013-04/msg00120.html for info
+on how to synchronize with GSRC's descriptions.
 
 * add a guildhall build system
 
diff --git a/hydra.scm b/build-aux/hydra/gnu-system.scm
index c4b6dba924..f03c201223 100644
--- a/hydra.scm
+++ b/build-aux/hydra/gnu-system.scm
@@ -31,7 +31,7 @@
 
   (and=> (assoc-ref (current-source-location) 'filename)
          (lambda (file)
-           (let ((dir (dirname file)))
+           (let ((dir (string-append (dirname file) "/../..")))
              (format (current-error-port) "prepending ~s to the load path~%"
                      dir)
              (set! %load-path (cons dir %load-path))))))
diff --git a/doc/guix.texi b/doc/guix.texi
index 02fb9982c1..23e8351c02 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -722,6 +722,13 @@ In addition, the references among existing store files can be queried:
 List the references (respectively, the referrers) of store files given
 as arguments.
 
+@item --requisites
+@itemx -R
+List the requisites of the store files passed as arguments.  Requisites
+include the store files themselves, their references, and the references
+of these, recursively.  In other words, the returned list is the
+@dfn{transitive closure} of the store files.
+
 @end table
 
 
diff --git a/gnu-system.am b/gnu-system.am
new file mode 100644
index 0000000000..96b87e6a72
--- /dev/null
+++ b/gnu-system.am
@@ -0,0 +1,263 @@
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2013 Andreas Enge <andreas@enge.fr>
+#
+# This file is part of GNU Guix.
+#
+# GNU Guix is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Guix is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+# Definitions for the GNU System: package modules, patches, bootstrap
+# binaries.
+
+GNU_SYSTEM_MODULES =				\
+  gnu/packages.scm				\
+  gnu/packages/acl.scm				\
+  gnu/packages/algebra.scm			\
+  gnu/packages/aspell.scm			\
+  gnu/packages/attr.scm				\
+  gnu/packages/autotools.scm			\
+  gnu/packages/avahi.scm			\
+  gnu/packages/base.scm				\
+  gnu/packages/bash.scm				\
+  gnu/packages/bdb.scm				\
+  gnu/packages/bdw-gc.scm			\
+  gnu/packages/bison.scm			\
+  gnu/packages/bootstrap.scm			\
+  gnu/packages/cdrom.scm			\
+  gnu/packages/cflow.scm			\
+  gnu/packages/check.scm			\
+  gnu/packages/cmake.scm			\
+  gnu/packages/compression.scm			\
+  gnu/packages/cpio.scm				\
+  gnu/packages/cppi.scm				\
+  gnu/packages/cross-base.scm			\
+  gnu/packages/cryptsetup.scm			\
+  gnu/packages/curl.scm				\
+  gnu/packages/cyrus-sasl.scm			\
+  gnu/packages/dejagnu.scm			\
+  gnu/packages/ddrescue.scm			\
+  gnu/packages/dwm.scm				\
+  gnu/packages/ed.scm				\
+  gnu/packages/emacs.scm			\
+  gnu/packages/fdisk.scm			\
+  gnu/packages/file.scm				\
+  gnu/packages/flex.scm				\
+  gnu/packages/fontutils.scm			\
+  gnu/packages/freeipmi.scm			\
+  gnu/packages/gawk.scm				\
+  gnu/packages/gcal.scm				\
+  gnu/packages/gcc.scm				\
+  gnu/packages/gd.scm				\
+  gnu/packages/gdb.scm				\
+  gnu/packages/gdbm.scm				\
+  gnu/packages/gettext.scm			\
+  gnu/packages/ghostscript.scm			\
+  gnu/packages/glib.scm				\
+  gnu/packages/global.scm			\
+  gnu/packages/gnupg.scm			\
+  gnu/packages/gnutls.scm			\
+  gnu/packages/gperf.scm			\
+  gnu/packages/gprolog.scm			\
+  gnu/packages/graphviz.scm			\
+  gnu/packages/groff.scm			\
+  gnu/packages/grub.scm				\
+  gnu/packages/grue-hunter.scm			\
+  gnu/packages/gsasl.scm			\
+  gnu/packages/gtk.scm				\
+  gnu/packages/guile.scm			\
+  gnu/packages/gv.scm				\
+  gnu/packages/help2man.scm			\
+  gnu/packages/hugs.scm				\
+  gnu/packages/icu4c.scm			\
+  gnu/packages/idutils.scm			\
+  gnu/packages/imagemagick.scm			\
+  gnu/packages/indent.scm			\
+  gnu/packages/irssi.scm			\
+  gnu/packages/ld-wrapper.scm			\
+  gnu/packages/less.scm				\
+  gnu/packages/lesstif.scm			\
+  gnu/packages/libapr.scm			\
+  gnu/packages/libdaemon.scm			\
+  gnu/packages/libevent.scm			\
+  gnu/packages/libffi.scm			\
+  gnu/packages/libidn.scm			\
+  gnu/packages/libjpeg.scm			\
+  gnu/packages/libphidget.scm			\
+  gnu/packages/libpng.scm			\
+  gnu/packages/libsigsegv.scm			\
+  gnu/packages/libtiff.scm			\
+  gnu/packages/libunistring.scm			\
+  gnu/packages/libusb.scm			\
+  gnu/packages/libunwind.scm			\
+  gnu/packages/linux.scm			\
+  gnu/packages/linux-initrd.scm			\
+  gnu/packages/lout.scm				\
+  gnu/packages/lsh.scm				\
+  gnu/packages/lsof.scm				\
+  gnu/packages/lua.scm				\
+  gnu/packages/lvm.scm				\
+  gnu/packages/m4.scm				\
+  gnu/packages/mailutils.scm			\
+  gnu/packages/make-bootstrap.scm		\
+  gnu/packages/mit-krb5.scm			\
+  gnu/packages/mp3.scm				\
+  gnu/packages/multiprecision.scm		\
+  gnu/packages/mysql.scm			\
+  gnu/packages/nano.scm				\
+  gnu/packages/ncurses.scm			\
+  gnu/packages/netpbm.scm			\
+  gnu/packages/nettle.scm			\
+  gnu/packages/ocaml.scm			\
+  gnu/packages/oggvorbis.scm			\
+  gnu/packages/openldap.scm			\
+  gnu/packages/openssl.scm			\
+  gnu/packages/parted.scm			\
+  gnu/packages/patchelf.scm			\
+  gnu/packages/pcre.scm				\
+  gnu/packages/pdf.scm				\
+  gnu/packages/perl.scm				\
+  gnu/packages/pkg-config.scm			\
+  gnu/packages/plotutils.scm			\
+  gnu/packages/popt.scm				\
+  gnu/packages/pth.scm				\
+  gnu/packages/python.scm			\
+  gnu/packages/qemu.scm				\
+  gnu/packages/ratpoison.scm			\
+  gnu/packages/readline.scm			\
+  gnu/packages/recutils.scm			\
+  gnu/packages/rsync.scm			\
+  gnu/packages/samba.scm			\
+  gnu/packages/scheme.scm			\
+  gnu/packages/screen.scm			\
+  gnu/packages/shishi.scm			\
+  gnu/packages/smalltalk.scm			\
+  gnu/packages/sqlite.scm			\
+  gnu/packages/ssh.scm				\
+  gnu/packages/system.scm			\
+  gnu/packages/tcl.scm				\
+  gnu/packages/tcsh.scm				\
+  gnu/packages/texinfo.scm			\
+  gnu/packages/texlive.scm			\
+  gnu/packages/time.scm				\
+  gnu/packages/tmux.scm				\
+  gnu/packages/tor.scm				\
+  gnu/packages/unrtf.scm			\
+  gnu/packages/version-control.scm		\
+  gnu/packages/vim.scm				\
+  gnu/packages/vpn.scm				\
+  gnu/packages/w3m.scm				\
+  gnu/packages/wdiff.scm			\
+  gnu/packages/wget.scm				\
+  gnu/packages/which.scm			\
+  gnu/packages/wordnet.scm			\
+  gnu/packages/xlockmore.scm			\
+  gnu/packages/xml.scm				\
+  gnu/packages/xorg.scm				\
+  gnu/packages/zile.scm				\
+  gnu/packages/zip.scm				\
+  gnu/system/vm.scm
+
+patchdir = $(guilemoduledir)/gnu/packages/patches
+dist_patch_DATA =						\
+  gnu/packages/patches/automake-skip-amhello-tests.patch	\
+  gnu/packages/patches/bigloo-gc-shebangs.patch			\
+  gnu/packages/patches/binutils-ld-new-dtags.patch		\
+  gnu/packages/patches/cmake-fix-tests.patch			\
+  gnu/packages/patches/cpio-gets-undeclared.patch		\
+  gnu/packages/patches/diffutils-gets-undeclared.patch		\
+  gnu/packages/patches/emacs-configure-sh.patch			\
+  gnu/packages/patches/findutils-absolute-paths.patch		\
+  gnu/packages/patches/flac-fix-memcmp-not-declared.patch	\
+  gnu/packages/patches/flex-bison-tests.patch			\
+  gnu/packages/patches/gawk-shell.patch				\
+  gnu/packages/patches/gcc-cross-environment-variables.patch	\
+  gnu/packages/patches/gettext-gets-undeclared.patch		\
+  gnu/packages/patches/glib-tests-desktop.patch			\
+  gnu/packages/patches/glib-tests-homedir.patch			\
+  gnu/packages/patches/glib-tests-prlimit.patch			\
+  gnu/packages/patches/glibc-bootstrap-system.patch		\
+  gnu/packages/patches/glibc-no-ld-so-cache.patch		\
+  gnu/packages/patches/grub-gets-undeclared.patch		\
+  gnu/packages/patches/guile-1.8-cpp-4.5.patch			\
+  gnu/packages/patches/guile-default-utf8.patch			\
+  gnu/packages/patches/guile-linux-syscalls.patch		\
+  gnu/packages/patches/guile-relocatable.patch			\
+  gnu/packages/patches/libapr-skip-getservbyname-test.patch	\
+  gnu/packages/patches/libevent-dns-tests.patch			\
+  gnu/packages/patches/libtool-skip-tests.patch			\
+  gnu/packages/patches/lsh-guile-compat.patch			\
+  gnu/packages/patches/lsh-no-root-login.patch			\
+  gnu/packages/patches/lsh-pam-service-name.patch		\
+  gnu/packages/patches/m4-gets-undeclared.patch			\
+  gnu/packages/patches/m4-readlink-EINVAL.patch			\
+  gnu/packages/patches/m4-s_isdir.patch				\
+  gnu/packages/patches/make-impure-dirs.patch			\
+  gnu/packages/patches/mcron-install.patch			\
+  gnu/packages/patches/perl-no-sys-dirs.patch			\
+  gnu/packages/patches/python-fix-dbm.patch			\
+  gnu/packages/patches/procps-make-3.82.patch			\
+  gnu/packages/patches/qemu-multiple-smb-shares.patch		\
+  gnu/packages/patches/readline-link-ncurses.patch		\
+  gnu/packages/patches/scheme48-tests.patch			\
+  gnu/packages/patches/tar-gets-undeclared.patch		\
+  gnu/packages/patches/tcsh-fix-autotest.patch			\
+  gnu/packages/patches/teckit-cstdio.patch			\
+  gnu/packages/patches/vpnc-script.patch			\
+  gnu/packages/patches/w3m-fix-compile.patch			\
+  gnu/packages/patches/xpdf-constchar.patch
+
+bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
+bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
+bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
+
+dist_bootstrap_x86_64_linux_DATA =		\
+  gnu/packages/bootstrap/x86_64-linux/bash	\
+  gnu/packages/bootstrap/x86_64-linux/mkdir	\
+  gnu/packages/bootstrap/x86_64-linux/tar	\
+  gnu/packages/bootstrap/x86_64-linux/xz
+
+dist_bootstrap_i686_linux_DATA =		\
+  gnu/packages/bootstrap/i686-linux/bash	\
+  gnu/packages/bootstrap/i686-linux/mkdir	\
+  gnu/packages/bootstrap/i686-linux/tar		\
+  gnu/packages/bootstrap/i686-linux/xz
+
+# Big bootstrap binaries are not included in the tarball.  Instead, they
+# are downloaded.
+nodist_bootstrap_x86_64_linux_DATA =					\
+  gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
+nodist_bootstrap_i686_linux_DATA =					\
+  gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
+
+# Those files must remain executable, so they remain executable once
+# imported into the store.
+install-data-hook:
+	chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
+
+DISTCLEANFILES =				\
+  $(nodist_bootstrap_x86_64_linux_DATA)		\
+  $(nodist_bootstrap_i686_linux_DATA)
+
+# Method to download a file from an external source.
+DOWNLOAD_FILE =								\
+  GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"	\
+  $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)"	\
+           "$(top_srcdir)/build-aux/download.scm"
+
+gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz:
+	$(MKDIR_P) `dirname "$@"`
+	$(DOWNLOAD_FILE) "$@" "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c"
+gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz:
+	$(MKDIR_P) `dirname "$@"`
+	$(DOWNLOAD_FILE) "$@" "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c"
diff --git a/gnu/packages/bdb.scm b/gnu/packages/bdb.scm
index 9a626b17d7..75a2b72b44 100644
--- a/gnu/packages/bdb.scm
+++ b/gnu/packages/bdb.scm
@@ -45,7 +45,11 @@
             (system* "./dist/configure"
                      (string-append "--prefix=" out)
                      (string-append "CONFIG_SHELL=" (which "bash"))
-                     (string-append "SHELL=" (which "bash"))))))
+                     (string-append "SHELL=" (which "bash"))
+
+                     ;; The compatibility mode is needed by some packages,
+                     ;; notably iproute2.
+                     "--enable-compat185"))))
        %standard-phases)))
    (synopsis "db, the Berkeley database")
    (description
diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
new file mode 100644
index 0000000000..13bcd45f77
--- /dev/null
+++ b/gnu/packages/gd.scm
@@ -0,0 +1,68 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages gd)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (gnu packages libpng)
+  #:use-module (gnu packages libjpeg)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages compression)
+  #:use-module ((guix licenses) #:select (bsd-style)))
+
+(define-public gd
+  (package
+    (name "gd")
+
+    ;; Note: With libgd.org now pointing to bitbucket.org, genuine old
+    ;; tarballs are no longer available.  Notably, versions 2.0.34 and .35 are
+    ;; missing.
+    (version "2.0.33")
+
+    (source (origin
+             (method url-fetch)
+             (uri "https://bitbucket.org/libgd/gd-libgd/get/GD_2_0_33.tar.gz")
+             (sha256
+              (base32
+               "0yrbx8mj9pykyzm0zl1q86xlkdvkajcsf5jmg688vhw9yc5wmbbw"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-cons-after
+                 'unpack 'chdir
+                 (lambda _
+                   (chdir "src"))
+                 %standard-phases)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("libpng" ,libpng)
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     `(("fontconfig" ,fontconfig)
+       ("libjpeg" ,libjpeg)))
+    (home-page "http://www.libgd.org/")
+    (synopsis "Library for the dynamic creation of images by programmers")
+    (description
+     "GD is a library for the dynamic creation of images by programmers.  GD
+is written in C, and \"wrappers\" are available for Perl, PHP and other
+languages.  GD creates PNG, JPEG, GIF, WebP, XPM, BMP images, among other
+formats.  GD is commonly used to generate charts, graphics, thumbnails, and
+most anything else, on the fly.  While not restricted to use on the web, the
+most common applications of GD involve website development.")
+    (license (bsd-style "file://COPYING"
+                        "See COPYING file in the distribution."))))
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 04aac9d94e..dd6c576cdf 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -214,3 +214,23 @@ Ghostscript. It currently includes the 35 standard PostScript fonts.")
    (license license:gpl2)
    (home-page "http://sourceforge.net/projects/gs-fonts/")))
 
+(define-public libspectre
+  (package
+   (name "libspectre")
+   (version "0.2.7")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
+                                version ".tar.gz"))
+            (sha256 (base32
+                     "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
+   (build-system gnu-build-system)
+   (inputs `(("ghostscript" ,ghostscript)
+             ("pkg-config" ,pkg-config)))
+   (synopsis "postscript rendering library")
+   (description
+    "libspectre is a small library for rendering Postscript documents.
+It provides a convenient easy to use API for handling and rendering
+Postscript documents.")
+   (license license:gpl2+)
+   (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
new file mode 100644
index 0000000000..d49b3d07dc
--- /dev/null
+++ b/gnu/packages/graphviz.scm
@@ -0,0 +1,124 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages graphviz)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages libpng)
+  #:use-module (gnu packages libjpeg)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages gd)
+  #:use-module ((guix licenses) #:select (lgpl2.0+ epl1.0)))
+
+(define-public graphviz
+  (package
+    (name "graphviz")
+    (version "2.28.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-"
+                   version
+                   ".tar.gz"))
+             (sha256
+              (base32
+               "0xpwg99cd8sp0c6r8klsmc66h1pday64kmnr4v6f9jkqqmrpkank"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; FIXME: rtest/rtest.sh is a ksh script (!).  Add ksh as an input.
+     '(#:tests? #f
+
+       #:phases (alist-cons-before
+                 'build 'pre-build
+                 (lambda _
+                   ;; Work around bogus makefile when using an external
+                   ;; libltdl.  Failing to do so, one hits this error:
+                   ;; "No rule to make target `-lltdl', needed by `libgvc.la'."
+                   (substitute* "lib/gvc/Makefile"
+                     (("am__append_5 *=.*")
+                      "am_append_5 =\n")))
+                 %standard-phases)))
+    (inputs
+     `(("libXrender" ,libxrender)
+       ("libX11" ,libx11)
+       ("gts" ,gts)
+       ("gd" ,gd)                                 ; FIXME: Our GD is too old
+       ("pango" ,pango)
+       ("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("libltdl" ,libtool)
+       ("bison" ,bison)
+       ("libXaw" ,libxaw)
+       ("expat" ,expat)
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://www.graphviz.org/")
+    (synopsis "Graph visualization software")
+    (description
+     "Graphviz is a graph visualization tool suite.  Graph visualization is a
+way of representing structural information as diagrams of abstract graphs and
+networks.  It has important applications in networking, bioinformatics,
+software engineering, database and web design, machine learning, and in visual
+interfaces for other technical domains.")
+    (license epl1.0)))
+
+(define-public gts
+  (package
+    (name "gts")
+    (version "0.7.6")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://sourceforge/gts/gts-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-cons-before
+                 'check 'pre-check
+                 (lambda _
+                   (chmod "test/boolean/test.sh" #o777))
+                 %standard-phases)
+
+       ;; Some data files used by the test suite are missing.
+       ;; See <http://sourceforge.net/p/gts/bugs/41/>.
+       #:tests? #f))
+    (inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     ;; The gts.pc file has glib-2.0 as required.
+     `(("glib" ,glib)))
+    (home-page "http://gts.sourceforge.net/")
+
+    ;; Note: Despite the name, this is not official GNU software.
+    (synopsis "Triangulated Surface Library")
+    (description
+     "Library intended to provide a set of useful functions to deal with
+3D surfaces meshed with interconnected triangles.")
+    (license lgpl2.0+)))
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 5dfe20f523..38ad05e074 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -22,8 +22,16 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages libpng)
+  #:use-module (gnu packages pdf)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages xorg))
 
 (define-public atk
   (package
@@ -46,3 +54,102 @@ by other toolkits and applications. Using the ATK interfaces, accessibility
 tools have full access to view and control running applications.")
    (license license:lgpl2.0+)
    (home-page "https://developer.gnome.org/atk/")))
+
+(define-public cairo
+  (package
+   (name "cairo")
+   (version "1.12.14")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "http://cairographics.org/releases/cairo-"
+                                version ".tar.xz"))
+            (sha256
+             (base32
+              "04xcykglff58ygs0dkrmmnqljmpjwp2qgwcz8sijqkdpz7ix3l4n"))))
+   (build-system gnu-build-system)
+   (propagated-inputs
+    `(("fontconfig" ,fontconfig)
+      ("freetype" ,freetype)
+      ("glib" ,glib)
+      ("libpng" ,libpng)
+      ("libx11" ,libx11)
+      ("libxext" ,libxext)
+      ("libxrender" ,libxrender)
+      ("pixman" ,pixman)))
+   (inputs
+    `(("ghostscript" ,ghostscript)
+      ("libspectre" ,libspectre)
+      ("pkg-config" ,pkg-config)
+      ("poppler" ,poppler)
+      ("python" ,python)
+      ("xextproto" ,xextproto)
+      ("zlib" ,zlib)))
+    (arguments
+      `(#:tests? #f)) ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
+   (synopsis "2D graphics library")
+   (description
+    "Cairo is a 2D graphics library with support for multiple output devices.
+Currently supported output targets include the X Window System (via both
+Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
+output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
+
+Cairo is designed to produce consistent output on all output media while
+taking advantage of display hardware acceleration when available
+eg. through the X Render Extension).
+
+The cairo API provides operations similar to the drawing operators of
+PostScript and PDF. Operations in cairo including stroking and filling cubic
+Bézier splines, transforming and compositing translucent images, and
+antialiased text rendering. All drawing operations can be transformed by any
+affine transformation (scale, rotation, shear, etc.)")
+   (license license:lgpl2.1) ; or Mozilla Public License 1.1
+   (home-page "http://cairographics.org/")))
+
+(define-public harfbuzz
+  (package
+   (name "harfbuzz")
+   (version "0.9.18")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-"
+                                version ".tar.bz2"))
+            (sha256
+             (base32
+              "026rlwspf1zn5akds9fwibpqpn47kmlnmqm5fi0cp4k4dnygpw7y"))))
+   (build-system gnu-build-system)
+   (inputs
+    `(("cairo" ,cairo)
+      ("icu4c" ,icu4c)
+      ("pkg-config" ,pkg-config)
+      ("python" ,python)))
+   (synopsis "opentype text shaping engine")
+   (description
+    "HarfBuzz is an OpenType text shaping engine.")
+   (license (license:x11-style "file://COPYING"
+                       "See 'COPYING' in the distribution."))
+   (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
+
+(define-public pango
+  (package
+   (name "pango")
+   (version "1.34.1")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnome/sources/pango/1.34/pango-"
+                                version ".tar.xz"))
+            (sha256
+             (base32
+              "0k7662qix7zzh7mf6ikdj594n8jpbfm25z8swz64zbm86kgk1shs"))))
+   (build-system gnu-build-system)
+   (inputs
+    `(("cairo" ,cairo)
+      ("harfbuzz" ,harfbuzz)
+      ("pkg-config" ,pkg-config)
+      ("zlib" ,zlib)))
+   (synopsis "GNOME text and font handling library")
+   (description
+    "Pango is the core text and font handling library used in GNOME
+applications. It has extensive support for the different writing systems
+used throughout the world.")
+   (license license:lgpl2.0+)
+   (home-page "https://developer.gnome.org/pango/")))
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
new file mode 100644
index 0000000000..e408b13fa3
--- /dev/null
+++ b/gnu/packages/imagemagick.scm
@@ -0,0 +1,92 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages imagemagick)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:select (fsf-free))
+  #:use-module (gnu packages libjpeg)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages graphviz)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages libpng)
+  #:use-module (gnu packages libtiff)
+  #:use-module (gnu packages libjpeg)
+  #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages pkg-config))
+
+(define-public imagemagick
+  (package
+    (name "imagemagick")
+    (version "6.8.6-0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://imagemagick/ImageMagick-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1qmwpnq2mcxjnp0rjyb2g7v87lhmll19imx3iys6kplh8amrmqnv"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (alist-cons-before
+                 'build 'pre-build
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (substitute* "Makefile"
+                     ;; Clear the `LIBRARY_PATH' setting, which otherwise
+                     ;; interferes with our own use.
+                     (("^LIBRARY_PATH[[:blank:]]*=.*$")
+                      "")
+
+                     ;; Since the Makefile overrides $docdir, modify it to
+                     ;; refer to what we want.
+                     (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
+                      (let ((doc (assoc-ref outputs "doc")))
+                        (string-append "DOCUMENTATION_PATH = "
+                                       doc "/share/doc/"
+                                       ,name "-" ,version "\n")))))
+                 %standard-phases)))
+    ;; TODO: Add Jasper, LCMS, etc.
+    (inputs `(("graphviz" ,graphviz)
+              ("ghostscript" ,ghostscript)
+              ("libx11" ,libx11)
+              ("zlib" ,zlib)
+              ("libxml2" ,libxml2)
+              ("libtiff" ,libtiff)
+              ("libpng" ,libpng)
+              ("libjpeg" ,libjpeg-8)
+              ("pango" ,pango)
+              ("freetype" ,freetype)
+              ("bzip2" ,bzip2)
+              ("xz" ,xz)
+              ("pkg-config" ,pkg-config)))
+    (outputs '("out"
+               "doc"))                          ; 26 MiB of HTML documentation
+    (home-page "http://www.imagemagick.org/")
+    (synopsis "Create, edit, compose, or convert bitmap images")
+    (description
+     "ImageMagick® is a software suite to create, edit, compose, or convert
+bitmap images. It can read and write images in a variety of formats (over 100)
+including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
+and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and
+transform images, adjust image colors, apply various special effects, or draw
+text, lines, polygons, ellipses and Bézier curves.")
+    (license (fsf-free "http://www.imagemagick.org/script/license.php"))))
diff --git a/gnu/packages/libpng.scm b/gnu/packages/libpng.scm
index 06facc9a9a..32f38194e4 100644
--- a/gnu/packages/libpng.scm
+++ b/gnu/packages/libpng.scm
@@ -37,7 +37,10 @@
             (sha256 (base32
                      "0m3vz3gig7s63zanq5b1dgb5ph12qm0cylw4g4fbxlsq3f74hn8l"))))
    (build-system gnu-build-system)
-   (inputs `(("zlib" ,zlib)))
+
+   ;; libpng.la says "-lz", so propagate it.
+   (propagated-inputs `(("zlib" ,zlib)))
+
    (synopsis "Libpng, a library for handling PNG files")
    (description
     "Libpng is the official PNG (Portable Network Graphics) reference
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0708b5cb81..0bc9fbcb5e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -23,8 +23,10 @@
   #:use-module ((gnu packages compression)
                 #:renamer (symbol-prefix-proc 'guix:))
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages bdb)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (guix packages)
@@ -78,12 +80,18 @@
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
-                  (srfi srfi-1))
+                  (srfi srfi-1)
+                  ,@(if (%current-target-system)
+                        '((guix build gnu-cross-build))
+                        '()))
        #:phases (alist-replace
                  'build ,(build-phase (%current-system))
                  (alist-replace
                   'install ,install-phase
-                  (alist-delete 'configure %standard-phases)))
+                  (alist-delete 'configure
+                                ,(if (%current-target-system)
+                                     '%standard-cross-phases
+                                     '%standard-phases))))
        #:tests? #f))
     (synopsis "GNU Linux-Libre kernel headers")
     (description "Headers of the Linux-Libre kernel.")
@@ -449,3 +457,88 @@ trace of all the system calls made by a another process/program.")
      "The Advanced Linux Sound Architecture (ALSA) provides audio and
 MIDI functionality to the Linux-based operating system.")
     (license lgpl2.1+)))
+
+(define-public iptables
+  (package
+    (name "iptables")
+    (version "1.4.16.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "http://www.netfilter.org/projects/iptables/files/iptables-"
+                   version ".tar.bz2"))
+             (sha256
+              (base32
+               "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
+    (build-system gnu-build-system)
+    (arguments '(#:tests? #f))                    ; no test suite
+    (home-page "http://www.netfilter.org/projects/iptables/index.html")
+    (synopsis "Program to configure the Linux IP packet filtering rules")
+    (description
+     "iptables is the userspace command line program used to configure the
+Linux 2.4.x and later IPv4 packet filtering ruleset.  It is targeted towards
+system administrators.  Since Network Address Translation is also configured
+from the packet filter ruleset, iptables is used for this, too.  The iptables
+package also includes ip6tables.  ip6tables is used for configuring the IPv6
+packet filter.")
+    (license gpl2+)))
+
+(define-public iproute
+  (package
+    (name "iproute2")
+    (version "3.8.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
+                   version ".tar.xz"))
+             (sha256
+              (base32
+               "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                                ; no test suite
+       #:make-flags (let ((out (assoc-ref %outputs "out")))
+                      (list "DESTDIR="
+                            (string-append "LIBDIR=" out "/lib")
+                            (string-append "SBINDIR=" out "/sbin")
+                            (string-append "CONFDIR=" out "/etc")
+                            (string-append "DOCDIR=" out "/share/doc/"
+                                           ,name "-" ,version)
+                            (string-append "MANDIR=" out "/share/man")))
+       #:phases (alist-cons-before
+                 'install 'pre-install
+                 (lambda _
+                   ;; Don't attempt to create /var/lib/arpd.
+                   (substitute* "Makefile"
+                     (("^.*ARPDDIR.*$") "")))
+                 %standard-phases)))
+    (inputs
+     `(("iptables" ,iptables)
+       ("db4" ,bdb)
+       ("pkg-config" ,pkg-config)
+       ("flex" ,flex)
+       ("bison" ,bison)))
+    (home-page
+     "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
+    (synopsis
+     "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
+    (description
+     "Iproute2 is a collection of utilities for controlling TCP/IP
+networking and traffic with the Linux kernel.
+
+Most network configuration manuals still refer to ifconfig and route as the
+primary network configuration tools, but ifconfig is known to behave
+inadequately in modern network environments.  They should be deprecated, but
+most distros still include them.  Most network configuration systems make use
+of ifconfig and thus provide a limited feature set.  The /etc/net project aims
+to support most modern network technologies, as it doesn't use ifconfig and
+allows a system administrator to make use of all iproute2 features, including
+traffic control.
+
+iproute2 is usually shipped in a package called iproute or iproute2 and
+consists of several tools, of which the most important are ip and tc.  ip
+controls IPv4 and IPv6 configuration and tc stands for traffic control.  Both
+tools print detailed usage messages and are accompanied by a set of
+manpages.")
+    (license gpl2+)))
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index b927d5db25..c8de969b1a 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -49,33 +49,39 @@
 ;;;
 ;;; Code:
 
-(define %glibc-for-bootstrap
-  ;; A libc whose `system' and `popen' functions looks for `sh' in $PATH,
-  ;; without nscd, and with static NSS modules.
-  (package (inherit glibc-final)
+(define* (glibc-for-bootstrap #:optional (base glibc-final))
+  "Return a libc deriving from BASE whose `system' and `popen' functions looks
+for `sh' in $PATH, and without nscd, and with static NSS modules."
+  (package (inherit base)
     (arguments
-     (substitute-keyword-arguments (package-arguments glibc-final)
+     (substitute-keyword-arguments (package-arguments base)
        ((#:patches patches)
-        `(cons (assoc-ref %build-inputs "patch/system") ,patches))
+	`(cons (assoc-ref %build-inputs "patch/system") ,patches))
        ((#:configure-flags flags)
-        ;; Arrange so that getaddrinfo & co. do not contact the nscd,
-        ;; and can use statically-linked NSS modules.
-        `(cons* "--disable-nscd" "--disable-build-nscd"
-                "--enable-static-nss"
-                ,flags))))
+	;; Arrange so that getaddrinfo & co. do not contact the nscd,
+	;; and can use statically-linked NSS modules.
+	`(cons* "--disable-nscd" "--disable-build-nscd"
+		"--enable-static-nss"
+		,flags))))
     (inputs
      `(("patch/system" ,(search-patch "glibc-bootstrap-system.patch"))
-       ,@(package-inputs glibc-final)))))
-
-(define %standard-inputs-with-relocatable-glibc
-  ;; Standard inputs with the above libc and corresponding GCC.
-  `(("libc", %glibc-for-bootstrap)
-    ("gcc" ,(package-with-explicit-inputs
-             gcc-4.7
-             `(("libc",%glibc-for-bootstrap)
-               ,@(alist-delete "libc" %final-inputs))
-             (current-source-location)))
-    ,@(fold alist-delete %final-inputs '("libc" "gcc"))))
+       ,@(package-inputs base)))))
+
+(define (package-with-relocatable-glibc p)
+  "Return a variant of P that uses the libc as defined by
+`glibc-for-bootstrap'."
+
+  (define inputs
+    `(("libc", (glibc-for-bootstrap))
+      ("gcc" ,(package-with-explicit-inputs
+               gcc-4.7
+	       `(("libc",(glibc-for-bootstrap))
+		 ,@(alist-delete "libc" %final-inputs))
+	       (current-source-location)))
+      ,@(fold alist-delete %final-inputs '("libc" "gcc"))))
+
+  (package-with-explicit-inputs p inputs
+				(current-source-location)))
 
 (define %bash-static
   (static-package bash-light))
@@ -83,18 +89,22 @@
 (define %static-inputs
   ;; Packages that are to be used as %BOOTSTRAP-INPUTS.
   (let ((coreutils (package (inherit coreutils)
-                     (arguments
-                      `(#:configure-flags
-                        '("--disable-nls"
-                          "--disable-silent-rules"
-                          "--enable-no-install-program=stdbuf,libstdbuf.so"
-                          "CFLAGS=-Os -g0"        ; smaller, please
-                          "LDFLAGS=-static -pthread")
-                        #:tests? #f   ; signal-related Gnulib tests fail
-                        ,@(package-arguments coreutils)))
-
-                     ;; Remove optional dependencies such as GMP.
-                     (inputs `(,(assoc "perl" (package-inputs coreutils))))))
+                      (arguments
+                       `(#:configure-flags
+                         '("--disable-nls"
+                           "--disable-silent-rules"
+                           "--enable-no-install-program=stdbuf,libstdbuf.so"
+                           "CFLAGS=-Os -g0"        ; smaller, please
+                           "LDFLAGS=-static -pthread")
+                         #:tests? #f   ; signal-related Gnulib tests fail
+                         ,@(package-arguments coreutils)))
+
+                      ;; Remove optional dependencies such as GMP.  Keep Perl
+                      ;; except if it's missing (which is the case when
+                      ;; cross-compiling).
+                      (inputs (match (assoc "perl" (package-inputs coreutils))
+                                (#f '())
+                                (x  (list x))))))
         (bzip2 (package (inherit bzip2)
                  (arguments
                   (substitute-keyword-arguments (package-arguments bzip2)
@@ -131,11 +141,8 @@
                               (("-export-dynamic") "")))
                           ,phases)))))
                 (inputs `(("patch/sh" ,(search-patch "gawk-shell.patch"))))))
-        (finalize (lambda (p)
-                    (static-package (package-with-explicit-inputs
-                                     p
-                                     %standard-inputs-with-relocatable-glibc)
-                                    (current-source-location)))))
+	(finalize (compose static-package
+			   package-with-relocatable-glibc)))
     `(,@(map (match-lambda
               ((name package)
                (list name (finalize package))))
@@ -280,7 +287,7 @@
   ;; GNU libc's essential shared libraries, dynamic linker, and headers,
   ;; with all references to store directories stripped.  As a result,
   ;; libc.so is unusable and need to be patched for proper relocation.
-  (let ((glibc %glibc-for-bootstrap))
+  (let ((glibc (glibc-for-bootstrap)))
     (package (inherit glibc)
       (name "glibc-stripped")
       (build-system trivial-build-system)
@@ -331,7 +338,7 @@
 
 (define %gcc-static
   ;; A statically-linked GCC, with stripped-down functionality.
-  (package-with-explicit-inputs
+  (package-with-relocatable-glibc
    (package (inherit gcc-final)
      (name "gcc-static")
      (arguments
@@ -358,11 +365,10 @@
             ((#:make-flags flags)
              `(cons "BOOT_LDFLAGS=-static" ,flags)))))
      (inputs `(("gmp-source" ,(package-source gmp))
-               ("mpfr-source" ,(package-source mpfr))
-               ("mpc-source" ,(package-source mpc))
-               ("binutils" ,binutils-final)
-               ,@(package-inputs gcc-4.7))))
-   %standard-inputs-with-relocatable-glibc))
+	       ("mpfr-source" ,(package-source mpfr))
+	       ("mpc-source" ,(package-source mpc))
+	       ("binutils" ,binutils-final)
+	       ,@(package-inputs gcc-4.7))))))
 
 (define %gcc-stripped
   ;; The subset of GCC files needed for bootstrap.
@@ -405,54 +411,52 @@
   ;; .scm and .go files relative to its installation directory, rather
   ;; than in hard-coded configure-time paths.
   (let* ((guile (package (inherit guile-2.0)
-                  (name (string-append (package-name guile-2.0) "-static"))
-                  (inputs
-                   `(("patch/relocatable"
-                      ,(search-patch "guile-relocatable.patch"))
-                     ("patch/utf8"
-                      ,(search-patch "guile-default-utf8.patch"))
-                     ("patch/syscalls"
-                      ,(search-patch "guile-linux-syscalls.patch"))
-                     ,@(package-inputs guile-2.0)))
-                  (propagated-inputs
-                   `(("bdw-gc" ,libgc)
-                     ,@(alist-delete "bdw-gc"
-                                     (package-propagated-inputs guile-2.0))))
-                  (arguments
-                   `(;; When `configure' checks for ltdl availability, it
-                     ;; doesn't try to link using libtool, and thus fails
-                     ;; because of a missing -ldl.  Work around that.
-                     #:configure-flags '("LDFLAGS=-ldl")
-
-                     #:phases (alist-cons-before
-                               'configure 'static-guile
-                               (lambda _
-                                 (substitute* "libguile/Makefile.in"
-                                   ;; Create a statically-linked `guile'
-                                   ;; executable.
-                                   (("^guile_LDFLAGS =")
-                                    "guile_LDFLAGS = -all-static")
-
-                                   ;; Add `-ldl' *after* libguile-2.0.la.
-                                   (("^guile_LDADD =(.*)$" _ ldadd)
-                                    (string-append "guile_LDADD = "
-                                                   (string-trim-right ldadd)
-                                                   " -ldl\n"))))
-                               %standard-phases)
-
-                     ;; Allow Guile to be relocated, as is needed during
-                     ;; bootstrap.
-                     #:patches
-                     (list (assoc-ref %build-inputs "patch/relocatable")
-                           (assoc-ref %build-inputs "patch/utf8")
-                           (assoc-ref %build-inputs "patch/syscalls"))
-
-                     ;; There are uses of `dynamic-link' in
-                     ;; {foreign,coverage}.test that don't fly here.
-                     #:tests? #f)))))
-    (package-with-explicit-inputs (static-package guile)
-                                  %standard-inputs-with-relocatable-glibc
-                                  (current-source-location))))
+		  (name (string-append (package-name guile-2.0) "-static"))
+		  (inputs
+		   `(("patch/relocatable"
+		      ,(search-patch "guile-relocatable.patch"))
+		     ("patch/utf8"
+		      ,(search-patch "guile-default-utf8.patch"))
+		     ("patch/syscalls"
+		      ,(search-patch "guile-linux-syscalls.patch"))
+		     ,@(package-inputs guile-2.0)))
+		  (propagated-inputs
+		   `(("bdw-gc" ,libgc)
+		     ,@(alist-delete "bdw-gc"
+				     (package-propagated-inputs guile-2.0))))
+		  (arguments
+		   `(;; When `configure' checks for ltdl availability, it
+		     ;; doesn't try to link using libtool, and thus fails
+		     ;; because of a missing -ldl.  Work around that.
+		     #:configure-flags '("LDFLAGS=-ldl")
+
+		     #:phases (alist-cons-before
+			       'configure 'static-guile
+			       (lambda _
+				 (substitute* "libguile/Makefile.in"
+				   ;; Create a statically-linked `guile'
+				   ;; executable.
+				   (("^guile_LDFLAGS =")
+				    "guile_LDFLAGS = -all-static")
+
+				   ;; Add `-ldl' *after* libguile-2.0.la.
+				   (("^guile_LDADD =(.*)$" _ ldadd)
+				    (string-append "guile_LDADD = "
+						   (string-trim-right ldadd)
+						   " -ldl\n"))))
+			       %standard-phases)
+
+		     ;; Allow Guile to be relocated, as is needed during
+		     ;; bootstrap.
+		     #:patches
+		     (list (assoc-ref %build-inputs "patch/relocatable")
+			   (assoc-ref %build-inputs "patch/utf8")
+			   (assoc-ref %build-inputs "patch/syscalls"))
+
+		     ;; There are uses of `dynamic-link' in
+		     ;; {foreign,coverage}.test that don't fly here.
+		     #:tests? #f)))))
+    (package-with-relocatable-glibc (static-package guile))))
 
 (define %guile-static-stripped
   ;; A stripped static Guile binary, for use during bootstrap.
diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 9f10440fec..eb5f748bda 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -24,7 +24,10 @@
   #:use-module (guix build-system trivial)
   #:export (pkg-config))
 
-(define %pkg-config
+;; This is the "primitive" pkg-config package.  People should use `pkg-config'
+;; (see below) rather than `%pkg-config', but we export `%pkg-config' so that
+;; `fold-packages' finds it.
+(define-public %pkg-config
   (package
    (name "pkg-config")
    (version "0.27.1")
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index c79a709ecd..1e66750b01 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -31,6 +31,10 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages libphidget)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libjpeg)
+  #:use-module ((gnu packages gtk) #:select (cairo pango))
   #:use-module (ice-9 match))
 
 (define-public mit-scheme
@@ -319,3 +323,72 @@ implementation techniques and as an expository tool.")
 
     ;; Most files are BSD-3; see COPYING for the few exceptions.
     (license bsd-3)))
+
+(define-public racket
+  (package
+    (name "racket")
+    (version "5.3.4")
+    (source (origin
+             (method url-fetch)
+             (uri (list (string-append "http://download.racket-lang.org/installers/"
+                                       version "/racket/racket-" version
+                                       "-src-unix.tgz")
+                        (string-append
+                         "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
+                         version "/racket/racket-" version "-src-unix.tgz")))
+             (sha256
+              ;; XXX: Used to be 1xhnx3yd74zrvn6sfcqmk57kxj51cwvm660dwiaxr1qxnm5lq0v7.
+              (base32 "0yrdmpdvzf092869y6zjjjxl6j2kypgiv7qrfkv7lj8w01pbh7sd"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (let* ((gui-libs
+               (lambda (inputs)
+                 ;; FIXME: Add GTK+ and GDK for DrRacket.
+                 (let ((glib     (string-append (assoc-ref inputs "glib") "/lib"))
+                       (cairo    (string-append (assoc-ref inputs "cairo") "/lib"))
+                       (pango    (string-append (assoc-ref inputs "pango") "/lib"))
+                       (libjpeg  (string-append (assoc-ref inputs "libjpeg") "/lib")))
+                   (list glib cairo pango libjpeg)))))
+         (alist-cons-before
+          'configure 'pre-configure
+          (lambda* (#:key inputs #:allow-other-keys)
+            (chdir "src")
+
+            ;; The GUI libs are dynamically opened through the FFI, so they
+            ;; must be in the loader's search path.
+            (setenv "LD_LIBRARY_PATH" (string-join (gui-libs inputs) ":")))
+          (alist-cons-after
+           'unpack 'patch-/bin/sh
+           (lambda _
+             (substitute* "collects/racket/system.rkt"
+               (("/bin/sh") (which "sh"))))
+           (alist-cons-after
+            'install 'wrap-programs
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out")))
+                (define (wrap prog)
+                  (wrap-program prog
+                                `("LD_LIBRARY_PATH" ":" prefix
+                                  ,(gui-libs inputs))))
+
+                (with-directory-excursion (string-append out "/bin")
+                  (for-each wrap
+                            (list "gracket" "drracket" "slideshow" "mred"))
+                  #t)))
+            %standard-phases))))
+       #:tests? #f                                ; XXX: how to run them?
+       ))
+    (inputs `(("libffi" ,libffi)
+              ("glib" ,glib)                      ; for DrRacket
+              ("cairo" ,cairo)
+              ("pango" ,pango)
+              ("libjpeg" ,libjpeg-8)))
+    (home-page "http://racket-lang.org")
+    (synopsis "Implementation of Scheme and related languages")
+    (description
+     "Racket is an implementation of the Scheme programming language (R5RS and
+R6RS) and related languages, such as Typed Racket.  It features a compiler and
+a virtual machine with just-in-time native compilation, as well as a large set
+of libraries.")
+    (license lgpl2.0+)))
diff --git a/gnu/packages/subversion.scm b/gnu/packages/subversion.scm
deleted file mode 100644
index 28ddc42e00..0000000000
--- a/gnu/packages/subversion.scm
+++ /dev/null
@@ -1,58 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (gnu packages subversion)
-  #:use-module ((guix licenses) #:select (asl2.0))
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix build-system gnu)
-  #:use-module (gnu packages)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages libapr)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages python)
-  #:use-module (gnu packages sqlite))
-
-(define-public subversion
-  (package
-    (name "subversion")
-    (version "1.7.8")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "https://archive.apache.org/dist/subversion/subversion-"
-                                 version ".tar.bz2"))
-             (sha256
-              (base32
-               "11inl9n1riahfnbk1fax0dysm2swakzhzhpmm2zvga6fikcx90zw"))))
-    (build-system gnu-build-system)
-    (inputs
-      `(("libapr" ,libapr)
-        ("libaprutil" ,libaprutil)
-        ("perl" ,perl)
-        ("python" ,python)
-        ("sqlite" ,sqlite)
-        ("zlib" ,zlib)))
-    (home-page "http://subversion.apache.org/")
-    (synopsis "Subversion, a revision control system")
-    (description
-     "Subversion exists to be universally recognized and adopted as an
-open-source, centralized version control system characterized by its
-reliability as a safe haven for valuable data; the simplicity of its model and
-usage; and its ability to support the needs of a wide variety of users and
-projects, from individuals to large-scale enterprise operations.")
-    (license asl2.0)))
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6654be93b2..018cf1b9f8 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,7 +18,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages version-control)
-  #:use-module ((guix licenses) #:select (gpl1+ gpl2+ gpl3+))
+  #:use-module ((guix licenses) #:select (asl2.0 gpl1+ gpl2+ gpl3+))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -25,7 +26,11 @@
   #:use-module (guix build utils)
   #:use-module ((gnu packages gettext)
                 #:renamer (symbol-prefix-proc 'guix:))
+  #:use-module (gnu packages libapr)
   #:use-module (gnu packages nano)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages compression))
 
 (define-public bazaar
@@ -56,6 +61,35 @@ organize their workspace in whichever way they want.  It is possible to work
 from a command line or use a GUI application.")
     (license gpl2+)))
 
+(define-public subversion
+  (package
+    (name "subversion")
+    (version "1.7.8")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://archive.apache.org/dist/subversion/subversion-"
+                                 version ".tar.bz2"))
+             (sha256
+              (base32
+               "11inl9n1riahfnbk1fax0dysm2swakzhzhpmm2zvga6fikcx90zw"))))
+    (build-system gnu-build-system)
+    (inputs
+      `(("libapr" ,libapr)
+        ("libaprutil" ,libaprutil)
+        ("perl" ,perl)
+        ("python" ,python)
+        ("sqlite" ,sqlite)
+        ("zlib" ,zlib)))
+    (home-page "http://subversion.apache.org/")
+    (synopsis "Subversion, a revision control system")
+    (description
+     "Subversion exists to be universally recognized and adopted as an
+open-source, centralized version control system characterized by its
+reliability as a safe haven for valuable data; the simplicity of its model and
+usage; and its ability to support the needs of a wide variety of users and
+projects, from individuals to large-scale enterprise operations.")
+    (license asl2.0)))
+
 (define-public rcs
   (package
     (name "rcs")
diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index af54f51419..85a3c697e3 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -54,7 +54,7 @@ ignored."
                               search-paths native-search-paths)
   "Like `trivial-build', but in a cross-compilation context."
   (build-expression->derivation store name system
-                                `(begin (define %target ,target) ,builder)
+                                `(let ((%target ,target)) ,builder)
                                 (append native-inputs inputs)
                                 #:outputs outputs
                                 #:modules modules
diff --git a/guix/build/download.scm b/guix/build/download.scm
index 53e6b2363c..dcce0bfc89 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -28,7 +28,9 @@
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
-  #:export (url-fetch))
+  #:export (url-fetch
+            progress-proc
+            uri-abbreviation))
 
 ;;; Commentary:
 ;;;
diff --git a/guix/derivations.scm b/guix/derivations.scm
index cf329819c4..3c433a2685 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -469,8 +469,9 @@ in SIZE bytes."
               (drv    (make-derivation outputs inputs sources
                                        system builder args env-vars)))
          (sha256
-          (string->utf8 (call-with-output-string
-                         (cut write-derivation drv <>))))))))))
+          (with-fluids ((%default-port-encoding "UTF-8"))
+            (string->utf8 (call-with-output-string
+                           (cut write-derivation drv <>)))))))))))
 
 (define (store-path type hash name)               ; makeStorePath
   "Return the store path for NAME/HASH/TYPE."
diff --git a/guix/download.scm b/guix/download.scm
index 99353be8b0..fc6c815792 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -148,7 +148,14 @@
        "ftp://ftp.osuosl.org/pub/CPAN/"
        "ftp://ftp.nara.wide.ad.jp/pub/CPAN/"
        "http://mirrors.163.com/cpan/"
-       "ftp://cpan.mirror.ac.za/"))))
+       "ftp://cpan.mirror.ac.za/")
+      (imagemagick       ; from http://www.imagemagick.org/script/download.php
+       "http://mirror.checkdomain.de/imagemagick/"
+       "ftp://gd.tuwien.ac.at/pub/graphics/ImageMagick/"
+       "http://www.imagemagick.org/download"
+       "ftp://mirror.searchdaimon.com/ImageMagick"
+       "http://mirror.is.co.za/pub/imagemagick/"
+       "ftp://mirror.aarnet.edu.au/pub/imagemagick/"))))
 
 (define (gnutls-derivation store system)
   "Return the GnuTLS derivation for SYSTEM."
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index cecb68ec36..77ec7635de 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -51,6 +51,8 @@ Invoke the garbage collector.\n"))
   (display (_ "
       --references       list the references of PATHS"))
   (display (_ "
+  -R, --requisites       list the requisites of PATHS"))
+  (display (_ "
       --referrers        list the referrers of PATHS"))
   (newline)
   (display (_ "
@@ -128,6 +130,10 @@ interpreted."
                 (lambda (opt name arg result)
                   (alist-cons 'action 'list-references
                               (alist-delete 'action result))))
+        (option '(#\R "requisites") #f #f
+                (lambda (opt name arg result)
+                  (alist-cons 'action 'list-requisites
+                              (alist-delete 'action result))))
         (option '("referrers") #f #f
                 (lambda (opt name arg result)
                   (alist-cons 'action 'list-referrers
@@ -189,6 +195,8 @@ interpreted."
          (delete-paths store paths))
         ((list-references)
          (list-relatives references))
+        ((list-requisites)
+         (list-relatives requisites))
         ((list-referrers)
          (list-relatives referrers))
         ((list-dead)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 69b7efd154..11301ccff2 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -846,9 +846,13 @@ more information.~%"))
                                                   (current-error-port)
                                                   (%make-void-port "w"))))
                                 (build-derivations (%store) (list prof-drv)))
-                              (begin
+                              (let ((count (length packages)))
                                 (switch-symlinks name prof)
                                 (switch-symlinks profile name)
+                                (format #t (N_ "~a package in profile~%"
+                                               "~a packages in profile~%"
+                                               count)
+                                        count)
                                 (display-search-paths packages
                                                       profile))))))))))
 
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm
index 13c382877b..271a22541a 100755
--- a/guix/scripts/substitute-binary.scm
+++ b/guix/scripts/substitute-binary.scm
@@ -24,12 +24,15 @@
   #:use-module (guix records)
   #:use-module (guix nar)
   #:use-module ((guix build utils) #:select (mkdir-p))
+  #:use-module ((guix build download)
+                #:select (progress-proc uri-abbreviation))
   #:use-module (ice-9 rdelim)
   #:use-module (ice-9 regex)
   #:use-module (ice-9 match)
   #:use-module (ice-9 threads)
   #:use-module (ice-9 format)
   #:use-module (ice-9 ftw)
+  #:use-module (ice-9 binary-ports)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-9)
   #:use-module (srfi srfi-11)
@@ -117,7 +120,38 @@ pairs."
           (else
            (error "unmatched line" line)))))
 
-(define* (fetch uri #:key (buffered? #t))
+(define %fetch-timeout
+  ;; Number of seconds after which networking is considered "slow".
+  3)
+
+(define-syntax-rule (with-timeout duration handler body ...)
+  "Run BODY; when DURATION seconds have expired, call HANDLER, and run BODY
+again."
+  (begin
+    (sigaction SIGALRM
+      (lambda (signum)
+        (sigaction SIGALRM SIG_DFL)
+        handler))
+    (alarm duration)
+    (call-with-values
+        (lambda ()
+          (let try ()
+            (catch 'system-error
+              (lambda ()
+                body ...)
+              (lambda args
+                ;; The SIGALRM triggers EINTR.  When that happens, try again.
+                ;; Note: SA_RESTART cannot be used because of
+                ;; <http://bugs.gnu.org/14640>.
+                (if (= EINTR (system-error-errno args))
+                    (try)
+                    (apply throw args))))))
+      (lambda result
+        (alarm 0)
+        (sigaction SIGALRM SIG_DFL)
+        (apply values result)))))
+
+(define* (fetch uri #:key (buffered? #t) (timeout? #t))
   "Return a binary input port to URI and the number of bytes it's expected to
 provide."
   (case (uri-scheme uri)
@@ -127,7 +161,21 @@ provide."
          (setvbuf port _IONBF))
        (values port (stat:size (stat port)))))
     ((http)
-     (http-fetch uri #:text? #f #:buffered? buffered?))))
+     ;; On Guile 2.0.5, `http-fetch' fetches the whole thing at once.  So
+     ;; honor TIMEOUT? to disable the timeout when fetching a nar.
+     ;;
+     ;; Test this with:
+     ;;   sudo tc qdisc add dev eth0 root netem delay 1500ms
+     ;; and then cancel with:
+     ;;   sudo tc qdisc del dev eth0 root
+     (with-timeout (if (or timeout? (version>? (version) "2.0.5"))
+                       %fetch-timeout
+                       0)
+       (begin
+         (warning (_ "while fetching ~a: server is unresponsive~%")
+                  (uri->string uri))
+         (warning (_ "try `--no-substitutes' if the problem persists~%")))
+       (http-fetch uri #:text? #f #:buffered? buffered?)))))
 
 (define-record-type <cache>
   (%make-cache url store-directory wants-mass-query?)
@@ -353,7 +401,8 @@ indefinitely."
       (cute write (time-second now) <>))))
 
 (define (decompressed-port compression input)
-  "Return an input port where INPUT is decompressed according to COMPRESSION."
+  "Return an input port where INPUT is decompressed according to COMPRESSION,
+along with a list of PIDs to wait for."
   (match compression
     ("none"  (values input '()))
     ("bzip2" (filtered-port `(,%bzip2 "-dc") input))
@@ -361,6 +410,24 @@ indefinitely."
     ("gzip"  (filtered-port `(,%gzip "-dc") input))
     (else    (error "unsupported compression scheme" compression))))
 
+(define (progress-report-port report-progress port)
+  "Return a port that calls REPORT-PROGRESS every time something is read from
+PORT.  REPORT-PROGRESS is a two-argument procedure such as that returned by
+`progress-proc'."
+  (define total 0)
+  (define (read! bv start count)
+    (let ((n (match (get-bytevector-n! port bv start count)
+               ((? eof-object?) 0)
+               (x x))))
+      (set! total (+ total n))
+      (report-progress total (const n))
+      ;; XXX: We're not in control, so we always return anyway.
+      n))
+
+  (make-custom-binary-input-port "progress-port-proc"
+                                 read! #f #f
+                                 (cut close-port port)))
+
 (define %cache-url
   (or (getenv "GUIX_BINARY_SUBSTITUTE_URL")
       "http://hydra.gnu.org"))
@@ -442,19 +509,25 @@ indefinitely."
         ;; Tell the daemon what the expected hash of the Nar itself is.
         (format #t "~a~%" (narinfo-hash narinfo))
 
+        (format (current-error-port) "downloading `~a' from `~a'...~%"
+                store-path (uri->string uri))
         (let*-values (((raw download-size)
-                       (fetch uri #:buffered? #f))
+                       ;; Note that Hydra currently generates Nars on the fly
+                       ;; and doesn't specify a Content-Length, so
+                       ;; DOWNLOAD-SIZE is #f in practice.
+                       (fetch uri #:buffered? #f #:timeout? #f))
+                      ((progress)
+                       (let* ((comp     (narinfo-compression narinfo))
+                              (dl-size  (or download-size
+                                            (and (equal? comp "none")
+                                                 (narinfo-size narinfo))))
+                              (progress (progress-proc (uri-abbreviation uri)
+                                                       dl-size
+                                                       (current-error-port))))
+                         (progress-report-port progress raw)))
                       ((input pids)
                        (decompressed-port (narinfo-compression narinfo)
-                                          raw)))
-          ;; Note that Hydra currently generates Nars on the fly and doesn't
-          ;; specify a Content-Length, so DOWNLOAD-SIZE is #f in practice.
-          (format (current-error-port)
-                  (_ "downloading `~a' from `~a'~:[~*~; (~,1f KiB)~]...~%")
-                  store-path (uri->string uri)
-                  download-size
-                  (and=> download-size (cut / <> 1024.0)))
-
+                                          progress)))
           ;; Unpack the Nar at INPUT into DESTINATION.
           (restore-file input destination)
           (every (compose zero? cdr waitpid) pids))))
@@ -464,6 +537,7 @@ indefinitely."
 
 ;;; Local Variable:
 ;;; eval: (put 'with-atomic-file-output 'scheme-indent-function 1)
+;;; eval: (put 'with-timeout 'scheme-indent-function 1)
 ;;; End:
 
 ;;; substitute-binary.scm ends here
diff --git a/guix/store.scm b/guix/store.scm
index d15ba1275f..57e1ca06aa 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -31,6 +31,7 @@
   #:use-module (srfi srfi-39)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
+  #:use-module (ice-9 vlist)
   #:export (%daemon-socket-file
 
             nix-server?
@@ -70,6 +71,7 @@
             substitutable-path-info
 
             references
+            requisites
             referrers
             valid-derivers
             query-derivation-outputs
@@ -493,6 +495,30 @@ file name.  Return #t on success."
              "Return the list of references of PATH."
              store-path-list))
 
+(define* (fold-path store proc seed path
+                    #:optional (relatives (cut references store <>)))
+  "Call PROC for each of the RELATIVES of PATH, exactly once, and return the
+result formed from the successive calls to PROC, the first of which is passed
+SEED."
+  (let loop ((paths  (list path))
+             (result seed)
+             (seen   vlist-null))
+    (match paths
+      ((path rest ...)
+       (if (vhash-assoc path seen)
+           (loop rest result seen)
+           (let ((seen   (vhash-cons path #t seen))
+                 (rest   (append rest (relatives path)))
+                 (result (proc path result)))
+             (loop rest result seen))))
+      (()
+       result))))
+
+(define (requisites store path)
+  "Return the requisites of PATH, including PATH---i.e., its closure (all its
+references, recursively)."
+  (fold-path store cons '() path))
+
 (define referrers
   (operation (query-referrers (store-path path))
              "Return the list of path that refer to PATH."
diff --git a/nix-upstream b/nix-upstream
-Subproject 3a0cc43ac89ae8f778764c9f5e27b361e498691
+Subproject 1b6ee8f4c7e74f75e1f49b43cf22be7730b3064
diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream
index 66a315a643..535763d602 100755
--- a/nix/sync-with-upstream
+++ b/nix/sync-with-upstream
@@ -1,6 +1,6 @@
 #!/bin/sh
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -61,6 +61,9 @@ do
     fi
 done
 
+# This file should be generated by our build system so remove it.
+rm -fv "$top_srcdir/nix/libstore/schema.sql.hh"
+
 cp -v "$top_srcdir/nix-upstream/COPYING" "$top_srcdir/nix"
 cp -v "$top_srcdir/nix-upstream/AUTHORS" "$top_srcdir/nix"
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6e1ba82951..839b069704 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,6 +10,7 @@ guix/scripts/package.scm
 guix/scripts/gc.scm
 guix/scripts/hash.scm
 guix/scripts/pull.scm
+guix/scripts/substitute-binary.scm
 guix/gnu-maintenance.scm
 guix/ui.scm
 guix/web.scm
diff --git a/po/eo.po b/po/eo.po
index b5421d27b3..cbe443756c 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: guix 0.2-pre5\n"
 "Report-Msgid-Bugs-To: ludo@gnu.org\n"
-"POT-Creation-Date: 2013-05-24 00:09+0200\n"
+"POT-Creation-Date: 2013-06-19 23:14+0200\n"
 "PO-Revision-Date: 2013-05-22 16:24-0300\n"
 "Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
 "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
@@ -47,7 +47,7 @@ msgstr ""
 msgid "Stream editor"
 msgstr "Flu-redaktilo"
 
-#: gnu/packages/base.scm:115
+#: gnu/packages/base.scm:117
 msgid ""
 "Sed (stream editor) isn't really a true text editor or text processor.\n"
 "Instead, it is used to filter text, i.e., it takes text input and performs\n"
@@ -63,11 +63,11 @@ msgstr ""
 "aŭ\n"
 "por anstataŭigi multoblajn aperojn de ĉeno interne de dosiero."
 
-#: gnu/packages/base.scm:138
+#: gnu/packages/base.scm:140
 msgid "Managing tar archives"
 msgstr "Administrado de arĥivoj tar"
 
-#: gnu/packages/base.scm:140
+#: gnu/packages/base.scm:142
 msgid ""
 "The Tar program provides the ability to create tar archives, as well as\n"
 "various other kinds of manipulation.  For example, you can use Tar on\n"
@@ -82,11 +82,11 @@ msgid ""
 "files (as archives)."
 msgstr ""
 
-#: gnu/packages/base.scm:171
+#: gnu/packages/base.scm:173
 msgid "Apply differences to originals, with optional backups"
 msgstr "Apliki malsamojn al originaloj, kun nedevigaj savkopioj"
 
-#: gnu/packages/base.scm:173
+#: gnu/packages/base.scm:175
 msgid ""
 "GNU Patch takes a patch file containing a difference listing produced by\n"
 "the diff program and applies those differences to one or more original "
@@ -94,11 +94,11 @@ msgid ""
 "producing patched versions."
 msgstr ""
 
-#: gnu/packages/base.scm:191
+#: gnu/packages/base.scm:193
 msgid "Comparing and merging files"
 msgstr "Komparo kaj kunmikso de dosieroj"
 
-#: gnu/packages/base.scm:193
+#: gnu/packages/base.scm:195
 msgid ""
 "GNU Diffutils is a package of several programs related to finding\n"
 "differences between files.\n"
@@ -131,11 +131,11 @@ msgid ""
 "You can use the sdiff command to merge two files interactively."
 msgstr ""
 
-#: gnu/packages/base.scm:244
+#: gnu/packages/base.scm:246
 msgid "Operating on files matching given criteria"
 msgstr "Operacio sur dosieroj kongruantaj al indikia kriterio"
 
-#: gnu/packages/base.scm:246
+#: gnu/packages/base.scm:248
 msgid ""
 "The GNU Find Utilities are the basic directory searching utilities of\n"
 "the GNU operating system.  These programs are typically used in conjunction\n"
@@ -151,22 +151,22 @@ msgid ""
 "  * xargs - build and execute command lines from standard input.\n"
 msgstr ""
 
-#: gnu/packages/base.scm:291
+#: gnu/packages/base.scm:299
 msgid "Core GNU utilities (file, text, shell)"
 msgstr "Nukleaj utilaĵoj GNU (file, text, shell)"
 
-#: gnu/packages/base.scm:293
+#: gnu/packages/base.scm:301
 msgid ""
 "The GNU Core Utilities are the basic file, shell and text manipulation\n"
 "utilities of the GNU operating system.  These are the core utilities which\n"
 "are expected to exist on every operating system."
 msgstr ""
 
-#: gnu/packages/base.scm:325
+#: gnu/packages/base.scm:333
 msgid "Remake files automatically"
 msgstr "Reprocezi dosierojn aŭtomate"
 
-#: gnu/packages/base.scm:327
+#: gnu/packages/base.scm:335
 msgid ""
 "Make is a tool which controls the generation of executables and other\n"
 "non-source files of a program from the program's source files.\n"
@@ -179,22 +179,22 @@ msgid ""
 "that it is possible to use Make to build and install the program."
 msgstr ""
 
-#: gnu/packages/base.scm:371
+#: gnu/packages/base.scm:379
 msgid "Binary utilities: bfd gas gprof ld"
 msgstr "Duumaj utilaĵoj: bfd gas gprof ld"
 
-#: gnu/packages/base.scm:373
+#: gnu/packages/base.scm:381
 msgid ""
 "The GNU Binutils are a collection of binary tools.  The main ones are\n"
 "`ld' (the GNU linker) and `as' (the GNU assembler).  They also include the\n"
 "BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc."
 msgstr ""
 
-#: gnu/packages/base.scm:492
+#: gnu/packages/base.scm:500
 msgid "The GNU C Library"
 msgstr "La Biblioteko GNU C"
 
-#: gnu/packages/base.scm:494
+#: gnu/packages/base.scm:502
 msgid ""
 "Any Unix-like operating system needs a C library: the library which\n"
 "defines the \"system calls\" and other basic facilities such as open, "
@@ -206,11 +206,11 @@ msgid ""
 "with the Linux kernel."
 msgstr ""
 
-#: gnu/packages/base.scm:563
+#: gnu/packages/base.scm:571
 msgid "Database of current and historical time zones"
 msgstr ""
 
-#: gnu/packages/base.scm:564
+#: gnu/packages/base.scm:572
 msgid ""
 "The Time Zone Database (often called tz or zoneinfo)\n"
 "contains code and data that represent the history of local time for many\n"
@@ -220,11 +220,11 @@ msgid ""
 "and daylight-saving rules."
 msgstr ""
 
-#: gnu/packages/base.scm:978
+#: gnu/packages/base.scm:986
 msgid "The linker wrapper"
 msgstr "La ligila ĉirkaŭanto"
 
-#: gnu/packages/base.scm:980
+#: gnu/packages/base.scm:988
 msgid ""
 "The linker wrapper (or `ld-wrapper') wraps the linker to add any\n"
 "missing `-rpath' flags, and to detect any misuse of libraries outside of "
@@ -232,18 +232,18 @@ msgid ""
 "store."
 msgstr ""
 
-#: gnu/packages/guile.scm:96 gnu/packages/guile.scm:153
+#: gnu/packages/guile.scm:97 gnu/packages/guile.scm:177
 msgid "Scheme implementation intended especially for extensions"
 msgstr "Realigo de Scheme celata speciale por aldonoj"
 
-#: gnu/packages/guile.scm:98
+#: gnu/packages/guile.scm:99
 msgid ""
 "GNU Guile 1.8 is an interpreter for the Scheme programming language,\n"
 "packaged as a library that can be embedded into programs to make them\n"
 "extensible.  It supports many SRFIs."
 msgstr ""
 
-#: gnu/packages/guile.scm:155
+#: gnu/packages/guile.scm:179
 msgid ""
 "GNU Guile is an implementation of the Scheme programming language, with\n"
 "support for many SRFIs, packaged for use in a wide variety of environments.\n"
@@ -253,14 +253,14 @@ msgid ""
 "call interface, and powerful string processing."
 msgstr ""
 
-#: gnu/packages/guile.scm:199
+#: gnu/packages/guile.scm:223
 #, fuzzy
 msgid "Framework for building readers for GNU Guile"
 msgstr ""
 "Guile-Reader, simpla framo por konstrui legilojn por\n"
 "GNU Guile"
 
-#: gnu/packages/guile.scm:201
+#: gnu/packages/guile.scm:225
 msgid ""
 "Guile-Reader is a simple framework for building readers for GNU Guile.\n"
 "\n"
@@ -276,11 +276,11 @@ msgid ""
 "many readers as needed)."
 msgstr ""
 
-#: gnu/packages/guile.scm:253
+#: gnu/packages/guile.scm:277
 msgid "Guile bindings to ncurses"
 msgstr "Bindoj de Guile por ncurses"
 
-#: gnu/packages/guile.scm:255
+#: gnu/packages/guile.scm:279
 msgid ""
 "GNU Guile-Ncurses is a library for the Guile Scheme interpreter that\n"
 "provides functions for creating text user interfaces.  The text user "
@@ -289,11 +289,11 @@ msgid ""
 "menu."
 msgstr ""
 
-#: gnu/packages/guile.scm:279
+#: gnu/packages/guile.scm:303
 msgid "Run jobs at scheduled times"
 msgstr "Lanĉi taskoj je antaŭplanitaj horoj"
 
-#: gnu/packages/guile.scm:281
+#: gnu/packages/guile.scm:305
 msgid ""
 "The GNU package mcron (Mellor's cron) is a 100% compatible replacement\n"
 "for Vixie cron.  It is written in pure Guile, and allows configuration "
@@ -342,87 +342,99 @@ msgid ""
 "records, each record containing an arbitrary number of named fields."
 msgstr ""
 
-#: guix/scripts/build.scm:49
+#: guix/scripts/build.scm:51
 #, scheme-format
 msgid "package `~a' has no source~%"
 msgstr "pako '~a' havas neniun fonton~%"
 
-#: guix/scripts/build.scm:66
+#: guix/scripts/build.scm:68
 msgid ""
 "Usage: guix build [OPTION]... PACKAGE-OR-DERIVATION...\n"
 "Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"
 msgstr ""
 
-#: guix/scripts/build.scm:68
+#: guix/scripts/build.scm:70
 msgid ""
 "\n"
 "  -e, --expression=EXPR  build the package EXPR evaluates to"
 msgstr ""
 
-#: guix/scripts/build.scm:70
+#: guix/scripts/build.scm:72
 msgid ""
 "\n"
 "  -S, --source           build the packages' source derivations"
 msgstr ""
 
-#: guix/scripts/build.scm:72
+#: guix/scripts/build.scm:74
 msgid ""
 "\n"
 "  -s, --system=SYSTEM    attempt to build for SYSTEM--e.g., \"i686-linux\""
 msgstr ""
 
-#: guix/scripts/build.scm:74
+#: guix/scripts/build.scm:76
+msgid ""
+"\n"
+"      --target=TRIPLET   cross-build for TRIPLET--e.g., \"armel-linux-gnu\""
+msgstr ""
+
+#: guix/scripts/build.scm:78
 msgid ""
 "\n"
 "  -d, --derivations      return the derivation paths of the given packages"
 msgstr ""
 
-#: guix/scripts/build.scm:76
+#: guix/scripts/build.scm:80
 msgid ""
 "\n"
 "  -K, --keep-failed      keep build tree of failed builds"
 msgstr ""
 
-#: guix/scripts/build.scm:78
+#: guix/scripts/build.scm:82
 msgid ""
 "\n"
 "  -n, --dry-run          do not build the derivations"
 msgstr ""
 
-#: guix/scripts/build.scm:80 guix/scripts/package.scm:440
+#: guix/scripts/build.scm:84 guix/scripts/package.scm:440
+msgid ""
+"\n"
+"      --fallback         fall back to building when the substituter fails"
+msgstr ""
+
+#: guix/scripts/build.scm:86 guix/scripts/package.scm:442
 msgid ""
 "\n"
 "      --no-substitutes   build instead of resorting to pre-built substitutes"
 msgstr ""
 
-#: guix/scripts/build.scm:82 guix/scripts/package.scm:442
+#: guix/scripts/build.scm:88 guix/scripts/package.scm:444
 msgid ""
 "\n"
 "      --max-silent-time=SECONDS\n"
 "                         mark the build as failed after SECONDS of silence"
 msgstr ""
 
-#: guix/scripts/build.scm:85
+#: guix/scripts/build.scm:91
 msgid ""
 "\n"
 "  -c, --cores=N          allow the use of up to N CPU cores for the build"
 msgstr ""
 
-#: guix/scripts/build.scm:87
+#: guix/scripts/build.scm:93
 msgid ""
 "\n"
 "  -r, --root=FILE        make FILE a symlink to the result, and register it\n"
 "                         as a garbage collector root"
 msgstr ""
 
-#: guix/scripts/build.scm:90
+#: guix/scripts/build.scm:96
 msgid ""
 "\n"
 "      --verbosity=LEVEL  use the given verbosity LEVEL"
 msgstr ""
 
-#: guix/scripts/build.scm:93 guix/scripts/download.scm:52
-#: guix/scripts/package.scm:459 guix/scripts/gc.scm:56
+#: guix/scripts/build.scm:99 guix/scripts/download.scm:52
+#: guix/scripts/package.scm:461 guix/scripts/gc.scm:58
 #: guix/scripts/hash.scm:50 guix/scripts/pull.scm:149
 #, fuzzy
 msgid ""
@@ -430,8 +442,8 @@ msgid ""
 "  -h, --help             display this help and exit"
 msgstr "      --help     montri ĉi tiun helpon kaj eliri\n"
 
-#: guix/scripts/build.scm:95 guix/scripts/download.scm:54
-#: guix/scripts/package.scm:461 guix/scripts/gc.scm:58
+#: guix/scripts/build.scm:101 guix/scripts/download.scm:54
+#: guix/scripts/package.scm:463 guix/scripts/gc.scm:60
 #: guix/scripts/hash.scm:52 guix/scripts/pull.scm:151
 #, fuzzy
 msgid ""
@@ -439,39 +451,39 @@ msgid ""
 "  -V, --version          display version information and exit"
 msgstr "elmontri eldonan informon kaj eliri\n"
 
-#: guix/scripts/build.scm:131
+#: guix/scripts/build.scm:141
 #, scheme-format
 msgid "~a: not a number~%"
 msgstr "~a: ne estas numero~%"
 
-#: guix/scripts/build.scm:162 guix/scripts/download.scm:95
-#: guix/scripts/package.scm:539 guix/scripts/gc.scm:146
+#: guix/scripts/build.scm:176 guix/scripts/download.scm:95
+#: guix/scripts/package.scm:545 guix/scripts/gc.scm:152
 #: guix/scripts/pull.scm:178
 #, scheme-format
 msgid "~A: unrecognized option~%"
 msgstr "~A: nerekonata modifilo~%"
 
-#: guix/scripts/build.scm:188
+#: guix/scripts/build.scm:202
 #, scheme-format
 msgid "failed to create GC root `~a': ~a~%"
 msgstr "fiasko dum kreo de radiko GC '~a': ~a~%"
 
-#: guix/scripts/build.scm:212 guix/scripts/package.scm:585
+#: guix/scripts/build.scm:226 guix/scripts/package.scm:591
 #, scheme-format
 msgid "ambiguous package specification `~a'~%"
 msgstr "plursenca pak-specifigo '~a'~%"
 
-#: guix/scripts/build.scm:213 guix/scripts/package.scm:587
+#: guix/scripts/build.scm:227 guix/scripts/package.scm:593
 #, scheme-format
 msgid "choosing ~a from ~a~%"
 msgstr "ni elektas ~a el ~a~%"
 
-#: guix/scripts/build.scm:219
+#: guix/scripts/build.scm:233
 #, scheme-format
 msgid "~A: package not found for version ~a~%"
 msgstr "~A: pako ne trovita por versio ~a~%"
 
-#: guix/scripts/build.scm:221
+#: guix/scripts/build.scm:235
 #, scheme-format
 msgid "~A: unknown package~%"
 msgstr "~A: nekonata pako~%"
@@ -598,104 +610,109 @@ msgid ""
 "  -n, --dry-run          show what would be done without actually doing it"
 msgstr ""
 
-#: guix/scripts/package.scm:445
+#: guix/scripts/package.scm:447
 msgid ""
 "\n"
 "      --bootstrap        use the bootstrap Guile to build the profile"
 msgstr ""
 
-#: guix/scripts/package.scm:447 guix/scripts/pull.scm:144
+#: guix/scripts/package.scm:449 guix/scripts/pull.scm:144
 #, fuzzy
 msgid ""
 "\n"
 "      --verbose          produce verbose output"
 msgstr "produkti detalplenan eligon"
 
-#: guix/scripts/package.scm:450
+#: guix/scripts/package.scm:452
 msgid ""
 "\n"
 "  -s, --search=REGEXP    search in synopsis and description using REGEXP"
 msgstr ""
 
-#: guix/scripts/package.scm:452
+#: guix/scripts/package.scm:454
 msgid ""
 "\n"
 "  -I, --list-installed[=REGEXP]\n"
 "                         list installed packages matching REGEXP"
 msgstr ""
 
-#: guix/scripts/package.scm:455
+#: guix/scripts/package.scm:457
 msgid ""
 "\n"
 "  -A, --list-available[=REGEXP]\n"
 "                         list available packages matching REGEXP"
 msgstr ""
 
-#: guix/scripts/package.scm:541
+#: guix/scripts/package.scm:547
 #, scheme-format
 msgid "~A: extraneous argument~%"
 msgstr "~A: fremda argumento~%"
 
-#: guix/scripts/package.scm:569
+#: guix/scripts/package.scm:575
 #, scheme-format
 msgid "package `~a' lacks output `~a'~%"
 msgstr "pako '~a' malhavas eligon '~a'~%"
 
-#: guix/scripts/package.scm:593
+#: guix/scripts/package.scm:599
 #, scheme-format
 msgid "~a: package not found~%"
 msgstr "~a: pako ne trovita~%"
 
-#: guix/scripts/package.scm:616
+#: guix/scripts/package.scm:622
 #, scheme-format
 msgid "Try \"info '(guix) Invoking guix package'\" for more information.~%"
 msgstr ""
 
-#: guix/scripts/package.scm:638
+#: guix/scripts/package.scm:644
 #, scheme-format
 msgid "error: while creating directory `~a': ~a~%"
 msgstr "eraro: dum kreo de dosierujo '~a': ~a~%"
 
-#: guix/scripts/package.scm:642
+#: guix/scripts/package.scm:648
 #, scheme-format
 msgid "Please create the `~a' directory, with you as the owner.~%"
 msgstr "Bonvolu krei la dosierujon '~a', kun vi kiel posedanto.~%"
 
-#: guix/scripts/package.scm:649
+#: guix/scripts/package.scm:655
 #, scheme-format
 msgid "error: directory `~a' is not owned by you~%"
 msgstr ""
 
-#: guix/scripts/package.scm:652
+#: guix/scripts/package.scm:658
 #, scheme-format
 msgid "Please change the owner of `~a' to user ~s.~%"
 msgstr ""
 
-#: guix/scripts/package.scm:704
+#: guix/scripts/package.scm:710
 #, scheme-format
 msgid "The following package would be removed:~% ~{~a~%~}~%"
 msgstr "La jena pako devos esti forigata:~% ~{~a~%~}~%"
 
-#: guix/scripts/package.scm:709
+#: guix/scripts/package.scm:715
 #, scheme-format
 msgid "The following package will be removed:~% ~{~a~%~}~%"
 msgstr "La jena pako estos forigata:~% ~{~a~%~}~%"
 
-#: guix/scripts/package.scm:721
+#: guix/scripts/package.scm:727
 #, scheme-format
 msgid "The following package would be installed:~%~{~a~%~}~%"
 msgstr "La jena pako estus instalata:~% ~{~a~%~}~%"
 
-#: guix/scripts/package.scm:726
+#: guix/scripts/package.scm:732
 #, scheme-format
 msgid "The following package will be installed:~%~{~a~%~}~%"
 msgstr "La jena pako estos instalata:~% ~{~a~%~}~%"
 
-#: guix/scripts/package.scm:835
+#: guix/scripts/package.scm:841
 #, scheme-format
 msgid "nothing to be done~%"
 msgstr "nenio por fari~%"
 
+#: guix/scripts/package.scm:852
+#, fuzzy, scheme-format
+msgid "~a packages in profile~%"
+msgstr "~a: pako ne trovita~%"
+
 #: guix/scripts/gc.scm:39
 msgid ""
 "Usage: guix gc [OPTION]... PATHS...\n"
@@ -736,20 +753,26 @@ msgstr ""
 #: guix/scripts/gc.scm:53
 msgid ""
 "\n"
+"  -R, --requisites       list the requisites of PATHS"
+msgstr ""
+
+#: guix/scripts/gc.scm:55
+msgid ""
+"\n"
 "      --referrers        list the referrers of PATHS"
 msgstr ""
 
-#: guix/scripts/gc.scm:90
+#: guix/scripts/gc.scm:92
 #, scheme-format
 msgid "unknown unit: ~a~%"
 msgstr "nekonata unuo: ~a~%"
 
-#: guix/scripts/gc.scm:91
+#: guix/scripts/gc.scm:93
 #, scheme-format
 msgid "invalid number: ~a~%"
 msgstr "nevalida numero: ~a~%"
 
-#: guix/scripts/gc.scm:112
+#: guix/scripts/gc.scm:114
 #, scheme-format
 msgid "invalid amount of storage: ~a~%"
 msgstr "nevalida kvanto da konserv-spaco: ~a~%"
@@ -813,32 +836,52 @@ msgstr "fiasko dum ĝisdatigo de Guix, kontrolu la konstru-protokolon~%"
 msgid "Guix already up to date\n"
 msgstr "Guix jam estas ĝisdata\n"
 
-#: guix/gnu-maintenance.scm:357
+#: guix/scripts/substitute-binary.scm:172
+#, scheme-format
+msgid "while fetching ~a: server is unresponsive~%"
+msgstr ""
+
+#: guix/scripts/substitute-binary.scm:174
+#, scheme-format
+msgid "try `--no-substitutes' if the problem persists~%"
+msgstr ""
+
+#: guix/scripts/substitute-binary.scm:423
+#, scheme-format
+msgid "host name lookup error: ~a~%"
+msgstr ""
+
+#: guix/scripts/substitute-binary.scm:498
+#, scheme-format
+msgid "downloading `~a' from `~a'~:[~*~; (~,1f KiB)~]...~%"
+msgstr ""
+
+#: guix/gnu-maintenance.scm:360
 #, scheme-format
 msgid "signature verification failed for `~a'~%"
 msgstr "subskriba kontrolo fiaskis por '~a'~%"
 
-#: guix/gnu-maintenance.scm:359
+#: guix/gnu-maintenance.scm:362
 #, scheme-format
 msgid "(could be because the public key is not in your keyring)~%"
 msgstr "(eble ĉar la publika ŝlosilo ne estas en via ŝlosilringo)~%"
 
-#: guix/gnu-maintenance.scm:431
+#: guix/gnu-maintenance.scm:437
 #, scheme-format
 msgid "~a: could not locate source file"
 msgstr "~a: ne eblis trovi fontan dosieron "
 
-#: guix/gnu-maintenance.scm:436
+#: guix/gnu-maintenance.scm:442
 #, scheme-format
 msgid "~a: ~a: no `version' field in source; skipping~%"
 msgstr "~a: ~a: neniu kampo 'version' en la fonto; ni saltas~%"
 
-#: guix/ui.scm:113
+#: guix/ui.scm:116
 #, scheme-format
 msgid "failed to install locale: ~a~%"
 msgstr "fiasko dum instalo de lokaĵaro: ~a~%"
 
-#: guix/ui.scm:130
+#: guix/ui.scm:133
 #, scheme-format
 msgid ""
 "\n"
@@ -847,7 +890,7 @@ msgstr ""
 "\n"
 "Raportu program-misojn al: ~a."
 
-#: guix/ui.scm:132
+#: guix/ui.scm:135
 #, scheme-format
 msgid ""
 "\n"
@@ -856,7 +899,7 @@ msgstr ""
 "\n"
 "hejm-paĝo de ~a: <~a>"
 
-#: guix/ui.scm:134
+#: guix/ui.scm:137
 msgid ""
 "\n"
 "General help using GNU software: <http://www.gnu.org/gethelp/>"
@@ -864,121 +907,126 @@ msgstr ""
 "\n"
 "Ĝenerala helpo por uzi programaron de GNU: <http://www.gnu.org/gethelp/>"
 
-#: guix/ui.scm:141
+#: guix/ui.scm:144
 #, fuzzy, scheme-format
 msgid "~a: invalid number~%"
 msgstr "nevalida numero: ~a~%"
 
-#: guix/ui.scm:152
+#: guix/ui.scm:155
 #, scheme-format
 msgid "~a:~a:~a: package `~a' has an invalid input: ~s~%"
 msgstr "~a:~a:~a: pako '~a' havas malvalidan enigon: ~s~%"
 
-#: guix/ui.scm:156
+#: guix/ui.scm:162
+#, scheme-format
+msgid "~a: ~a: build system `~a' does not support cross builds~%"
+msgstr ""
+
+#: guix/ui.scm:167
 #, scheme-format
 msgid "failed to connect to `~a': ~a~%"
 msgstr "fiasko dum konekto al '~a': ~a~%"
 
-#: guix/ui.scm:161
+#: guix/ui.scm:172
 #, scheme-format
 msgid "build failed: ~a~%"
 msgstr "konstruo fiakis: ~a~%"
 
-#: guix/ui.scm:172
+#: guix/ui.scm:183
 #, scheme-format
 msgid "failed to read expression ~s: ~s~%"
 msgstr "fiasko dum lego de esprimo ~s: ~s~%"
 
-#: guix/ui.scm:178
+#: guix/ui.scm:189
 #, scheme-format
 msgid "failed to evaluate expression `~a': ~s~%"
 msgstr "fiasko dum analizo de esprimo '~a': ~a~%"
 
-#: guix/ui.scm:182
+#: guix/ui.scm:193
 #, scheme-format
 msgid "expression `~s' does not evaluate to a package~%"
 msgstr "la esprimo '~s' ne rezultas pakon~%"
 
-#: guix/ui.scm:224
+#: guix/ui.scm:235
 #, scheme-format
 msgid "~:[The following derivation would be built:~%~{   ~a~%~}~;~]"
 msgstr "~:[La jena derivo povus esti konstruata:~%~{   ~a~%~}~;~]"
 
-#: guix/ui.scm:229
+#: guix/ui.scm:240
 #, scheme-format
 msgid "~:[The following file would be downloaded:~%~{   ~a~%~}~;~]"
 msgstr "~:[La jena derivo povus esti elŝutata:~%~{   ~a~%~}~;~]"
 
-#: guix/ui.scm:235
+#: guix/ui.scm:246
 #, scheme-format
 msgid "~:[The following derivation will be built:~%~{   ~a~%~}~;~]"
 msgstr "~:[La jena derivo estos esti konstruata:~%~{   ~a~%~}~;~]"
 
-#: guix/ui.scm:240
+#: guix/ui.scm:251
 #, scheme-format
 msgid "~:[The following file will be downloaded:~%~{   ~a~%~}~;~]"
 msgstr "~:[La jena derivo estos esti elŝutata:~%~{   ~a~%~}~;~]"
 
-#: guix/ui.scm:257
+#: guix/ui.scm:268
 msgid "<unknown location>"
 msgstr "<nekonata loko>"
 
-#: guix/ui.scm:285
+#: guix/ui.scm:296
 #, scheme-format
 msgid "failed to create configuration directory `~a': ~a~%"
 msgstr "fiasko dum kreo de agorda dosierujo '~a': ~a~%"
 
-#: guix/ui.scm:361 guix/ui.scm:371
+#: guix/ui.scm:372 guix/ui.scm:382
 msgid "unknown"
 msgstr "nekonata"
 
-#: guix/ui.scm:391
+#: guix/ui.scm:402
 #, scheme-format
 msgid "invalid argument: ~a~%"
 msgstr "malvalida argumento: ~a~%"
 
-#: guix/ui.scm:396
+#: guix/ui.scm:407
 #, scheme-format
 msgid "Try `guix --help' for more information.~%"
 msgstr ""
 
-#: guix/ui.scm:423
+#: guix/ui.scm:434
 #, fuzzy
 msgid ""
 "Usage: guix COMMAND ARGS...\n"
 "Run COMMAND with ARGS.\n"
 msgstr "Uzmaniero: guix KOMANDO ARGj...~%"
 
-#: guix/ui.scm:426
+#: guix/ui.scm:437
 msgid "COMMAND must be one of the sub-commands listed below:\n"
 msgstr ""
 
-#: guix/ui.scm:445
+#: guix/ui.scm:456
 #, fuzzy, scheme-format
 msgid "guix: ~a: command not found~%"
 msgstr "~a: pako ne trovita~%"
 
-#: guix/ui.scm:463
+#: guix/ui.scm:474
 #, scheme-format
 msgid "guix: missing command name~%"
 msgstr ""
 
-#: guix/ui.scm:471
+#: guix/ui.scm:482
 #, fuzzy, scheme-format
 msgid "guix: unrecognized option '~a'~%"
 msgstr "nerekonata modifilo: ~a~%"
 
-#: guix/web.scm:181
+#: guix/web.scm:180
 #, scheme-format
 msgid "using Guile ~a, which does not support ~s encoding~%"
 msgstr "ni uzas Guile ~a, kiu ne subtenas enkodigon ~s~%"
 
-#: guix/web.scm:184
+#: guix/web.scm:183
 #, scheme-format
 msgid "download failed; use a newer Guile~%"
 msgstr "elŝuto fiaskis; uzu pli novan Guile~%"
 
-#: guix/web.scm:196
+#: guix/web.scm:195
 #, scheme-format
 msgid "following redirection to `~a'...~%"
 msgstr ""
diff --git a/tests/store.scm b/tests/store.scm
index c0126ce335..b42bc97017 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -106,6 +106,24 @@
          (null? (references %store t1))
          (null? (referrers %store t2)))))
 
+(test-assert "requisites"
+  (let* ((t1 (add-text-to-store %store "random1"
+                                (random-text) '()))
+         (t2 (add-text-to-store %store "random2"
+                                (random-text) (list t1)))
+         (t3 (add-text-to-store %store "random3"
+                                (random-text) (list t2)))
+         (t4 (add-text-to-store %store "random4"
+                                (random-text) (list t1 t3))))
+    (define (same? x y)
+      (and (= (length x) (length y))
+           (lset= equal? x y)))
+
+    (and (same? (requisites %store t1) (list t1))
+         (same? (requisites %store t2) (list t1 t2))
+         (same? (requisites %store t3) (list t1 t2 t3))
+         (same? (requisites %store t4) (list t1 t2 t3 t4)))))
+
 (test-assert "derivers"
   (let* ((b (add-text-to-store %store "build" "echo $foo > $out" '()))
          (s (add-to-store %store "bash" #t "sha256"