diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-19 20:15:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 20:15:17 +0200 |
commit | 1af3f63be53018ab764090acab36e7c5401609cd (patch) | |
tree | f28df9f10d9a4f51173e7959e8c68356fe944a23 | |
parent | def94953c9daffddd589d997e6491c4106304bd1 (diff) | |
parent | 3bbf5558e00e816fae0a78ff54249646ea1bac4e (diff) |
Merge pull request #5028 from hercules-ci/edit-package-not-derivation
nix repl: Update :edit doc to remove inaccurate use of "derivation"
-rw-r--r-- | src/libexpr/attr-path.cc | 2 | ||||
-rw-r--r-- | src/libexpr/attr-path.hh | 2 | ||||
-rw-r--r-- | src/nix/edit.cc | 2 | ||||
-rw-r--r-- | src/nix/repl.cc | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc index 867eb13a5..c50c6d92b 100644 --- a/src/libexpr/attr-path.cc +++ b/src/libexpr/attr-path.cc @@ -100,7 +100,7 @@ std::pair<Value *, Pos> findAlongAttrPath(EvalState & state, const string & attr } -Pos findDerivationFilename(EvalState & state, Value & v, std::string what) +Pos findPackageFilename(EvalState & state, Value & v, std::string what) { Value * v2; try { diff --git a/src/libexpr/attr-path.hh b/src/libexpr/attr-path.hh index d9d74ab2d..2ee3ea089 100644 --- a/src/libexpr/attr-path.hh +++ b/src/libexpr/attr-path.hh @@ -14,7 +14,7 @@ std::pair<Value *, Pos> findAlongAttrPath(EvalState & state, const string & attr Bindings & autoArgs, Value & vIn); /* Heuristic to find the filename and lineno or a nix value. */ -Pos findDerivationFilename(EvalState & state, Value & v, std::string what); +Pos findPackageFilename(EvalState & state, Value & v, std::string what); std::vector<Symbol> parseAttrPath(EvalState & state, std::string_view s); diff --git a/src/nix/edit.cc b/src/nix/edit.cc index b26417b18..fc48db0d7 100644 --- a/src/nix/edit.cc +++ b/src/nix/edit.cc @@ -31,7 +31,7 @@ struct CmdEdit : InstallableCommand auto [v, pos] = installable->toValue(*state); try { - pos = findDerivationFilename(*state, *v, installable->what()); + pos = findPackageFilename(*state, *v, installable->what()); } catch (NoPositionInfo &) { } diff --git a/src/nix/repl.cc b/src/nix/repl.cc index bf3b2c401..07bbd461f 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -412,7 +412,7 @@ bool NixRepl::processLine(string line) << " <x> = <expr> Bind expression to variable\n" << " :a <expr> Add attributes from resulting set to scope\n" << " :b <expr> Build derivation\n" - << " :e <expr> Open the derivation in $EDITOR\n" + << " :e <expr> Open package or function in $EDITOR\n" << " :i <expr> Build derivation, then install result into current profile\n" << " :l <path> Load Nix expression and add it to scope\n" << " :p <expr> Evaluate and print expression recursively\n" @@ -454,7 +454,7 @@ bool NixRepl::processLine(string line) pos = v.lambda.fun->pos; } else { // assume it's a derivation - pos = findDerivationFilename(*state, v, arg); + pos = findPackageFilename(*state, v, arg); } // Open in EDITOR |