diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-07-25T13·09+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-07-26T15·29+0200 |
commit | 4c9ff89c261d84dcc4f88a79654daff2f4790e66 (patch) | |
tree | 0a66471c1e3c53d35d583972bc504273301d4ef6 /src/nix-instantiate | |
parent | c94f3d5575d7af5403274d1e9e2f3c9d72989751 (diff) |
nix-build/nix-shell: Eliminate call to nix-instantiate / nix-store
Note that this removes the need for a derivation symlink, so the --drv-path and --add-drv-link flags now do nothing.
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index a5d12c1466f7..49a14cb64458 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -17,13 +17,6 @@ using namespace nix; -static Expr * parseStdin(EvalState & state) -{ - //Activity act(*logger, lvlTalkative, format("parsing standard input")); - return state.parseExprFromString(drainFD(0), absPath(".")); -} - - static Path gcRoot; static int rootNr = 0; static bool indirectRoot = false; @@ -166,7 +159,7 @@ int main(int argc, char * * argv) Bindings & autoArgs(*evalAutoArgs(state, autoArgs_)); - if (attrPaths.empty()) attrPaths.push_back(""); + if (attrPaths.empty()) attrPaths = {""}; if (findFile) { for (auto & i : files) { @@ -178,7 +171,7 @@ int main(int argc, char * * argv) } if (readStdin) { - Expr * e = parseStdin(state); + Expr * e = state.parseStdin(); processExpr(state, attrPaths, parseOnly, strict, autoArgs, evalOnly, outputKind, xmlOutputSourceLocation, e); } else if (files.empty() && !fromArgs) |