~ruther/guix-local

b9e5c0a949fa627da55ea53fd71dfa96ad8a2b4b — Ludovic Courtès 13 years ago 44b6be7
guix-package: Create ~/.guix-profile when it doesn't exist.

* guix-package.in (guix-package): Create the %USER-ENVIRONMENT-DIRECTORY
  symlink if it doesn't exist yet.
* doc/guix.texi (Invoking guix-package): Document it.
2 files changed, 13 insertions(+), 4 deletions(-)

M doc/guix.texi
M guix-package.in
M doc/guix.texi => doc/guix.texi +6 -0
@@ 428,6 428,12 @@ the transaction.  Upon completion, a new profile is created, but
previous generations of the profile remain available, should the user
want to roll back.

For each user, a symlink to the user's default profile is automatically
created in @file{$HOME/.guix-profile}.  This symlink always point to the
current generation of the user's default profile.  Thus, users can add
@file{$HOME/.guix-profile/bin} to their @code{PATH} environment
variable, and so on.

@table @code

@item --install=@var{package}

M guix-package.in => guix-package.in +7 -4
@@ 458,6 458,13 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
  (setvbuf (current-error-port) _IOLBF)

  (let ((opts (parse-options)))

    ;; Create ~/.guix-profile if it doesn't exist yet.
    (when (and %user-environment-directory
               %current-profile
               (not (file-exists? %user-environment-directory)))
      (symlink %current-profile %user-environment-directory))

    (with-error-handling
      (or (process-query opts)
          (parameterize ((%guile-for-build


@@ 466,7 473,3 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
                                                  %bootstrap-guile
                                                  guile-final))))
            (process-actions opts))))))

;; Local Variables:
;; eval: (put 'guard 'scheme-indent-function 1)
;; End: