diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-06-18 17:04:11 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-06-18 17:04:11 +0200 |
commit | 4202a3bc4e7ce687be245539f6d796226f7d9e37 (patch) | |
tree | 5831b2c010ecf1d46e3e53147a64159992577566 /src/libstore/optimise-store.cc | |
parent | e6150de90d8db101209fc6363f5f7696ee8192c4 (diff) |
UDSRemoteStore: Support the 'root' store parameter
Useful when we're using a daemon with a chroot store, e.g.
$ NIX_DAEMON_SOCKET_PATH=/tmp/chroot/nix/var/nix/daemon-socket/socket nix-daemon --store /tmp/chroot
Then the client can now connect with
$ nix build --store unix:///tmp/chroot/nix/var/nix/daemon-socket/socket?root=/tmp/chroot nixpkgs#hello
Diffstat (limited to 'src/libstore/optimise-store.cc')
-rw-r--r-- | src/libstore/optimise-store.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc index 78d587139..d95e54af1 100644 --- a/src/libstore/optimise-store.cc +++ b/src/libstore/optimise-store.cc @@ -198,7 +198,7 @@ void LocalStore::optimisePath_(Activity * act, OptimiseStats & stats, /* Make the containing directory writable, but only if it's not the store itself (we don't want or need to mess with its permissions). */ - bool mustToggle = dirOf(path) != realStoreDir; + bool mustToggle = dirOf(path) != realStoreDir.get(); if (mustToggle) makeWritable(dirOf(path)); /* When we're done, make the directory read-only again and reset |