about summary refs log tree commit diff
path: root/perl/lib
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-11-22T17·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-11-22T17·28+0000
commit993fa94fb489f46e127ef760bea8c65ef281ef7f (patch)
treeaa9072bc840449143362be8657a81092d2384dfa /perl/lib
parent4e1ea17052b4cc2445bc2ece2136f248112b4e45 (diff)
* Move initialisation of variables like nixConfDir from libmain to
  libstore so that the Perl bindings can use it as well.  It's vital
  that the Perl bindings use the configuration file, because otherwise
  nix-copy-closure will fail with a ‘database locked’ message if the
  value of ‘use-sqlite-wal’ is changed from the default.

Diffstat (limited to 'perl/lib')
-rw-r--r--perl/lib/Nix/Store.xs4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index af71ad955c4f..9e51ea337c7e 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -18,10 +18,8 @@ using namespace nix;
 void doInit() 
 {
     if (!store) {
-        nixStore = canonPath(getEnv("NIX_STORE_DIR", getEnv("NIX_STORE", "/nix/store")));
-        nixStateDir = canonPath(getEnv("NIX_STATE_DIR", "/nix/var/nix"));
-        nixDBPath = getEnv("NIX_DB_DIR", nixStateDir + "/db");
         try {
+            setDefaultsFromEnvironment();
             store = openStore();
         } catch (Error & e) {
             croak(e.what());