forked from lix-project/lix
* Drop the inefficient "Path" suffix in output attribute names.
This commit is contained in:
parent
921111d197
commit
71f3c46cf6
|
@ -7,13 +7,13 @@ let
|
||||||
attrValues = attrs:
|
attrValues = attrs:
|
||||||
map (name: builtins.getAttr name attrs) (builtins.attrNames attrs);
|
map (name: builtins.getAttr name attrs) (builtins.attrNames attrs);
|
||||||
|
|
||||||
outputToAttrListElement = output:
|
outputToAttrListElement = outputName:
|
||||||
{ name = output;
|
{ name = outputName;
|
||||||
value = attrs // {
|
value = attrs // {
|
||||||
outPath = builtins.getAttr (output + "Path") strict;
|
outPath = builtins.getAttr outputName strict;
|
||||||
drvPath = strict.drvPath;
|
drvPath = strict.drvPath;
|
||||||
type = "derivation";
|
type = "derivation";
|
||||||
currentOutput = output;
|
currentOutput = outputName;
|
||||||
} // outputsAttrs // { all = allList; };
|
} // outputsAttrs // { all = allList; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -451,9 +451,7 @@ static void prim_derivationStrict(EvalState & state, Value * * args, Value & v)
|
||||||
state.mkAttrs(v, 1 + drv.outputs.size());
|
state.mkAttrs(v, 1 + drv.outputs.size());
|
||||||
mkString(*state.allocAttr(v, state.sDrvPath), drvPath, singleton<PathSet>("=" + drvPath));
|
mkString(*state.allocAttr(v, state.sDrvPath), drvPath, singleton<PathSet>("=" + drvPath));
|
||||||
foreach (DerivationOutputs::iterator, i, drv.outputs) {
|
foreach (DerivationOutputs::iterator, i, drv.outputs) {
|
||||||
/* The output path of an output X is ‘<X>Path’,
|
mkString(*state.allocAttr(v, state.symbols.create(i->first)),
|
||||||
e.g. ‘outPath’. */
|
|
||||||
mkString(*state.allocAttr(v, state.symbols.create(i->first + "Path")),
|
|
||||||
i->second.path, singleton<PathSet>("!" + i->first + "!" + drvPath));
|
i->second.path, singleton<PathSet>("!" + i->first + "!" + drvPath));
|
||||||
}
|
}
|
||||||
v.attrs->sort();
|
v.attrs->sort();
|
||||||
|
|
Loading…
Reference in a new issue