about summary refs log tree commit diff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-20T11·32+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-20T11·50+0200
commitc94f3d5575d7af5403274d1e9e2f3c9d72989751 (patch)
treed6a302d585ed8f38a8a8d959b74bee44b7d77370 /src/nix
parent57a30e101b36a064f09619bf4a3f0b8a3fdcdcad (diff)
nix-shell: Use bashInteractive from <nixpkgs>
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.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/repl.cc6
1 files changed, 3 insertions, 3 deletions
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;