* guix/build/download.scm
(string-pad-middle, store-url-abbreviation, store-path-abbreviation):
New procedures.
(progress-proc): Add #:abbreviation parameter and use it. Generate a
better indeterminate progress string.
* guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output.
(process-substitution): Use byte-count->string and store-path-abbreviation.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Fixes <http://bugs.gnu.org/21451>.
Reported by Steve Sprang <steve.sprang@gmail.com>.
* guix/scripts/system.scm (guix-system)[option-arguments]: Error out
when ACTION is #f.
Previously, the Ruby build system only knew how to work with gem archives,
which made it difficult to build unreleased gems from a Git repository or
released gems in tarball form.
* gnu/build/ruby-build-system.scm (gnu:unpack, gem-archive?): New procedures.
(unpack): Use GNU build system unpack phase for non-gem sources.
(build): Rebuild the gemspec iff the source is a gem archive.
* guix.texi ("ruby-build-system"): Mention that tarballs and directories are
acceptable.
* guix/scripts/build.scm (%default-log-urls): New variable.
(log-url): New procedure.
(guix-build): Use it.
* doc/guix.texi (Invoking guix build): Document it.
* guix/build/download.scm (seconds->string): New function.
(byte-count->string): New function.
(progress-bar): New function.
(throughput->string): Remove function.
(progress-proc): Display base file name, elapsed time, and progress bar.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Provide support for Texinfo's markup in package description.
* guix/ui.scm (%text-width): New parameter.
(texi->plain-text): New variable.
(package->recutils): Use them.
(package-description-string): New variable.
* emacs/guix-main.scm (%package-param-alist): Use it.
* gnu/packages/perl.scm (perl-devel-globaldestruction)
(perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup.
* gnu/packages/python.scm (python2-empy): Likewise.
The intent is to make 'clone' behave a lot more like 'primitive-fork', which
calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
flags. Notably, running 'clone' at the REPL without these flags would break
the REPL beyond repair.
* guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New
variables.
* gnu/build/linux-container.scm (namespaces->bit-mask): Add
CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask.
Having the hash of the source gem in the source directory file name proved to
be problematic when running the test suite for the 'pg' gem that creates
UNIX-domain sockets in the source directory and exceeded the 108 character
limit on GNU/Linux systems.
* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
"gem".
Reported by Andy Wingo <wingo@igalia.com>.
* guix/monads.scm (define-lift) <fallback case>: Add missing #'. Remove
extra formal parameter.
* tests/monads.scm ("lift"): Add test with 'lift1' as a procedure.
* guix/scripts/publish.scm (narinfo-string): Catch 'system-error' around
'load-derivation' call; return BASE-INFO upon ENOENT. This allows us
to return the narinfo even if DERIVER is missing. Before that, the
exception would be uncaught, leading to 500 Internal Error on the
client side.
* guix/import/gem.scm (make-gem-sexp): Properly handle an empty list of
licenses. When rendering a list of licenses, cons 'list onto the front of
the expression.
* tests/gem.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
This significantly reduces churn in the store. It also reduces run time
of 'guix build inkscape -Sd' by ~10%.
* guix/download.scm (url-fetch)[mirror-file]: New variable.
[builder]: Get URL from the "guix download url" env. var. Get the mirrors
from MIRROR-FILE. Pass #:script-name and #:env-vars to 'gexp->derivation'.
* guix/import/pypi.scm (make-pypi-sexp): Factorize license to symbol
conversion code.
(string->license, snake-case, guix-hash-url): Move from here...
* guix/import/utils.scm: ... to here.
(license->symbol): New procedure.
* guix/gexp.scm (lower-object): New procedure.
(lower-inputs, lower-references, gexp->sexp): Use it.
* tests/gexp.scm ("lower-object"): New test.
* doc/guix.texi (G-Expressions): Document it.
* guix/scripts/package.scm (show-help): Add help text for --install-from-file
option.
(%options): Add --install-from-file option.
* tests/guix-package.sh: Test it.
* doc/guix.texi ("invoking guix package"): Document it.
* doc/package-hello.scm: New file.
* doc.am (EXTRA_DIST): Add it.
This removes all I/O, which obviously makes things faster.
* guix/scripts/size.scm (file-size, store-item-exists?): Remove.
(query-path-info*): New procedure.
(file-size*): Rename to...
(file-size): ... this; adjust caller. Use 'query-path-info*' instead of
'file-size'.