environment: Add --link-profile.
authorMike Gerwitz <mtg@gnu.org>
Fri, 26 Jan 2018 03:29:15 +0000 (22:29 -0500)
committerLudovic Courtès <ludo@gnu.org>
Fri, 2 Mar 2018 10:55:42 +0000 (11:55 +0100)
commit07ec349229eeae9f733fe92a300c7cfa4cf8e321
tree86243cce8b9b36187067f63ae8f12bcb301c0794
parent99654a1685005ef757b33bb7be2fbb8021c2a481
environment: Add --link-profile.

This change is motivated by attempts to run programs (like GNU IceCat) within
containers.  The 'fontconfig' program, for example, is configured explicitly
to check ~/.guix-profile for additional fonts.

There were no existing container tests in 'tests/guix-environment.sh', but I
added one anyway for this change.

* doc/guix.texi (Invoking guix environment): Add '--link-profile'.
* guix/scripts/environment.scm (show-help): Add '--link-profile'.
(%options): Add 'link-profile' as '#\P', assigned to 'link-profile?'.
(link-environment): New procedure.
(launch-environment/container): Use it when 'link-profile?'.
[link-profile?]: New parameter.
(guix-environment): Leave when '--link-prof' but not '--container'.  Add
'#:link-profile?' argument to 'launch-environment/container' application.
* tests/guix-environment-container.sh: New '--link-profile' test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
doc/guix.texi
guix/scripts/environment.scm
tests/guix-environment-container.sh