1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

Allow setting the state directory as a store parameter

E.g. "local?store=/tmp/store&state=/tmp/var".
This commit is contained in:
Eelco Dolstra 2016-06-02 13:33:49 +02:00
parent f2682e6e18
commit 812c0dfbe2
13 changed files with 112 additions and 77 deletions

View file

@ -372,10 +372,6 @@ public:
`path' has disappeared. */
virtual void addIndirectRoot(const Path & path) = 0;
/* Register a permanent GC root. */
Path addPermRoot(const Path & storePath,
const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false);
/* Acquire the global GC lock, then immediately release it. This
function must be called after registering a new permanent root,
but before exiting. Otherwise, it is possible that a running
@ -494,11 +490,17 @@ protected:
class LocalFSStore : public Store
{
protected:
using Store::Store;
public:
const Path stateDir;
LocalFSStore(const Params & params);
void narFromPath(const Path & path, Sink & sink) override;
ref<FSAccessor> getFSAccessor() override;
/* Register a permanent GC root. */
Path addPermRoot(const Path & storePath,
const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false);
};