summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-02-03 22:32:13 +0100
committerLudovic Courtès <ludo@gnu.org>2019-02-04 00:03:30 +0100
commit7c4700e9f9c290ecc08a4da41534063565fccb25 (patch)
treec26f7fece3dcc916fcf7f6d143640c689f6b9d33 /guix/store.scm
parent65d13e3043d90382f79b1780e06dc671ae451edf (diff)
downloadguix-patches-7c4700e9f9c290ecc08a4da41534063565fccb25.tar
guix-patches-7c4700e9f9c290ecc08a4da41534063565fccb25.tar.gz
store: 'log-file' honors 'GUIX_LOG_DIRECTORY'.
* guix/store.scm (derivation-log-file): Use %LOCALSTATEDIR or "GUIX_LOG_DIRECTORY" instead of (dirname %STATE-DIRECTORY).
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm
index d079147529..0a0a7c7c52 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1856,8 +1856,9 @@ syntactically valid store path."
"Return the build log file for DRV, a derivation file name, or #f if it
could not be found."
(let* ((base (basename drv))
- (log (string-append (dirname %state-directory) ; XXX
- "/log/guix/drvs/"
+ (log (string-append (or (getenv "GUIX_LOG_DIRECTORY")
+ (string-append %localstatedir "/log/guix"))
+ "/drvs/"
(string-take base 2) "/"
(string-drop base 2)))
(log.gz (string-append log ".gz"))