Add a "root" parameter to local stores
This makes it easier to create a diverted store, i.e. NIX_REMOTE="local?root=/tmp/root" instead of NIX_REMOTE="local?real=/tmp/root/nix/store&state=/tmp/root/nix/var/nix" NIX_LOG_DIR=/tmp/root/nix/var/log
This commit is contained in:
parent
2fad86f361
commit
3eb6217508
5 changed files with 13 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ namespace nix {
|
|||
|
||||
LocalStore::LocalStore(const Params & params)
|
||||
: LocalFSStore(params)
|
||||
, realStoreDir(get(params, "real", storeDir))
|
||||
, realStoreDir(get(params, "real", rootDir != "" ? rootDir + "/nix/store" : storeDir))
|
||||
, dbDir(stateDir + "/db")
|
||||
, linksDir(realStoreDir + "/.links")
|
||||
, reservedPath(dbDir + "/reserved")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue