From cfc874ee52008f523a86b5079243deabaecb62e4 Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Tue, 16 Feb 2016 18:40:45 -0600 Subject: [PATCH] Open the store before constructing EvalState. EvalState requires the `store` global to be initialized before it is constructed in some cases, e.g. when it needs to download a tarball for something in NIX_PATH. Hence, this fixes #13. --- nix-repl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nix-repl.cc b/nix-repl.cc index 1077f5d8f..cdf6a79e9 100644 --- a/nix-repl.cc +++ b/nix-repl.cc @@ -78,8 +78,6 @@ NixRepl::NixRepl(const Strings & searchPath) , staticEnv(false, &state.staticBaseEnv) { curDir = absPath("."); - - store = openStore(); } @@ -622,6 +620,7 @@ int main(int argc, char * * argv) return true; }); + store = openStore(); NixRepl repl(searchPath); repl.mainLoop(files); });