1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

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.
This commit is contained in:
Shea Levy 2015-11-27 14:20:29 -05:00 committed by Eelco Dolstra
parent 6298afc047
commit 14080f3e4b
2 changed files with 10 additions and 2 deletions

View file

@ -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