utils: 'cache-directory' honors 'XDG_CACHE_HOME'.

* guix/utils.scm (cache-directory): Honor 'XDG_CACHE_HOME', not
'XDG_CONFIG_HOME'.
This commit is contained in:
Ludovic Courtès 2016-06-22 23:39:57 +02:00
parent 0a2f2848d5
commit 3583b27b2c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -637,7 +637,7 @@ output port, and PROC's result is returned."
(define (cache-directory)
"Return the cache directory for Guix, by default ~/.cache/guix."
(or (getenv "XDG_CONFIG_HOME")
(or (getenv "XDG_CACHE_HOME")
(and=> (or (getenv "HOME")
(passwd:dir (getpwuid (getuid))))
(cut string-append <> "/.cache/guix"))))