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

* Refactoring: move parseExprFromFile() and parseExprFromString() into

the EvalState class.
This commit is contained in:
Eelco Dolstra 2011-08-06 13:02:55 +00:00
parent c8606664ab
commit 54945a2950
10 changed files with 37 additions and 52 deletions

View file

@ -5,7 +5,6 @@
#include "util.hh"
#include "archive.hh"
#include "value-to-xml.hh"
#include "parser.hh"
#include "names.hh"
#include <sys/types.h>
@ -1059,7 +1058,7 @@ void EvalState::createBaseEnv()
/* Add a wrapper around the derivation primop that computes the
`drvPath' and `outPath' attributes lazily. */
string s = "attrs: let res = derivationStrict attrs; in attrs // { drvPath = res.drvPath; outPath = res.outPath; type = \"derivation\"; }";
mkThunk_(v, parseExprFromString(*this, s, "/"));
mkThunk_(v, parseExprFromString(s, "/"));
addConstant("derivation", v);
// Paths