* guix/packages.scm (package-mapping): New procedure.
(package-input-rewriting): Rewrite in terms of 'package-mapping'.
* tests/packages.scm ("package-mapping"): New test.
* doc/guix.texi (Defining Packages): Document it.
Fixes a regression introduced in
3b88f3767d.
* tests/search-paths.scm ("evaluate-search-paths, separator is #f"):
Change the expected result to "aarch64-linux".
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.
* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
This avoids connections to substitute servers for derivations that are
not substitutable anyway, such as profiles.
Reported by Andy Wingo.
* guix/derivations.scm (substitution-oracle): Skip derivations that do
not pass 'substitutable-derivation?'.
* tests/derivations.scm ("substitution-oracle and #:substitute? #f"):
New test.
* guix/ui.scm (package-field-string): New procedure.
(package-description-string): Use it.
(package-synopsis-string): New procedure.
(package->recutils): Use it.
* guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]:
New procedure. Use it in checks.
* tests/lint.scm: Test it.
* gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the
Texinfo markup.
Fixes a mistake in a9a0227c01.
* tests/store.scm ("current-build-output-port, UTF-8 + garbage"):
Inverse the 'cond-expand' clauses since the 'guile-2.0' feature doesn't
exist.
Fixes a regression introduced in
7208995426 whereby (gnu system
file-systems) would pull in (gnu packages …) module, which in turn
breaks when importing things like (gnu build shepherd).
* gnu/system/file-systems.scm (file-system-type-predicate): Export.
(file-system-packages): Move to...
* gnu/system/linux-initrd.scm (file-system-packages): ... here. Add
docstring.
* gnu/services/base.scm: Use it.
* tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
* guix/scripts/pack.scm (<compressor>)[package]: Remove.
[command]: Document as being a gexp with an absolute file name.
(%compressors): Adjust accordingly.
(self-contained-tarball): Simplify PATH expression. Move 'string-join'
for the compressor command on the build side.
(docker-image): Simplify PATH expression.
* tests/pack.scm (%gzip-compressor): Adjust accordingly.
* guix/gexp.scm (imported-files)[file-pair]: Add case for pairs where
the cdr is not a string.
(imported-modules): Support '=>' syntax in MODULES.
* tests/gexp.scm ("imported-files with file-like objects")
("gexp->derivation & with-imported-module & computed module"): New tests.
* doc/guix.texi (G-Expressions): Document '=>' syntax for
'with-imported-modules'.
In 2.2, 'fport_close' no longer swallows EBADF and instead raises a
'system-error' for this. This commit adjusts for 2.2.
* guix/zlib.scm (close-procedure): Remove.
(make-gzip-input-port): Use 'port->fdes' instead of 'fileno'.
Use 'gzclose' instead of 'close-procedure'.
(make-gzip-output-port): Likewise.
* tests/zlib.scm ("compression/decompression pipe"): Don't check whether
PARENT is closed using 'port-closed?'. Instead, use 'seek' on the
underlying FD and check for EBADF.
* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option.
[build](tar-supports-sort?): New variable. Use it.
* tests/pack.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's
encoding; remove use of 'with-fluids'. This is for compatibility with
Guile 2.2 where the encoding of string ports is not influenced by
%DEFAULT-PORT-ENCODING.
* tests/ui.scm ("show-manifest-transaction"): Likewise.
Slightly different buffering of custom binary output ports in Guile 2.1.7
would lead tests missing 'close-port' or 'force-output' to fail.
* tests/hash.scm ("open-sha256-port, hello"): Add call to 'force-output'
before call to 'get'.
* tests/nar.scm ("write-file puts file in C locale collation order"):
Call 'close-port' before calling 'get-hash'.
This is a followup to commit 81e0bc1834.
* tests/cpan.scm ("cpan->guix-package"): Add a 'rest' argument to the
lambda that mocks 'http-fetch'.
* tests/crate.scm ("crate->guix-package"): Likewise.
* tests/gem.scm ("gem->guix-package"): Likewise.
* tests/pypi.scm ("pypi->guix-package"): Likewise.
("pypi->guix-package, wheels"): Likewise.
Partly fixes <http://bugs.gnu.org/25476>.
Reported by Paul Garlick <pgarlick@tourbillion-technology.com>.
* tests/syscalls.scm ("utmpx-entries"): Check whether ENTRY is of type
'BOOT_TIME', in which case PID may be 0.
Fixes <https://bugs.gnu.org/25635>.
Reported by Sergei Trofimovich <slyfox@inbox.ru>.
* guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New
procedure.
Rewrite body to match lists in addition to strings.
* tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test.
* gnu/build/linux-container.scm (container-excursion*): New procedure.
* tests/containers.scm ("container-excursion*")
("container-excursion*, same namespaces"): New tests.
(gnu system file-systems) is used on the "build" side since commit
5970e8e248.
* gnu/system/file-systems.scm: Remove dependency on (guix store).
(%store-prefix): New procedure.
* tests/file-systems.scm ("does not pull (guix config)"): New test.
* guix/serialization.scm (write-bytevector): New procedure.
(write-string): Rewrite in terms of 'write-bytevector'.
* guix/store.scm (write-arg): Add 'bytevector' case.
(add-data-to-store): New procedure, from former 'add-text-to-store'.
(add-text-to-store): Rewrite in terms of 'add-data-to-store'.
* tests/store.scm ("add-data-to-store"): New test.
This is a followup to 2f977d92d3.
* tests/pypi.scm ("pypi->guix-package"): Don't expect 'python-setuptools' in
'propagated-inputs'.
("pypi->guix-package, wheels"): Likewise.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <http://bugs.gnu.org/24886>.
Previously, the grafting derivation of, say, brdf-explorer would pull in
qt:doc even though brdf-explorer depends only on qt:out, not qt:doc.
* guix/grafts.scm (with-cache): Use 'vhash-assoc' and 'vhash-cons'
instead of 'vhash-assq' and 'vhash-consq'.
(cumulative-grafts): Pass #:outputs to 'graft-derivation/shallow'. Use
OUTPUTS instead of (derivation-output-names drv).
(graft-derivation): Add #:outputs parameter; pass it to
'cumulative-grafts'.
* tests/grafts.scm (make-derivation-input): New variable.
("graft-derivation, replaced derivation has multiple outputs"): Make
sure P2:zzz is not part of the outputs of P3D.
("graft-derivation with #:outputs")
("graft-derivation, unused outputs not depended on"): New tests.
This adds support for single-entry search paths.
Fixes <http://bugs.gnu.org/25422>.
Reported by Leo Famulari <leo@famulari.name>.
* guix/search-paths.scm (<search-path-specification>)[separator]:
Document as string or #f.
(evaluate-search-paths): Add case for SEPARATOR as #f.
(environment-variable-definition): Handle SEPARATOR being #f.
* guix/build/utils.scm (list->search-path-as-string): Add case for
SEPARATOR as #f.
(search-path-as-string->list): Likewise.
* guix/build/profiles.scm (abstract-profile): Likewise.
* tests/search-paths.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* tests/packages.scm ("--search-paths with single-item search path"):
New test.
* gnu/packages/version-control.scm (git)[native-search-paths](separator):
New field.