From 1d6816f98ca1746f0b627a6dee9c0adbbf7533c4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Jan 2014 21:37:06 +0100 Subject: config: '%store-directory' always honors $NIX_STORE_DIR. * guix/config.scm.in (%store-directory): Honor $NIX_STORE_DIR. * guix/store.scm (%store-prefix): Use %store-directory directly. --- guix/config.scm.in | 3 ++- guix/store.scm | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/config.scm.in b/guix/config.scm.in index 0833faef40..3a5c50e00a 100644 --- a/guix/config.scm.in +++ b/guix/config.scm.in @@ -51,7 +51,8 @@ (define %guix-home-page-url "@PACKAGE_URL@") (define %store-directory - "@storedir@") + (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) + "@storedir@")) (define %state-directory ;; This must match `NIX_STATE_DIR' as defined in `daemon.am'. diff --git a/guix/store.scm b/guix/store.scm index 7715a15644..1012480b39 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -701,8 +701,7 @@ (define* (export-paths server paths port #:key (sign? #t)) (define %store-prefix ;; Absolute path to the Nix store. - (make-parameter (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) - %store-directory))) + (make-parameter %store-directory)) (define (store-path? path) "Return #t if PATH is a store path." -- cgit v1.2.3