Use evalFile() instead of parseExprFromFile()

This commit is contained in:
Eelco Dolstra 2013-09-06 15:17:27 +00:00
parent 351a026c4e
commit 5078730cb5
3 changed files with 3 additions and 4 deletions

View file

@ -67,7 +67,7 @@ LDFLAGS="$LDFLAGS -L$nix/lib/nix"
AC_CHECK_HEADER([store-api.hh], [:], AC_CHECK_HEADER([store-api.hh], [:],
[AC_MSG_ERROR([Nix headers not found; please install Nix or check the `--with-nix' option.])]) [AC_MSG_ERROR([Nix headers not found; please install Nix or check the `--with-nix' option.])])
AC_CHECK_LIB([expr], [_ZN3nix9EvalState17parseExprFromFileERKSs], [:], AC_CHECK_LIB([expr], [_ZN3nix9EvalState8evalFileERKSsRNS_5ValueE], [:],
[AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])]) [AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])])
CPPFLAGS="$old_CPPFLAGS" CPPFLAGS="$old_CPPFLAGS"

View file

@ -34,7 +34,7 @@ in rec {
''; '';
configureFlags = configureFlags =
[ "--with-nix=${nix}" [ "--with-nix=${nixUnstable}"
"--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook"
]; ];

View file

@ -284,9 +284,8 @@ void run(Strings args)
store = openStore(); store = openStore();
Expr * e = state.parseExprFromFile(releaseExpr);
Value v; Value v;
state.mkThunk_(v, e); state.evalFile(releaseExpr, v);
XMLWriter doc(true, std::cout); XMLWriter doc(true, std::cout);
XMLOpenElement root(doc, "jobs"); XMLOpenElement root(doc, "jobs");