From c94f3d5575d7af5403274d1e9e2f3c9d72989751 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 20 Jul 2017 13:32:01 +0200 Subject: nix-shell: Use bashInteractive from This adds about 0.1s to nix-shell runtime in the case where bashInteractive already exists. See discussion at https://github.com/NixOS/nixpkgs/issues/27493. --- src/nix/repl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nix/repl.cc') diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 437c7903ed40..7d5b8f4668af 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -292,10 +292,10 @@ bool isVarName(const string & s) Path NixRepl::getDerivationPath(Value & v) { - DrvInfo drvInfo(state); - if (!getDerivation(state, v, drvInfo, false)) + auto drvInfo = getDerivation(state, v, false); + if (!drvInfo) throw Error("expression does not evaluate to a derivation, so I can't build it"); - Path drvPath = drvInfo.queryDrvPath(); + Path drvPath = drvInfo->queryDrvPath(); if (drvPath == "" || !state.store->isValidPath(drvPath)) throw Error("expression did not evaluate to a valid derivation"); return drvPath; -- cgit 1.4.1