aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-10 20:47:25 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-15 09:03:37 -0400
commit8e1a99026887ee836a68ae3e238fb0f2e1562447 (patch)
treec543e766224eebf21ad6d5a45516a05bfab5b725 /src/libexpr/eval.hh
parent0a9afce3b9191d71347a572a89e90167ba50c854 (diff)
Expose `mkOutputString` as method of `EvalState`
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index bb3ac2b22..3b2164a19 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -576,12 +576,37 @@ public:
void mkThunk_(Value & v, Expr * expr);
void mkPos(Value & v, PosIdx pos);
- /* Create a string representing a store path.
-
- The string is the printed store path with a context containing a single
- `Opaque` element of that store path. */
+ /**
+ * Create a string representing a store path.
+ *
+ * The string is the printed store path with a context containing a single
+ * `NixStringContextElem::Opaque` element of that store path.
+ */
void mkStorePathString(const StorePath & storePath, Value & v);
+ /**
+ * Create a string representing a `DerivedPath::Built`.
+ *
+ * The string is the printed store path with a context containing a single
+ * `NixStringContextElem::Built` element of the drv path and output name.
+ *
+ * @param value Value we are settings
+ *
+ * @param drvPath Path the drv whose output we are making a string for
+ *
+ * @param outputName Name of the output
+ *
+ * @param optOutputPath Optional output path for that string. Must
+ * be passed if and only if output store object is input-addressed.
+ * Will be printed to form string if passed, otherwise a placeholder
+ * will be used (see `downstreamPlaceholder()`).
+ */
+ void mkOutputString(
+ Value & value,
+ const StorePath & drvPath,
+ const std::string outputName,
+ std::optional<StorePath> optOutputPath);
+
void concatLists(Value & v, size_t nrLists, Value * * lists, const PosIdx pos, std::string_view errorCtx);
/**