forked from lix-project/hydra
* Export all relevant info about the derivation.
This commit is contained in:
parent
55b8190fde
commit
f9d4957f2f
|
@ -8,6 +8,7 @@
|
||||||
#include "nixexpr-ast.hh"
|
#include "nixexpr-ast.hh"
|
||||||
#include "util.hh"
|
#include "util.hh"
|
||||||
#include "xml-writer.hh"
|
#include "xml-writer.hh"
|
||||||
|
#include "get-drvs.hh"
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
||||||
|
@ -40,21 +41,23 @@ static void findJobs(EvalState & state, XMLWriter & doc,
|
||||||
ATermMap attrs;
|
ATermMap attrs;
|
||||||
queryAllAttrs(e, attrs);
|
queryAllAttrs(e, attrs);
|
||||||
|
|
||||||
Expr a = evalAttr(state, attrs.get(toATerm("type")));
|
DrvInfo drv;
|
||||||
if (a && matchStr(a, s, context) && s == "derivation") {
|
|
||||||
|
if (getDerivation(state, e, drv)) {
|
||||||
std::cerr << "derivation\n";
|
std::cerr << "derivation\n";
|
||||||
|
|
||||||
XMLAttrs xmlAttrs;
|
XMLAttrs xmlAttrs;
|
||||||
Path outPath, drvPath;
|
Path outPath, drvPath;
|
||||||
|
|
||||||
xmlAttrs["name"] = attrPath;
|
xmlAttrs["name"] = attrPath;
|
||||||
|
xmlAttrs["system"] = drv.system;
|
||||||
a = evalAttr(state, attrs.get(toATerm("drvPath")));
|
xmlAttrs["drvPath"] = drv.queryDrvPath(state);
|
||||||
if (matchStr(a, drvPath, context)) xmlAttrs["drvPath"] = drvPath;
|
xmlAttrs["outPath"] = drv.queryOutPath(state);
|
||||||
|
xmlAttrs["description"] = drv.queryMetaInfo(state, "description");
|
||||||
|
xmlAttrs["longDescription"] = drv.queryMetaInfo(state, "longDescription");
|
||||||
|
xmlAttrs["license"] = drv.queryMetaInfo(state, "license");
|
||||||
|
xmlAttrs["homepage"] = drv.queryMetaInfo(state, "homepage");
|
||||||
|
|
||||||
a = evalAttr(state, attrs.get(toATerm("outPath")));
|
|
||||||
if (matchStr(a, outPath, context)) xmlAttrs["outPath"] = outPath;
|
|
||||||
|
|
||||||
XMLOpenElement _(doc, "job", xmlAttrs);
|
XMLOpenElement _(doc, "job", xmlAttrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue