about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-11-27T19·20-0500
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-05T12·55+0100
commit14080f3e4b9e7c45754b9750424250cadcc066e1 (patch)
tree5fc8eb6939cdffa357231544dc6c7dcebe9ae484 /src/libexpr/eval.hh
parent6298afc0478222eb0d5e57eaafe46965a1df7ca3 (diff)
Use __toString when coercing sets to strings.
For example, "${{ foo = "bar"; __toString = x: x.foo; }}" evaluates
to "bar".

With this, we can delay calling functions like mkDerivation,
buildPythonPackage, etc. until we actually need a derivation, enabling
overrides and other modifications to happen by simple attribute set
update.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index eb55f6d4d431..2d7b7bcdcb62 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -69,7 +69,7 @@ public:
 
     const Symbol sWith, sOutPath, sDrvPath, sType, sMeta, sName, sValue,
         sSystem, sOverrides, sOutputs, sOutputName, sIgnoreNulls,
-        sFile, sLine, sColumn, sFunctor;
+        sFile, sLine, sColumn, sFunctor, sToString;
     Symbol sDerivationNix;
 
     /* If set, force copying files to the Nix store even if they