From 114f8a26ee4ef3e9443c2bbbe83434622ef73ef9 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 16 Jun 2014 12:24:17 -0400 Subject: [PATCH] Fix build for new nixUnstable --- configure.ac | 2 +- src/c/hydra-eval-jobs.cc | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 11a817a2..6e220b56 100644 --- a/configure.ac +++ b/configure.ac @@ -69,7 +69,7 @@ LDFLAGS="$LDFLAGS -L$nix/lib" AC_CHECK_HEADER([store-api.hh], [:], [AC_MSG_ERROR([Nix headers not found; please install Nix or check the `--with-nix' option.])]) -AC_CHECK_LIB([nixexpr], [_ZN3nix9EvalState8evalFileERKSsRNS_5ValueE], [:], +AC_CHECK_LIB([nixexpr], [_ZN3nix9EvalStateC1ERKSt4listISsSaISsEE], [:], [AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])]) CPPFLAGS="$old_CPPFLAGS" diff --git a/src/c/hydra-eval-jobs.cc b/src/c/hydra-eval-jobs.cc index 21ca3917..8ade484f 100644 --- a/src/c/hydra-eval-jobs.cc +++ b/src/c/hydra-eval-jobs.cc @@ -233,7 +233,16 @@ void run(Strings args) $NIX_PATH. */ unsetenv("NIX_PATH"); - EvalState state; + /* FIXME: hack */ + Strings searchPath; + Strings args2; + for (Strings::iterator i = args.begin(); i != args.end(); ) { + string arg = *i++; + if (!parseSearchPathArg(arg, i, args.end(), searchPath)) + args2.push_back(arg); + } + args = args2; + EvalState state(searchPath); Path releaseExpr; AutoArgs autoArgs; @@ -259,8 +268,6 @@ void run(Strings args) if (i == args.end()) throw UsageError("missing argument"); gcRootsDir = *i++; } - else if (parseSearchPathArg(arg, i, args.end(), state)) - ; else if (arg[0] == '-') throw UsageError(format("unknown flag `%1%'") % arg); else