From 4494000e04122f24558e1436e66d20d89028b4bd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 Jun 2016 15:08:18 +0200 Subject: LocalStore: Allow the physical and logical store directories to differ This is primarily to subsume the functionality of the copy-from-other-stores substituter. For example, in the NixOS installer, we can now do (assuming we're in the target chroot, and the Nix store of the installation CD is bind-mounted on /tmp/nix): $ nix-build ... --option substituters 'local?state=/tmp/nix/var&real=/tmp/nix/store' However, unlike copy-from-other-stores, this also allows write access to such a store. One application might be fetching substitutes for /nix/store in a situation where the user doesn't have sufficient privileges to create /nix, e.g.: $ NIX_REMOTE="local?state=/home/alice/nix/var&real=/home/alice/nix/store" nix-build ... --- src/libstore/local-store.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libstore/local-store.hh') diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 5166c04e5319..3a2568ec9479 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -73,10 +73,12 @@ private: Sync _state; + const Path realStoreDir; const Path dbDir; const Path linksDir; const Path reservedPath; const Path schemaPath; + const Path trashDir; bool requireSigs; -- cgit 1.4.1