diff options
author | Mark H Weaver <mhw@netris.org> | 2015-10-17 19:08:53 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-10-17 19:08:53 -0400 |
commit | ccb522324bd99cc379ada4a1da5b8bcfd7d12c5b (patch) | |
tree | bd73bf8f8dabc046c12c53295b18daad49379887 /guix/utils.scm | |
parent | 5fba12ecd3146e17d826167b6b9ffdfcbe2a49c9 (diff) | |
parent | 9e2592a3466c72dbfb64494e1316ce8af1554647 (diff) |
Merge branch 'master' into dbus-update
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 0802a1b67a..190b787185 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -81,6 +81,7 @@ fold-tree fold-tree-leaves split + cache-directory filtered-port compressed-port @@ -703,6 +704,12 @@ elements after E." ((head . tail) (loop tail (cons head acc)))))) +(define (cache-directory) + "Return the cache directory for Guix, by default ~/.cache/guix." + (or (getenv "XDG_CONFIG_HOME") + (and=> (getenv "HOME") + (cut string-append <> "/.cache/guix")))) + ;;; ;;; Source location. |