aboutsummaryrefslogtreecommitdiff
path: root/src/nix/app.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-05 12:16:17 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-16 20:06:46 -0400
commitc998e0172f31fd5707a8361962ec99b3ff9b1b10 (patch)
treec8556e4e261fb80faebe66558b5bcccf92d1b26f /src/nix/app.cc
parentacd707acca8acbc276af5181c7724c70a6a69ad5 (diff)
Move value-only methods to `InstallableValue`
These methods would previously fail on the other `Installable`s, so moving them to this class is more correct as to where they actually work. Additionally, a `InstallableValueCommand` is created to make it easier (or rather no worse than before) to write commands that just work on `InstallableValue`s. Besides being a cleanup to avoid failing default methods, this gets us closer to https://github.com/NixOS/rfcs/pull/134.
Diffstat (limited to 'src/nix/app.cc')
-rw-r--r--src/nix/app.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/app.cc b/src/nix/app.cc
index bfd75e278..fd4569bb4 100644
--- a/src/nix/app.cc
+++ b/src/nix/app.cc
@@ -1,5 +1,6 @@
#include "installables.hh"
#include "installable-derived-path.hh"
+#include "installable-value.hh"
#include "store-api.hh"
#include "eval-inline.hh"
#include "eval-cache.hh"
@@ -40,7 +41,7 @@ std::string resolveString(
return rewriteStrings(toResolve, rewrites);
}
-UnresolvedApp Installable::toApp(EvalState & state)
+UnresolvedApp InstallableValue::toApp(EvalState & state)
{
auto cursor = getCursor(state);
auto attrPath = cursor->getAttrPath();