diff options
author | David Thompson <davet@gnu.org> | 2015-06-15 21:33:27 -0400 |
---|---|---|
committer | David Thompson <davet@gnu.org> | 2015-06-15 21:33:27 -0400 |
commit | 092320d616462dd5b8a4fbdb3aa2e7de9d40bc1f (patch) | |
tree | 89018b6ff6f2ad5eace65aae3ebab0351c364a7a /guix | |
parent | 91e0979fd2c3a3c021209a0a0ab48e0c1061bd35 (diff) |
package: Use the right state directory rather than a hardcoded one.
* guix/web/package.scm (%profile): Use %STATE-DIRECTORY, as well as the
'USER' and 'LOGNAME' environment variables, like 'guix package' does.
Written-By: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r-- | guix/web/package.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/web/package.scm b/guix/web/package.scm index f5a032c..5fcfe51 100644 --- a/guix/web/package.scm +++ b/guix/web/package.scm @@ -18,6 +18,8 @@ (define-module (guix web package) #:use-module (ice-9 match) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (guix config) #:use-module (guix derivations) #:use-module (guix monads) #:use-module (guix packages) @@ -34,8 +36,13 @@ (fold-packages cons '())) (define %profile - (string-append "/usr/var/guix/profiles/per-user/" - (getenv "USER") "/guix-profile")) + (string-append %state-directory "/profiles/" + (or (and=> (or (getenv "USER") + (getenv "LOGNAME")) + (cut string-append "per-user/" <>)) + "default") + "/guix-profile")) + (define manifest (profile-manifest %profile)) (define (maybe-register-gc-root store profile) |