aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-15 14:28:33 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-07-22 09:59:51 +0200
commit2ff3035cf4d5167d180878d69cb47b31890a24c4 (patch)
tree3d081690249c1cd460fb7d58fdf0214735dea4c6 /src/nix-build
parent3d9de41a5b86520ff0c994dc7ac1023d2a441083 (diff)
Support --eval-store in nix-instantiate and nix-build
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 29be46cf5..4305c0ac1 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -250,8 +250,9 @@ static void main_nix_build(int argc, char * * argv)
throw UsageError("'-p' and '-E' are mutually exclusive");
auto store = openStore();
+ auto evalStore = myArgs.evalStoreUrl ? openStore(*myArgs.evalStoreUrl) : store;
- auto state = std::make_unique<EvalState>(myArgs.searchPath, store);
+ auto state = std::make_unique<EvalState>(myArgs.searchPath, evalStore, store);
state->repair = repair;
auto autoArgs = myArgs.getAutoArgs(*state);