aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 1485dc7fe..ab4d2bc4b 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -4,13 +4,13 @@
#include "value.hh"
#include "nixexpr.hh"
#include "symbol-table.hh"
-#include "hash.hh"
#include "config.hh"
#include <regex>
#include <map>
#include <optional>
#include <unordered_map>
+#include <mutex>
namespace nix {
@@ -74,7 +74,8 @@ public:
sSystem, sOverrides, sOutputs, sOutputName, sIgnoreNulls,
sFile, sLine, sColumn, sFunctor, sToString,
sRight, sWrong, sStructuredAttrs, sBuilder, sArgs,
- sOutputHash, sOutputHashAlgo, sOutputHashMode;
+ sOutputHash, sOutputHashAlgo, sOutputHashMode,
+ sDescription, sSelf;
Symbol sDerivationNix;
/* If set, force copying files to the Nix store even if they
@@ -89,6 +90,7 @@ public:
const ref<Store> store;
+
private:
SrcToStore srcToStore;
@@ -151,8 +153,9 @@ public:
Expr * parseStdin();
/* Evaluate an expression read from the given file to normal
- form. */
- void evalFile(const Path & path, Value & v);
+ form. Optionally enforce that the top-level expression is
+ trivial (i.e. doesn't require arbitrary computation). */
+ void evalFile(const Path & path, Value & v, bool mustBeTrivial = false);
void resetFileCache();
@@ -324,6 +327,7 @@ private:
/* Return a string representing the type of the value `v'. */
+string showType(ValueType type);
string showType(const Value & v);
/* Decode a context string ‘!<name>!<path>’ into a pair <path,