Commit Graph

99 Commits

Author SHA1 Message Date
Ludovic Courtès da03649640
profiles: Remove workaround for an old Guile 'scandir' bug.
* guix/profiles.scm (generation-numbers)[scandir]: Remove.
2017-07-20 11:57:13 +02:00
宋文武 85cfbd46ce
profiles: xdg-desktop-database: Run the hook when GLib is referenced.
This will pull the latest 'desktop-file-utils' package into the profile
closure, as the 'xdg-mime-database' hook already does.

* guix/profiles.scm (xdg-desktop-database): Run the hook when 'glib' is
referenced.
2017-07-03 23:27:04 +08:00
Ludovic Courtès 6d382339de
profiles: Add 'manifest-transaction-removal-candidate?'.
* guix/profiles.scm (manifest-transaction-removal-candidate?): New
procedure.
* tests/profiles.scm ("manifest-transaction-removal-candidate?"): New
test.
2017-06-26 22:52:06 +02:00
Ludovic Courtès afd06f605b
environment: Disable profile collision checks.
Reported by Efraim Flashner.
This is a followup to a654dc4bcf.

* guix/profiles.scm (profile-derivation): Add #:allow-collisions? and
honor it.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
 #:allow-collisions? #f to 'profile-derivation'.
* tests/guix-environment.sh: Test "guix environment guix".
2017-06-21 16:53:22 +02:00
Ludovic Courtès 2e2b5ad7bb
profiles: Move 'manifest-entry-dependencies' user after definition.
Reported by Efraim Flashner.

* guix/profiles.scm (manifest-transitive-entries): Move after
<manifest-entry> definition.
2017-06-21 11:59:33 +02:00
Ludovic Courtès a654dc4bcf
profiles: Catch and report collisions in the profile.
* guix/profiles.scm (&profile-collision-error): New error condition.
(manifest-transitive-entries, manifest-entry-lookup, lower-manifest-entry)
(check-for-collisions): New procedures.
(profile-derivation): Add call to 'check-for-collisions'.
* guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'.
* tests/profiles.scm ("collision", "collision of propagated inputs")
("no collision"): New tests.
2017-06-21 11:05:53 +02:00
Ludovic Courtès b3a00885c0
profiles: Manifest entries keep a reference to their parent entry.
* guix/profiles.scm (<manifest-entry>)[parent]: New field.
(package->manifest-entry): Add #:parent parameter.  Fill out the
'parent' field of <manifest-entry>; pass #:parent in recursive calls.
* guix/profiles.scm (sexp->manifest)[sexp->manifest-entry]: New
procedure.  Use it for version 3.
* tests/profiles.scm ("manifest-entry-parent"): New procedure.
("read-manifest")[entry->sexp]: Add 'manifest-entry-parent' to the
result.
2017-06-21 11:05:52 +02:00
Ludovic Courtès 55b4715fd4
profiles: Represent propagated inputs as manifest entries.
* guix/profiles.scm (package->manifest-entry): Turn DEPS into a list of
manifest entries.
(manifest->gexp)[entry->gexp]: Call 'entry->gexp' on DEPS.
Bump version to 3.
(sexp->manifest)[infer-dependency]: New procedure.
Use it for versions 1 and 2.  Parse version 3.
(manifest-inputs)[entry->gexp]: New procedure.
Adjust to 'dependencies' being a list of <manifest-entry>.
* tests/profiles.scm ("packages->manifest, propagated inputs")
("read-manifest"): New fields.
2017-06-21 11:05:52 +02:00
Maxim Cournoyer 516bfed7a3
profiles: Add elapsed time to manual-database hook to output message.
* guix/profiles.scm (manual-database): Add elapsed time to manual-database
hook to output message.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-05-16 23:10:10 +02:00
Maxim Cournoyer a0b87ef8ec
profiles: Generate database file for man pages.
The mandb database file (index.db) is used by the "apropos" (whatis) or
"man -k" commands.  This change introduces a profile hook to generate
such database file.

* guix/profiles.scm (manual-database): New procedure.
(%default-profile-hooks): Add it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-04-05 22:45:41 +02:00
Huang Ying 0a5ce0d1df
profiles: Create fonts.dir/scale for all fonts directories.
* guix/profiles.scm (fonts-dir-file): Create fonts.dir/scale files for all
fonts directories.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-26 12:53:52 +02:00
Ludovic Courtès 176febe377
profiles: Packages in a profile can be cross-compiled.
* guix/profiles.scm (profile-derivation): Add #:target parameter; pass
it to 'gexp->derivation'.
* tests/profiles.scm ("profile-derivation, cross-compilation"): New test.
2017-03-17 23:25:53 +01:00
Ying Huang 06d7d1190e
profiles: gtk-im-modules: Fix for gtk3.
Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find
in output "bin" instead of "out".

* guix/profiles.scm (gtk-im-modules): Pass the path of gtk-query-immodules-x.x
as 'query' argument to the 'build' procedure.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2017-02-08 20:12:20 +08:00
Christopher Baines 849a1b8133
profiles: Export 'ca-certificate-bundle'.
* guix/profiles.scm: Export ca-certificate-bundle, such that it can be used in
other G-expressions.  This is useful where these G-expressions run programs
that require a ca-certificate-bundle, e.g. git.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-16 11:03:42 +01:00
Ludovic Courtès a6562c7e20
profiles: Remove dependency on 'glibc-utf8-locales' for tests.
Commit 1af0860e8b added a mandatory
dependency on 'glibc-utf8-locales', which entails long rebuilds for
tests.

* guix/profiles.scm (profile-derivation): Add #:locales? parameter.
Add 'set-utf8-locale' variable.  Use it when LOCALES? is true.
(link-to-empty-profile): Pass #:locales? #f.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
  #:locales?.
* guix/scripts/package.scm (build-and-use-profile): Likewise.
* tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f.
* tests/profiles.scm ("profile-derivation")
("profile-derivation, inputs", "profile-manifest, search-paths")
("etc/profile", "etc/profile when etc/ already exists"):
("etc/profile when etc/ is a symlink"): Likewise.
2016-12-17 14:46:42 +01:00
Ludovic Courtès 1af0860e8b
profiles: Build profiles in a UTF-8 locale.
Fixes <http://bugs.gnu.org/25213>.
Reported by Christopher Baines <mail@cbaines.net>.

* guix/profiles.scm (profile-derivation)[glibc-utf8-locales]: New
variable.
[builder]: Use it to set 'LOCPATH'.
2016-12-16 18:01:08 +01:00
Ludovic Courtès e74f64b9e5
store: Add 'references*'.
* guix/store.scm (references*): New procedure.
* guix/profiles.scm (manifest-lookup-package)[references*]: Remove.
* guix/scripts/system.scm (references*): Remove.
* tests/gexp.scm ("gexp->file", "gexp->file + file-append")
("gexp->derivation", "gexp->derivation, cross-compilation")
("gexp->derivation, ungexp + ungexp-native")
("scheme-file", "text-file*", "mixed-text-file"): Remove 'references*'
instead of (store-lift references).
2016-11-19 18:44:53 +01:00
Mark H Weaver 71e21fb26d
Merge branch 'master' into core-updates 2016-11-07 00:33:16 -05:00
Chris Marusich 9008debc54
profiles: Extract a procedure for getting relative generation numbers.
* 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>
2016-11-06 18:08:53 +01:00
Leo Famulari 205f0107bb
Merge branch 'master' into core-updates 2016-10-30 19:19:21 -04:00
Ricardo Wurmus 054f60cd31
profiles: manifest-lookup-package: Cosmetic changes.
* guix/profiles.scm (manifest-lookup-package): Rename variables; use
"string=?" instead of "equal?".
2016-10-30 07:21:15 +01:00
Ludovic Courtès 79355ae3e8
Merge branch 'master' into core-updates 2016-09-30 12:05:27 +02:00
Ricardo Wurmus 7ddc178093
profiles: Build GTK+ input module cache.
* guix/profiles.scm (gtk-im-modules): New procedure.
(%default-profile-hooks): Add it.
2016-09-26 07:58:17 +02:00
Ricardo Wurmus 2c9f4786c9
profiles: manifest-lookup-package: Optionally match version prefix.
* guix/profiles.scm (manifest-lookup-package): Optionally filter store
item matches by version prefix.
2016-09-26 07:58:17 +02:00
Ludovic Courtès 03763d6473
profiles: Export <manifest-pattern> accessors.
* guix/profiles.scm (manifest-pattern-name, manifest-pattern-version)
(manifest-pattern-output): Export.
2016-09-06 23:22:10 +02:00
Ludovic Courtès c8c25704ae
profiles: Add manifest-transaction helper procedures.
* guix/profiles.scm (manifest-transaction-install-entry)
(manifest-transaction-remove-pattern)
(manifest-transaction-null?): New procedures.
* tests/profiles.scm ("manifest-transaction-null?"): New test.
2016-09-06 23:22:10 +02:00
宋文武 d1fb4af6b8
profiles: gtk-icon-themes: Use 'gtk-update-icon-cache' from 'gtk+:bin'.
This is a followup to commit 7b808d7.

* guix/profiles.scm (gtk-icon-themes): Use 'gtk-update-icon-cache' from
the "bin" output of gtk+ package.
2016-08-23 19:45:33 +08:00
宋文武 801d316b20
profiles: xdg-mime-database: Run the hook when have GLib based applications.
* 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'.
2016-08-12 22:22:43 +08:00
Ludovic Courtès 9e90fc7713
profiles: Output in 'package->manifest-entry' defaults to "out".
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.
2016-07-26 18:18:53 +02:00
Alex Kost 9eb5a449ee
profiles: Add fonts-dir-file hook.
* guix/profiles.scm (fonts-dir-file): New procedure.
(%default-profile-hooks): Add it.
2016-07-25 17:18:52 +03:00
Ludovic Courtès 99b231dee6
profiles: Use 'with-imported-modules'.
* guix/profiles.scm (info-dir-file): Use 'with-imported-modules' instead
of the #:module argument to 'gexp->derivation'.
(ghc-package-cache-file): Likewise.
(ca-certificate-bundle): Likewise.
(gtk-icon-themes): Likewise.
(xdg-desktop-database): Likewise.
(xdg-mime-database): Likewise.
(profile-derivation): Likewise.
2016-07-12 22:47:08 +02:00
Ludovic Courtès 4d4c3614c8
profiles: Make sure hook derivations fail upon error.
Reported at
<https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00368.html>.

* guix/profiles.scm (info-dir-file)[build]: Add explicit call to
'exit'.
* guix/profiles.scm (ghc-package-cache-file)[build]: Likewise.
* guix/profiles.scm (xdg-desktop-database)[build]: Likewise.
* guix/profiles.scm (xdg-mime-database)[build]: Likewise.
2016-06-12 23:54:00 +02:00
宋文武 963521a380
profiles: manifest-lookup-package: Correctly handle package entries.
* guix/profiles.scm (manifest-lookup-package): Consider the package entry
in addition to its 'package-transitive-inputs'.
2016-06-11 11:05:18 +08:00
宋文武 359f06aac8
profiles: xdg-mime-database: Union the "share/mime/packages" directory.
* guix/profiles.scm (xdg-mime-database): Call 'union-build' for the
"share/mime/packages" directory of inputs.
2016-06-11 11:03:31 +08:00
Ludovic Courtès 40d71e44f5
profiles: 'profile-derivation' now honors #:system.
Fixes <http://bugs.gnu.org/23682>.
Reported by Ander GM <anthk@openmailbox.org>.

* guix/profiles.scm (profile-derivation): Pass #:system to
'gexp->derivation'.
* tests/guix-environment.sh: Add 'guix environment -s' test.
2016-06-05 00:05:38 +02:00
宋文武 d72d783301 profiles: Factor out 'manifest-lookup-package'.
* guix/profiles.scm (manifest-lookup-package): New procedure.
(gtk-icon-themes, xdg-desktop-database, xdg-mime-database): Use it.
2016-05-02 22:06:46 +08:00
宋文武 6c06b1fdac profiles: Add xdg-mime-database hook.
* guix/profiles.scm (xdg-mime-database): New function.
(%default-profile-hooks): Add it.
2016-05-02 22:06:46 +08:00
宋文武 842cb82097 profiles: Add xdg-desktop-database hook.
* guix/profiles.scm (xdg-desktop-database): New function.
(%default-profile-hooks): Add it.
2016-05-02 22:06:46 +08:00
Ludovic Courtès 97425486ee profiles: Use the right 'package-name->name+version'.
* guix/profiles.scm: Use 'package-name->name+version' from (guix build
utils).  Fixes 'find-among-store-items' in 'gtk-icon-themes'.
2016-04-01 00:05:42 +02:00
Ludovic Courtès e5f04c2dde profiles: Add #:system argument to profile-derivation.
Suggested by David Thompson <davet@gnu.org>.

* guix/profiles.scm (profile-derivation): Add #:system parameter and
honor it.
2016-02-12 21:54:25 +01:00
Ludovic Courtès ccda8f7d7f profiles: Honor search paths of propagated inputs.
Fixes <http://bugs.gnu.org/22073>.
Reported by Federico Beffa <beffa@ieee.org>.

* guix/profiles.scm (package->manifest-entry): Use
'package-transitive-native-search-paths' when computing
'search-paths' field.
* tests/profiles.scm ("package->manifest-entry, search paths"): New test.
2015-12-20 22:34:22 +01:00
Ludovic Courtès 4fef1e850e profiles: Silence Info installation.
* guix/profiles.scm (info-dir-file)[build]: Pass --silent to
'install-info'.
2015-12-14 19:57:42 +01:00
Ludovic Courtès 2aacd9179c profiles: Silence GTK+ icon cache creation.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/profiles.scm (gtk-icon-themes)[build]: Pass --quiet to
'gtk-update-icon-cache'.
2015-12-04 23:12:02 +01:00
Ludovic Courtès 4bddf74ef2 profiles: Silence GTK+ icon theme union.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/profiles.scm (gtk-icon-themes)[build]: Pass 'union-build' a
  #:log-port argument.
2015-12-04 23:12:02 +01:00
Ludovic Courtès 06d45f4566 profiles: Add generation manipulation procedures.
* 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.
2015-10-27 00:01:20 +01:00
Ludovic Courtès afd3d9316c Use "normalized codesets" everywhere.
In other words, change "xx_YY.UTF-8" to "xx_YY.utf8".

* guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of
  "en_US.UTF-8".
* guix/packages.scm (patch-and-repack): Likewise.
* guix/build/gnu-build-system.scm (install-locale): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* gnu/packages/python.scm (python-ipython): Likewise.
* gnu/packages/gawk.scm (gawk): Likewise.
* build-aux/hydra/demo-os.scm: Likewise.
* gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove
  'change-locale' phase.
2015-10-04 00:10:03 +02:00
Ludovic Courtès f2d7bbb537 gnu: glibc: Look for locale data in versioned sub-directories.
* 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.
2015-10-03 20:17:09 +02:00
Ludovic Courtès a7a4fd9a7c profiles: Make profile-specific derivations non-substitutable.
This avoids gratuitous queries of the substituter.

* guix/profiles.scm (ghc-package-cache-file): Pass #:substitutable? #f
  to 'gexp->derivation'.
  (ca-certificate-bundle): Likewise.
  (gtk-icon-themes): Likewise.
  (profile-derivation): Likewise.
  (info-dir-file): Likewise, plus #:local-build? #t.
2015-09-24 22:16:10 +02:00
Ludovic Courtès fa96048f0a profiles: Remove duplicate entries in 'etc/profile'.
Reported by Andy Wingo
at <http://lists.gnu.org/archive/html/guix-devel/2015-08/msg00109.html>.

* guix/profiles.scm (profile-derivation)[builder]: Delete duplicates in
  SEARCH-PATHS.
2015-08-20 19:12:36 +02:00
Eric Bavier b4b1fe9d2f profiles: Process ghc conf files only once.
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.
2015-06-11 18:55:48 -05:00