diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-01-08 21:12:55 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-01-08 21:12:55 +0100 |
commit | 80d0447c9556f06decc80a2d43c2fa8402406d91 (patch) | |
tree | 351b4cf1c42641e81274b7eacf70949a0e7e2964 /guix/store.scm | |
parent | 021a201f2967e5a5afdabb03148f225f94c58403 (diff) |
config: '%state-directory' always honors $NIX_STATE_DIR.
* guix/config.scm.in (%state-directory): Honor $NIX_STATE_DIR.
* guix/scripts/package.scm (%profile-directory): Use %state-directory
directly.
* guix/store.scm (%default-socket-path, log-file): Likewise.
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/guix/store.scm b/guix/store.scm index 159b5dc396..7715a15644 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -158,8 +158,7 @@ (delete-specific 3)) (define %default-socket-path - (string-append (or (getenv "NIX_STATE_DIR") %state-directory) - "/daemon-socket/socket")) + (string-append %state-directory "/daemon-socket/socket")) (define %daemon-socket-file ;; File name of the socket the daemon listens too. @@ -749,12 +748,9 @@ syntactically valid store path." (define (log-file store file) "Return the build log file for FILE, or #f if none could be found. FILE must be an absolute store file name, or a derivation file name." - (define state-dir ; XXX: factorize - (or (getenv "NIX_STATE_DIR") %state-directory)) - (cond ((derivation-path? file) (let* ((base (basename file)) - (log (string-append (dirname state-dir) ; XXX: ditto + (log (string-append (dirname %state-directory) ; XXX "/log/nix/drvs/" (string-take base 2) "/" (string-drop base 2))) |