* gnu/packages.scm (fold2): Remove.
* guix/utils.scm (fold2): New procedure. Generalization of the above to
one and two lists.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists"): New tests.
* guix/store.scm: Remove unneeded (ice-9 rdelim) import. In Guile 2.0.9
that module exports `read-string', which conflicts with that of (guix
serialization).
* guix/scripts/package.scm (roll-back): Use `format', not `leave' when
indicating "already at the empty profile". Fixes a regression
introduced in a2011be5df. Reported by
Nikita Karetnikov <nikita@karetnikov.org>.
This allows build outputs to be transparently downloaded from
http://hydra.gnu.org, for example.
* config-daemon.ac: Check for `gzip', `bzip2', and `xz'.
* guix/config.scm.in (%gzip, %bzip2, %xz): New variable.
* guix/scripts/substitute-binary.scm (fetch): Return SIZE as a second value.
(<narinfo>): Change `url' to `uri'.
(make-narinfo): Rename to...
(narinfo-maker): ... this. Handle relative URLs.
(fetch-narinfo): Adjust accordingly.
(filtered-port, decompressed-port): New procedures.
(guix-substitute-binary): Implement the `--substitute' case.
* tests/store.scm ("substitute query"): Use (%store-prefix) instead
of (getenv "NIX_STORE_DIR").
("substitute"): New test.
* guix/nar.scm (write-file): Add case for type `symlink'.
(restore-file): Likewise.
* tests/nar.scm (random-file-size, make-file-tree, delete-file-tree,
with-file-tree, file-tree-equal?, make-random-bytevector,
populate-file): New procedures.
(%test-dir): New variable.
("write-file + restore-file"): Use `%test-dir' and `file-tree-equal?'.
("write-file + restore-file with symlinks"): New test.
* guix/ui.scm (program-name, guix-warning-port): New variables.
(warning): New macro.
(guix-main): Parametrize PROGRAM-NAME.
* guix/scripts/build.scm, guix/scripts/download.scm,
guix/scripts/gc.scm, guix/scripts/package.scm: Adjust to use `leave'
and `warning' consistently.
* guix/nar.scm (&nar-error, &nar-read-error): New condition types.
(dump): New procedure.
(write-contents)[dump]: Remove. Use the one above instead.
(read-contents, write-file, restore-file): New procedures.
(%archive-version-1): New variable.
This commit enables the bz2, dbm, readline, ssl and zlib modules.
* gnu/packages/gdbm.scm: Enable the compatibility mode.
* gnu/packages/python.scm: Enable a few modules from the standard library.
* gnu/packages/patches/python-fix-dbm.patch: New file.
* Makefile.am: Add it.
* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--query"]:
Emit blank lines only after the complete list of store paths has been
returned.
* guix/scripts/substitute-binary.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/scripts/substitute-binary.in: New file.
* config-daemon.ac: Produce nix/scripts/substitute-binary.
* daemon.am (nodist_pkglibexec_SCRIPTS): Add
nix/scripts/substitute-binary.
* guix/store.scm (substitutable-path-info): Use the
`query-substitutable-path-infos' RPC.
* nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'.
* pre-inst-env.in: Set `NIX_SUBSTITUTERS'.
* test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set
`GUIX_BINARY_SUBSTITUTE_URL, and create
$NIX_STATE_DIR/substituter-data.
Run `guix-daemon' within `./pre-inst-env'.
* tests/store.scm ("substitute query"): New test.
* guix/gnu-maintenance.scm (http-fetch): Try #:streaming? #t, or
'http-get*', or 'http-get' as a last resort. Check whether DATA is
#f, a string, or an input port.
* guix/gnu-maintenance.scm (http-fetch): Return an input port.
(<gnu-package-descriptor>): Add it.
(official-gnu-packages): Use <gnu-package-descriptor>.
(find-packages): Add it.
(gnu-package?): Adjust accordingly.
* guix/store.scm (write-contents)[call-with-binary-input-file]: New
procedure.
Use `sendfile' instead of `dump' when available. Add `size'
parameter.
(write-file): Update caller.
* release.nix (unchrootedNixpkgs): New function.
(jobs)[tarball, build, build_disable_daemon, distro): Use it.
Should fix <http://hydra.gnu.org:3000/build/7279>.
This reduces the execution time of
"guix build -e '(@ (gnu packages emacs) emacs)' -d" by 6%, from
1.15s to 1.08s.
* guix/derivations.scm (build-expression->derivation): Write the builder
as UTF-8.