From 5895ec8aa234ec9a4ce68ab8f94e795807630168 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 14 Mar 2017 16:37:17 +0100 Subject: pack: Add '--symlink'. * guix/scripts/pack.scm (self-contained-tarball): Add #:symlinks parameter. [build](symlink->directives): New procedure (directives): New variable. Add call to 'evaluate-populate-directive'. Pass the directories among DIRECTIVES to 'tar'. (%default-options): Add 'symlinks'. (%options, show-help): Add '--symlink'. (guix-pack): Honor it. * gnu/build/install.scm (evaluate-populate-directive): Export. * doc/guix.texi (Invoking guix pack): Document it. --- doc/guix.texi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 86fc86da61..82298e677d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2422,6 +2422,18 @@ same as would be created by @command{guix package -i}. It is this mechanism that is used to create Guix's own standalone binary tarball (@pxref{Binary Installation}). +Users of this pack would have to run +@file{/gnu/store/@dots{}-profile/bin/guile} to run Guile, which you may +find inconvenient. To work around it, you can create, say, a +@file{/opt/gnu/bin} symlink to the profile: + +@example +guix pack -S /opt/gnu/bin=bin guile emacs geiser +@end example + +@noindent +That way, users can happily type @file{/opt/gnu/bin/guile} and enjoy. + Several command-line options allow you to customize your pack: @table @code @@ -2435,6 +2447,18 @@ the system type of the build host. Compress the resulting tarball using @var{tool}---one of @code{gzip}, @code{bzip2}, @code{xz}, or @code{lzip}. +@item --symlink=@var{spec} +@itemx -S @var{spec} +Add the symlinks specified by @var{spec} to the pack. This option can +appear several times. + +@var{spec} has the form @code{@var{source}=@var{target}}, where +@var{source} is the symlink that will be created and @var{target} is the +symlink target. + +For instance, @code{-S /opt/gnu/bin=bin} creates a @file{/opt/gnu/bin} +symlink pointing to the @file{bin} sub-directory of the profile. + @item --localstatedir Include the ``local state directory'', @file{/var/guix}, in the resulting pack. -- cgit v1.2.3