* guix/scripts/package.scm (<manifest-entry>): Add 'inputs' field.
(manifest=?, lower-input): New procedure.
(profile-derivation)[builder]: Add #:log-port argument to
'union-build'.
[ensure-valid-input]: Remove.
Add each entry's inputs to the input list.
(options->installable): Return just the list of entries.
[package->manifest-entry]: Set 'inputs' field.
[canonicalize-deps]: Rename to...
[deduplicate]: ... this. Remove input fiddling.
(guix-package)[process-actions]: Use 'manifest=?' to compare the new
and old manifests. Pass directly PROF-DRV to 'show-what-to-build'.
Pass #:print-build-trace #f to 'set-build-options'.
* guix/scripts/package.scm (%user-environment-directory): Rename to...
(%user-profile-directory): ... this. Update users accordingly.
(profile-derivation): Use the term "profile" instead of "user
environment", and use "profile" as the derivation name.
* guix/scripts/package.scm (<manifest>, <manifest-entry>): New record
types.
(make-manifest, read-manifest, manifest->sexp, sexp->manifest,
read-manifest, write-manifest, remove-manifest-entry, manifest-remove,
manifest-installed?): New procedures.
(profile-derivation): Take a manifest as the second parameter. Use
'manifest->sexp'. Expect <manifest-entry> objects instead of
"tuples". Adjust callers accordingly.
(search-path-environment-variables): Changes 'packages' parameter to
'entries'. Rename 'package-in-manifest->package' to
'manifest-entry->package'; expect <manifest-entry> objects.
(display-search-paths): Rename 'packages' to 'entries'.
(options->installable): Change 'installed' to 'manifest'. Have
'canonicalize-deps' return name/path tuples instead of raw packages.
Rename 'package->tuple' to 'package->manifest-entry'. Use
<manifest-entry> objects instead of tuples.
(guix-package)[process-actions]: Likewise. Rename 'packages' to
'entries'.
[process-query]: Use 'manifest-entries' instead of
'manifest-packages'.
* guix/scripts/package.scm (find-package): Rename to...
(specification->package+output): ... this. Rename 'name' parmameter
to 'spec'. Return a package and output name instead of a tuple.
(options->installable): New procedure
(guix-package)[process-actions]: Use it, and remove corresponding
code.
Previously references to '%standard-phases' in builder-side code would
refer to the wrong one.
* guix/build-system/cmake.scm (cmake-build): Remove (guix build
gnu-build-system) from the default MODULES value.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/records.scm (define-record-type*): Wrap field bindings in a
'let*', not in a 'letrec*', which turned out to be pointlessly
inconvenient.
* tests/records.scm: Adjust test names accordingly.
* scripts/guix.in (config-lookup): Add "localedir" entry.
(run-guix-main): Add call to 'bindtextdomain'.
* guix/ui.scm (initialize-guix): Use %GETTEXT-DOMAIN instead of a
literal.
* guix/gnu-maintenance.scm (%gnumaint-base-url): New variable.
(%package-list-url): Use it.
(%gsrc-package-list-url): Remove.
(%package-description-url): New variable.
(official-gnu-packages): Change to use %PACKAGE-DESCRIPTION-URL
instead of %GSRC-PACKAGE-LIST-URL. Adjust recutils field names
accordingly.
See <https://lists.gnu.org/archive/html/guix-devel/2013-09/msg00137.html>
for the rationale.
* guix/packages.scm (<origin>)[patches, patch-flags, patch-inputs,
patch-guile]: New fields.
(%standard-patch-inputs, default-guile, patch-and-repack): New
procedures.
(package-source-derivation): When 'patches' is non-empty, call
'patch-and-repack'.
* guix/utils.scm (file-sans-extension): New procedure.
* guix/monads.scm (<monad>): Turn in a raw SRFI-9 record type.
(define-monad): New macro.
(with-monad): Add a case for when MONAD is a macro.
(identity-return, identity-bind, store-return, store-bind): Inline.
(%identity-monad, %store-monad): Use 'define-monad'.
* tests/monads.scm ("monad?"): New test.
* guix/monads.scm: New file.
* tests/monads.scm: New file.
* Makefile.am (MODULES): Add guix/monads.scm.
(SCM_TESTS): Add tests/monads.scm.
* doc/guix.texi (The Store Monad): New node.
(The Store): Reference it.
* guix/build-system/trivial.scm (trivial-build): When SOURCE is true,
add it to INPUTS.
(trivial-cross-build): Likewise.
* tests/packages.scm ("trivial with source"): New test.
* guix/scripts/package.scm (switch-to-previous-generation): New function.
(roll-back): Use the new function instead of 'switch-link'.
(show-help): Add '--delete-generations'.
(%options): Likewise.
(guix-package)[process-actions]: Add 'current-generation-number',
'display-and-delete', and 'delete-generation'. Add support for
'--delete-generations', and reindent the code.
* tests/guix-package.sh: Test '--delete-generations'.
* doc/guix.texi (Invoking guix-package): Document '--delete-generations'.
* guix/scripts/package.scm (guix-package)[process-query]: Show that a
generation is the current one if the profile points to it.
* tests/guix-package.sh: Test it.
* guix/scripts/package.scm (guix-package)[process-query]: Change
'list-generation' to not list the zeroth generation.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Document it, and use the
right term when talking about generations.
* guix/scripts/package.scm (guix-package)[process-query]: Exit with 1
when a generation does not exist or the profile points to the zeroth
generation.
* tests/guix-package.sh: Test the former case.
Suggested by Andreas Enge <andreas@enge.fr>.
* guix/scripts/package.scm (guix-package)[list-generations,
list-installed]: Reverse the result of 'manifest-packages'.
* doc/guix.texi (Invoking guix package): Document the order of packages
for '--list-generations' and '--list-installed'.
Fixes <http://bugs.gnu.org/15428>.
Reported by Cyrill Schenkel <cyrill.schenkel@gmail.com>.
* guix/scripts/pull.scm (guix-pull): 'unpack' returns a single value.
* guix/derivations.scm (derivation->output-path,
derivation->output-paths): New procedures.
(derivation-path->output-path): Use 'derivation->output-path'.
(derivation-path->output-paths): Use 'derivation->output-paths'.
(derivation): Accept 'derivation?' objects as inputs. Return a single
value.
(build-derivations): New procedure.
(compiled-modules): Use 'derivation->output-paths'.
(build-expression->derivation)[source-path]: Add case for when the
input matches 'derivation?'.
[prologue]: Accept 'derivation?' objects in INPUTS.
[mod-dir, go-dir]: Use 'derivation->output-path'.
* guix/download.scm (url-fetch): Adjust to the single-value return.
* guix/packages.scm (package-output): Use 'derivation->output-path'.
* guix/scripts/build.scm (guix-build): When the argument is
'derivation-path?', pass it through 'read-derivation'.
Use 'derivation-file-name' to print out the .drv file names, and to
register them. Use 'derivation->output-path' instead of
'derivation-path->output-path'.
* guix/scripts/package.scm (roll-back): Adjust to the single-value
return.
(guix-package): Use 'derivation->output-path'.
* guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?'
objects instead of .drv file names.
* gnu/system/grub.scm (grub-configuration-file): Use
'derivation->output-path' instead of 'derivation-path->output-path'.
* gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm,
tests/store.scm, tests/union.scm: Adjust to the new calling
convention.
* doc/guix.texi (Defining Packages, The Store, Derivations): Adjust
accordingly.
* guix/derivations.scm (<derivation>): Add 'file-name' field.
(%read-derivation): Use (port-filename DRV-PORT) as the file name for
the result.
(derivation): Set the 'file-name' field in the result.
* tests/derivations.scm ("build derivation with 1 source"): Assert that
'derivation-file-name' returns the right thing.