aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-fs-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-02 13:33:49 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-02 16:02:48 +0200
commit812c0dfbe24c8fe93992f77abbf1e5a975ea42f4 (patch)
treed69bcc87ce446f270f6b01f7069655223d52a626 /src/libstore/local-fs-store.cc
parentf2682e6e18a76ecbfb8a12c17e3a0ca15c084197 (diff)
Allow setting the state directory as a store parameter
E.g. "local?store=/tmp/store&state=/tmp/var".
Diffstat (limited to 'src/libstore/local-fs-store.cc')
-rw-r--r--src/libstore/local-fs-store.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc
index ea9c6b541..a19e4ce5d 100644
--- a/src/libstore/local-fs-store.cc
+++ b/src/libstore/local-fs-store.cc
@@ -1,9 +1,16 @@
#include "archive.hh"
#include "fs-accessor.hh"
#include "store-api.hh"
+#include "globals.hh"
namespace nix {
+LocalFSStore::LocalFSStore(const Params & params)
+ : Store(params)
+ , stateDir(get(params, "state", settings.nixStateDir))
+{
+}
+
struct LocalStoreAccessor : public FSAccessor
{
ref<Store> store;