From 092320d616462dd5b8a4fbdb3aa2e7de9d40bc1f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 15 Jun 2015 21:33:27 -0400 Subject: package: Use the right state directory rather than a hardcoded one. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- guix/web/package.scm | 11 +++++++++-- 1 file 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) -- cgit v1.2.3