1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

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.
This commit is contained in:
Eelco Dolstra 2017-07-20 13:32:01 +02:00
parent 57a30e101b
commit c94f3d5575
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 54 additions and 13 deletions

View file

@ -267,15 +267,14 @@ static bool getDerivation(EvalState & state, Value & v,
}
bool getDerivation(EvalState & state, Value & v, DrvInfo & drv,
std::experimental::optional<DrvInfo> getDerivation(EvalState & state, Value & v,
bool ignoreAssertionFailures)
{
Done done;
DrvInfos drvs;
getDerivation(state, v, "", drvs, done, ignoreAssertionFailures);
if (drvs.size() != 1) return false;
drv = drvs.front();
return true;
if (drvs.size() != 1) return {};
return std::move(drvs.front());
}