4N5APGRGHTKFMEJ7THSJX6TSYYAP3BUZQG73AJBKCQLXOOEHPATQC
NIX = /home/eelco/Dev/nix/inst
ATERM = /home/eelco/Dev/nix/externals/inst-aterm
eval-jobs: eval-jobs.cc
libtool --mode=link g++ -o eval-jobs eval-jobs.cc -I$(NIX)/include/nix -I$(ATERM)/include -L$(NIX)/lib/nix/ -lmain -lexpr -L$(ATERM)/lib -lATerm
#include <map>
#include <iostream>
#include "shared.hh"
#include "store-api.hh"
#include "eval.hh"
#include "parser.hh"
#include "expr-to-xml.hh"
using namespace nix;
void printHelp()
{
std::cout << "Syntax: eval-jobs <expr>\n";
}
void run(Strings args)
{
EvalState state;
Path releaseExpr;
for (Strings::iterator i = args.begin(); i != args.end(); ) {
string arg = *i++;
if (arg[0] == '-')
throw UsageError(format("unknown flag `%1%'") % arg);
else
releaseExpr = arg;
}
store = openStore();
Expr e = evalExpr(state, parseExprFromFile(state, releaseExpr));
PathSet context;
printTermAsXML(e, std::cout, context);
}
string programId = "eval-jobs";