Nix::Store::derivationFromPath: Return derivation outputs
This commit is contained in:
parent
d6143801fd
commit
8add116acd
1 changed files with 12 additions and 9 deletions
|
@ -238,7 +238,10 @@ SV * derivationFromPath(char * drvPath)
|
||||||
Derivation drv = derivationFromPath(*store, drvPath);
|
Derivation drv = derivationFromPath(*store, drvPath);
|
||||||
hash = newHV();
|
hash = newHV();
|
||||||
|
|
||||||
/* TODO: handle drv.outputs */
|
HV * outputs = newHV();
|
||||||
|
for (DerivationOutputs::iterator i = drv.outputs.begin(); i != drv.outputs.end(); ++i)
|
||||||
|
hv_store(outputs, i->first.c_str(), i->first.size(), newSVpv(i->second.path.c_str(), 0), 0);
|
||||||
|
hv_stores(hash, "outputs", newRV((SV *) outputs));
|
||||||
|
|
||||||
AV * inputDrvs = newAV();
|
AV * inputDrvs = newAV();
|
||||||
for (DerivationInputs::iterator i = drv.inputDrvs.begin(); i != drv.inputDrvs.end(); ++i)
|
for (DerivationInputs::iterator i = drv.inputDrvs.begin(); i != drv.inputDrvs.end(); ++i)
|
||||||
|
|
Loading…
Reference in a new issue