* guix/profiles.scm (relative-generation-spec->number): New procedure.
* guix/scripts/package.scm (switch-generation-action): Use it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/profiles.scm (xdg-mime-database): Run the hook when GLIB is referenced by
the manifest. Add SHARED-MIME-INFO to the mime packages of `update-mime-database'.
Fixes <http://bugs.gnu.org/24029>.
Reported by Dylan Jeffers <sapientech@openmailbox.org>.
* guix/profiles.scm (package->manifest-entry): Change #:output to
default to "out".
(packages->manifest): Add 'package?' in second 'match' clause.
* tests/profiles.scm ("package->manifest-entry defaults to \"out\""):
New test.
* guix/scripts/package.scm (delete-generations): Use
'delete-generation*' instead of 'delete-generation'.
(guix-package)[process-actions]: Use 'roll-back*' instead of
'roll-back' and 'switch-to-generation*' instead of
'switch-to-generation'.
(link-to-empty-profile, switch-to-generation,
switch-to-previous-generation, roll-back, delete-generation): Move
to...
* guix/profiles.scm: ... here. Adjust to not print messages and to
return values that can be used by user interfaces.
* guix/ui.scm (display-generation-change, roll-back*,
switch-to-generation*, delete-generation*): New procedures.
* gnu/packages/base.scm (glibc)[native-search-paths]: Add
'lib/locale/VERSION' for 'GUIX_LOCPATH'.
(glibc-locales, glibc-utf8-locales): Write to a VERSION
sub-directory.
* guix/profiles.scm (ca-certificate-bundle): Adjust LOCPATH value
accordingly.
A package may be listed in the manifest inputs multiple times. Avoid
copying ghc *.conf files twice by deleting duplicates.
* guix/profiles.scm (ghc-package-cache-file)[conf-files]: Delete
duplicate manifest inputs before copying conf files.
This avoids having 'find-files' report warnings about searching in
non-existent directories.
* guix/profiles.scm (ghc-package-cache-file)[conf-files]: Only search
for *.conf files if the search directory exists.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/profiles.scm (gtk-icon-themes)[build]: Check whether DIR is a directory
before calling 'ensure-writable-directory'.
* guix/build/profiles.scm (ensure-writable-directory): Export.
* guix/profiles.scm (gtk-icon-themes)[build]: Remove '@@' form and use (guix
build profiles).
Reported by Ricardo Wurmus.
* guix/profiles.scm (gtk-icon-themes)[entry-lookup-gtk+](find-among-packages):
Rename to...
(find-among-inputs): ... this. Check whether INPUT is a package before
calling 'package-name'. Fixes a regression introduced in b04af0e.
Suggested by 宋文武 <iyzsong@gmail.com>.
* guix/profiles.scm (ghc-package-cache-file): Return a monadic #f, not just
#f, when MANIFEST contains no GHC package.
(profile-derivation): Do not filter based on the return value of HOOK;
instead filter based on the value of items in EXTRAS.
* guix/build/profiles.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/profiles.scm (profile-derivation)[builder]: Call out to
'build-profile'.
Add (guix build profiles) to the #:modules argument.
Discussed in <http://bugs.gnu.org/20255>.
* guix/packages.scm (sexp->search-path-specification): New variable.
* guix/profiles.scm (<manifest-entry>)[search-paths]: New field.
(package->manifest-entry): Initialize it.
(manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...).
Emit (search-paths ...). Increment version.
(find-package): New procedure.
(sexp->manifest)[infer-search-paths]: New procedure.
Use it to initialize the 'search-paths' field for versions 0 and 1.
Add case for version 2.
* guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]:
Remove.
Use 'manifest-entry-search-paths' instead of 'manifest-entry->package'
plus 'package-native-search-paths'.
* tests/profiles.scm ("profile-manifest, search-paths"): New test.
* guix/profiles.scm (ghc-package-cache-file): New procedure.
(profile-derivation): Add 'ghc-package-cache?' keyword argument. If true
(the default), add the result of 'ghc-package-cache-file' to 'inputs'.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
#:ghc-package-cache? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.