aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-03 14:53:40 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-20 09:09:11 -0500
commitfa4733fce5e473901ccb5dfd08593c861a4e1f0e (patch)
tree304e785e20d772a81ef5b6e0a592d448e5e4a8ca /src/libcmd/installables.hh
parentde714833f1f874690452bd55e5a72ae73e45f076 (diff)
Split out `InstallableFlake` and `InstallableAttrPath`
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r--src/libcmd/installables.hh50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh
index da6a3addd..be77fdc81 100644
--- a/src/libcmd/installables.hh
+++ b/src/libcmd/installables.hh
@@ -161,54 +161,4 @@ struct Installable
typedef std::vector<std::shared_ptr<Installable>> Installables;
-struct InstallableValue : Installable
-{
- ref<EvalState> state;
-
- InstallableValue(ref<EvalState> state) : state(state) {}
-};
-
-struct InstallableFlake : InstallableValue
-{
- FlakeRef flakeRef;
- Strings attrPaths;
- Strings prefixes;
- ExtendedOutputsSpec extendedOutputsSpec;
- const flake::LockFlags & lockFlags;
- mutable std::shared_ptr<flake::LockedFlake> _lockedFlake;
-
- InstallableFlake(
- SourceExprCommand * cmd,
- ref<EvalState> state,
- FlakeRef && flakeRef,
- std::string_view fragment,
- ExtendedOutputsSpec extendedOutputsSpec,
- Strings attrPaths,
- Strings prefixes,
- const flake::LockFlags & lockFlags);
-
- std::string what() const override { return flakeRef.to_string() + "#" + *attrPaths.begin(); }
-
- std::vector<std::string> getActualAttrPaths();
-
- Value * getFlakeOutputs(EvalState & state, const flake::LockedFlake & lockedFlake);
-
- DerivedPathsWithInfo toDerivedPaths() override;
-
- std::pair<Value *, PosIdx> toValue(EvalState & state) override;
-
- /* Get a cursor to every attrpath in getActualAttrPaths()
- that exists. However if none exists, throw an exception. */
- std::vector<ref<eval_cache::AttrCursor>>
- getCursors(EvalState & state) override;
-
- std::shared_ptr<flake::LockedFlake> getLockedFlake() const;
-
- FlakeRef nixpkgsFlakeRef() const override;
-};
-
-ref<eval_cache::EvalCache> openEvalCache(
- EvalState & state,
- std::shared_ptr<flake::LockedFlake> lockedFlake);
-
}