aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-06-18 17:04:11 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-06-18 17:04:11 +0200
commit4202a3bc4e7ce687be245539f6d796226f7d9e37 (patch)
tree5831b2c010ecf1d46e3e53147a64159992577566 /src/nix/run.cc
parente6150de90d8db101209fc6363f5f7696ee8192c4 (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/nix/run.cc')
-rw-r--r--src/nix/run.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index f684c5ea4..c0ba05a3e 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -43,8 +43,8 @@ struct RunCommon : virtual Command
helper program (chrootHelper() below) to do the work. */
auto store2 = store.dynamic_pointer_cast<LocalStore>();
- if (store2 && store->storeDir != store2->realStoreDir) {
- Strings helperArgs = { chrootHelperName, store->storeDir, store2->realStoreDir, program };
+ if (store2 && store->storeDir != store2->getRealStoreDir()) {
+ Strings helperArgs = { chrootHelperName, store->storeDir, store2->getRealStoreDir(), program };
for (auto & arg : args) helperArgs.push_back(arg);
execv(readLink("/proc/self/exe").c_str(), stringsToCharPtrs(helperArgs).data());