From f5768afa333bbc8167ef2e33db44c9bb64bef0be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sun, 9 Mar 2014 22:05:29 +0100
Subject: [PATCH] build: Change state and log directories to
 $localstatedir/.../guix.

* daemon.am (libstore_a_CPPFLAGS): Change /nix to /guix.
* guix/config.scm.in (%state-directory): Likewise.
* guix/store.scm (log-file): Likewise.
---
 daemon.am          | 4 ++--
 guix/config.scm.in | 2 +-
 guix/store.scm     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/daemon.am b/daemon.am
index 1059e444abd..abb785592dd 100644
--- a/daemon.am
+++ b/daemon.am
@@ -112,8 +112,8 @@ libstore_a_CPPFLAGS =				\
   -I$(top_builddir)/nix/libstore		\
   -DNIX_STORE_DIR=\"$(storedir)\"		\
   -DNIX_DATA_DIR=\"$(datadir)\"			\
-  -DNIX_STATE_DIR=\"$(localstatedir)/nix\"	\
-  -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\"	\
+  -DNIX_STATE_DIR=\"$(localstatedir)/guix\"	\
+  -DNIX_LOG_DIR=\"$(localstatedir)/log/guix\"	\
   -DNIX_CONF_DIR=\"$(sysconfdir)/guix\"		\
   -DNIX_LIBEXEC_DIR=\"$(libexecdir)\"		\
   -DNIX_BIN_DIR=\"$(bindir)\"			\
diff --git a/guix/config.scm.in b/guix/config.scm.in
index 5edb4ced30d..eaadae96183 100644
--- a/guix/config.scm.in
+++ b/guix/config.scm.in
@@ -57,7 +57,7 @@ (define %store-directory
 
 (define %state-directory
   ;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
-  (or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/nix"))
+  (or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
 
 (define %config-directory
   ;; This must match `NIX_CONF_DIR' as defined in `daemon.am'.
diff --git a/guix/store.scm b/guix/store.scm
index e92e159ff44..75edb340ae6 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -827,7 +827,7 @@ (define (log-file store file)
   (cond ((derivation-path? file)
          (let* ((base    (basename file))
                 (log     (string-append (dirname %state-directory) ; XXX
-                                        "/log/nix/drvs/"
+                                        "/log/guix/drvs/"
                                         (string-take base 2) "/"
                                         (string-drop base 2)))
                 (log.bz2 (string-append log ".bz2")))
-- 
GitLab