From d8eea3d2bce9c9e834210237090947de4600cfe8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 5 Dec 2012 23:02:47 +0100 Subject: build: Capture configure-time settings in (guix config). * configure.ac: Compute and substitute `guix_localstatedir'. * m4/guix.m4: Substitute `guix_system'. * guix/config.scm.in (%store-directory, %store-directory, %system): New variables. * guix/store.scm (%nix-state-dir): Remove. (%default-socket-path): Use %STATE-DIRECTORY as the default. (%store-prefix): Use %STORE-DIRECTORY as the default. * guix/utils.scm (%current-system): Default to %SYSTEM. --- guix/store.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'guix/store.scm') diff --git a/guix/store.scm b/guix/store.scm index 9aafb332dc..3bfb03e6b5 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -18,6 +18,7 @@ (define-module (guix store) #:use-module (guix utils) + #:use-module (guix config) #:use-module (rnrs bytevectors) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) @@ -111,10 +112,9 @@ (define-enumerate-type hash-algo (sha1 2) (sha256 3)) -(define %nix-state-dir - (or (getenv "NIX_STATE_DIR") "/nix/var/nix")) (define %default-socket-path - (string-append %nix-state-dir "/daemon-socket/socket")) + (string-append (or (getenv "NIX_STATE_DIR") %state-directory) + "/daemon-socket/socket")) ;; serialize.cc @@ -439,7 +439,7 @@ (define-operation (add-indirect-root (string file-name)) (define %store-prefix ;; Absolute path to the Nix store. (make-parameter (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) - "/nix/store"))) + %store-directory))) (define (store-path? path) "Return #t if PATH is a store path." -- cgit v1.2.3