aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-07-19 18:07:17 +0200
committerRobert Hensing <robert@roberthensing.nl>2021-07-19 18:10:10 +0200
commitad24921de8075073af9106e74e3559a1d234bcc5 (patch)
tree8a34549669f7a4d7481933eedac62ec45a4fdfe4 /src/nix
parent58cb411db628e6e8db9c789f431c8622615f3221 (diff)
Rename findDerivationFilename -> findPackageFilename
It does not operate on a derivation and does not return a derivation path. Instead it works at the language level, where a distinct term "package" is more appropriate to distinguish the parent object of `meta.position`; an attribute which doesn't even make it into the derivation.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/edit.cc2
-rw-r--r--src/nix/repl.cc2
2 files changed, 2 insertions, 2 deletions
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..5d3dbbcd9 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -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