aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.hh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-05-17 17:49:20 +0200
committerregnat <rg@regnat.ovh>2021-05-17 17:50:41 +0200
commitca96f5219489c1002499bfe2c580fdd458219144 (patch)
treed4b0f564f5a5da65900ab51babf5c85cc328d15e /src/libcmd/installables.hh
parentbd6cf25952a42afabea822141798566e0f0583b3 (diff)
Split the parsing of an `App` and its resolving
That way things (like `nix flake check`) can evaluate the `app` outputs without having to build anything
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r--src/libcmd/installables.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh
index 16bc4ae68..298fd48f8 100644
--- a/src/libcmd/installables.hh
+++ b/src/libcmd/installables.hh
@@ -23,6 +23,12 @@ struct App
// FIXME: add args, sandbox settings, metadata, ...
};
+struct UnresolvedApp
+{
+ App unresolved;
+ App resolve(ref<Store>);
+};
+
struct Installable
{
virtual ~Installable() { }
@@ -33,7 +39,7 @@ struct Installable
DerivedPath toDerivedPath();
- App toApp(EvalState & state);
+ UnresolvedApp toApp(EvalState & state);
virtual std::pair<Value *, Pos> toValue(EvalState & state)
{