There's no need to mess with drvPath at all
This commit is contained in:
parent
2ab29be70c
commit
3c3107da86
1 changed files with 4 additions and 6 deletions
|
@ -470,8 +470,8 @@ static void prim_derivationStrict(EvalState & state, Value * * args, Value & v)
|
||||||
drvHashes[drvPath] = hashDerivationModulo(*store, drv);
|
drvHashes[drvPath] = hashDerivationModulo(*store, drv);
|
||||||
|
|
||||||
state.mkAttrs(v, 1 + drv.outputs.size());
|
state.mkAttrs(v, 1 + drv.outputs.size());
|
||||||
|
mkString(*state.allocAttr(v, state.sDrvPath), drvPath, singleton<PathSet>("=" + drvPath));
|
||||||
foreach (DerivationOutputs::iterator, i, drv.outputs) {
|
foreach (DerivationOutputs::iterator, i, drv.outputs) {
|
||||||
mkString(*state.allocAttr(v, state.symbols.create(i->first + "DrvPath")), drvPath, singleton<PathSet>("=" + drvPath));
|
|
||||||
/* The output path of an output X is ‘<X>Path’,
|
/* The output path of an output X is ‘<X>Path’,
|
||||||
e.g. ‘outPath’. */
|
e.g. ‘outPath’. */
|
||||||
mkString(*state.allocAttr(v, state.symbols.create(i->first + "Path")),
|
mkString(*state.allocAttr(v, state.symbols.create(i->first + "Path")),
|
||||||
|
@ -1126,13 +1126,11 @@ void EvalState::createBaseEnv()
|
||||||
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 = output: \
|
||||||
let \
|
{ \
|
||||||
outPath = builtins.getAttr (output + \"Path\") strict; \
|
|
||||||
drvPath = builtins.getAttr (output + \"DrvPath\") strict; \
|
|
||||||
in { \
|
|
||||||
name = output; \
|
name = output; \
|
||||||
value = attrs // { \
|
value = attrs // { \
|
||||||
inherit outPath drvPath; \
|
outPath = builtins.getAttr (output + \"Path\") strict; \
|
||||||
|
drvPath = strict.drvPath; \
|
||||||
type = \"derivation\"; \
|
type = \"derivation\"; \
|
||||||
currentOutput = output; \
|
currentOutput = output; \
|
||||||
} // outputsAttrs // { all = allList; }; \
|
} // outputsAttrs // { all = allList; }; \
|
||||||
|
|
Loading…
Reference in a new issue