Merge pull request #2250 from dtzWill/feature/repl-progress-bar-builds

repl: use `nix build` for building instead of `nix-store -r`
This commit is contained in:
Eelco Dolstra 2018-07-06 21:36:37 +02:00 committed by GitHub
commit aa64e95bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -385,7 +385,7 @@ bool NixRepl::processLine(string line)
/* We could do the build in this process using buildPaths(), /* We could do the build in this process using buildPaths(),
but doing it in a child makes it easier to recover from but doing it in a child makes it easier to recover from
problems / SIGINT. */ problems / SIGINT. */
if (runProgram(settings.nixBinDir + "/nix-store", Strings{"-r", drvPath}) == 0) { if (runProgram(settings.nixBinDir + "/nix", Strings{"build", drvPath}) == 0) {
Derivation drv = readDerivation(drvPath); Derivation drv = readDerivation(drvPath);
std::cout << std::endl << "this derivation produced the following outputs:" << std::endl; std::cout << std::endl << "this derivation produced the following outputs:" << std::endl;
for (auto & i : drv.outputs) for (auto & i : drv.outputs)