aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installable-attr-path.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-28 11:34:34 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-02-28 11:34:34 -0500
commitd12f57c2c0ef32180875aa4a0b803c838a7d988f (patch)
tree2c046d98bc0bd9171881ff0b6d56fa89c7c642e6 /src/libcmd/installable-attr-path.hh
parentc36b584f8eb103afa152ef4304cf9fd5c3ebaaf0 (diff)
parent4489def1b36aeaee2254159efc1c21c868cc8585 (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libcmd/installable-attr-path.hh')
-rw-r--r--src/libcmd/installable-attr-path.hh56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/libcmd/installable-attr-path.hh b/src/libcmd/installable-attr-path.hh
new file mode 100644
index 000000000..c06132ec8
--- /dev/null
+++ b/src/libcmd/installable-attr-path.hh
@@ -0,0 +1,56 @@
+#include "globals.hh"
+#include "installable-value.hh"
+#include "outputs-spec.hh"
+#include "util.hh"
+#include "command.hh"
+#include "attr-path.hh"
+#include "common-eval-args.hh"
+#include "derivations.hh"
+#include "eval-inline.hh"
+#include "eval.hh"
+#include "get-drvs.hh"
+#include "store-api.hh"
+#include "shared.hh"
+#include "eval-cache.hh"
+#include "url.hh"
+#include "registry.hh"
+#include "build-result.hh"
+
+#include <regex>
+#include <queue>
+
+#include <nlohmann/json.hpp>
+
+namespace nix {
+
+class InstallableAttrPath : public InstallableValue
+{
+ SourceExprCommand & cmd;
+ RootValue v;
+ std::string attrPath;
+ ExtendedOutputsSpec extendedOutputsSpec;
+
+ InstallableAttrPath(
+ ref<EvalState> state,
+ SourceExprCommand & cmd,
+ Value * v,
+ const std::string & attrPath,
+ ExtendedOutputsSpec extendedOutputsSpec);
+
+ std::string what() const override { return attrPath; };
+
+ std::pair<Value *, PosIdx> toValue(EvalState & state) override;
+
+ DerivedPathsWithInfo toDerivedPaths() override;
+
+public:
+
+ static InstallableAttrPath parse(
+ ref<EvalState> state,
+ SourceExprCommand & cmd,
+ Value * v,
+ std::string_view prefix,
+ ExtendedOutputsSpec extendedOutputsSpec);
+};
+
+}