Before this, something like "guix package -i glibc" could fail because
glibc lists linux-libre-headers as a propagated input (which would be
added as a dependency in the manifest) but the linux-libre-headers
output could be unavailable, leading to an error like this:
path `/nix/store/4v2bk8sx5cm166gks3fi3q7d9zchibnk-linux-libre-headers-3.3.8' is not valid
This patch adds such dependencies as inputs of the profile derivation.
* guix/scripts/package.scm (profile-derivation): Accept package objects
in the `deps' field of an element of PACKAGES. Convert them to their
output path for BUILDER, and add them to the inputs of the
`build-expression->derivation' call.
(input->name+path): When INPUT doesn't contain a package object,
return it as is.
(guix-package)[process-actions](canonicalize-deps): Expect DEPS to
contain package objects, and leave them as is.
* guix/scripts/package.scm (search-path-environment-variables): Prefer
%USER-ENVIRONMENT-DIRECTORY when it points to PROFILE.
(display-search-paths): Use 3 spaces for indentation.
* guix/scripts/package.scm (guix-package)[find-package]: Add optional
parameter `output'. Use it.
[process-actions]: When computing UPGRADE, pass OUTPUT to
`find-package'.
* guix/ui.scm (define-diagnostic): New macro, which is based on the
previous version of 'warning'.
(warning, leave): Redefine using 'define-diagnostic'.
(report-error): New macro.
(install-locale): Use 'warning' instead of 'format'.
(call-with-error-handling): Adjust 'leave'.
* gnu/packages.scm (package-files): Use 'warning' instead of 'format'.
* guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'.
* guix/scripts/build.scm (derivations-from-package-expressions, guix-build):
Adjust 'leave'.
* guix/scripts/download.scm (guix-download): Adjust 'leave'.
* guix/scripts/gc.scm (size->number, %options): Adjust 'leave'.
* guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'.
* po/POTFILES.in: Add 'guix/gnu-maintenance.scm'.
* guix/derivations.scm (derivation-input-output-paths): New procedure.
(derivation-prerequisites-to-build): New `use-substitutes?' keyword
argument. Change two return the list of substitutable paths as a
second argument.
* guix/ui.scm (show-what-to-build): Turn `dry-run?' into a keyword
argument. New `use-substitutes?' keyword argument. Use `fold2' and
adjust to use both return values of
`derivation-prerequisites-to-build'. Display what will/would be
downloaded.
* guix/scripts/build.scm (guix-build): Adjust accordingly.
* guix/scripts/package.scm (guix-package): Likewise.
* tests/derivations.scm ("derivation-prerequisites-to-build and
substitutes"): New test.
* guix/scripts/packages.scm (guix-package) [process-actions]: When upgrading,
use "" when REGEXP is #f.
* doc/guix.texi: update the documentation accordingly.
* 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>.
* 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/gnu-maintenance.scm (http-fetch): Error out when DATA is #f.
* guix/scripts/package.scm (check-package-freshness): Wrap
`gnu-package?' call in `false-if-exception'.
Reported by Cyril Roelandt <tipecaml@gmail.com>.
* guix/store.scm (&nix-connection-error): New condition type.
(open-connection): Translate `system-error' during the `connect' call
into `&nix-connection-error'.
* guix/ui.scm (call-with-error-handling): Add case for `nix-connection-error?'.
* guix/scripts/package.scm (guix-package): Move `open-connection' call
within `with-error-handling'.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/download.scm (guix-download): Move body within
`with-error-handling'.
* guix/gnu-maintenance.scm (gnu-package?): New procedure.
* guix/scripts/package.scm (waiting): New macro.
(check-package-freshness): New procedure.
(guix-package)[process-actions]: Use it.
* doc/guix.texi (Invoking guix package): Mention the feature.
* guix/scripts/package.scm (read/eval-package-expression): New
procedure.
(show-help): Add `-e'.
(%options): Likewise.
(guix-package)[process-actions]: Handle ('install . p) pairs, where P
is a package.
* tests/guix-package.sh: Add `boot_make_drv'. Use `-i $boot_make_drv'
once, and then use `-e $boot_make'.
* doc/guix.texi (Invoking guix package): Document `-e'.