diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07 12:11:05 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07 12:11:05 +0000 |
commit | e2d5e40f4fdd98e5d2ad7b77c00fb97caa3aa259 (patch) | |
tree | b3b8ccf4d534ae55949b02107887574424041668 /src/nix-env/user-env.cc | |
parent | 84ce7ac76feab6e9a5c074bd1b9550ae543d1db8 (diff) |
* Keep track of the source positions of attributes.
Diffstat (limited to 'src/nix-env/user-env.cc')
-rw-r--r-- | src/nix-env/user-env.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc index a0e51cae1..72e13fceb 100644 --- a/src/nix-env/user-env.cc +++ b/src/nix-env/user-env.cc @@ -62,19 +62,19 @@ bool createUserEnv(EvalState & state, DrvInfos & elems, manifest.list.elems[n++] = &v; state.mkAttrs(v); - mkString((*v.attrs)[state.sType], "derivation"); - mkString((*v.attrs)[state.sName], i->name); - mkString((*v.attrs)[state.sSystem], i->system); - mkString((*v.attrs)[state.sOutPath], i->queryOutPath(state)); + mkString((*v.attrs)[state.sType].value, "derivation"); + mkString((*v.attrs)[state.sName].value, i->name); + mkString((*v.attrs)[state.sSystem].value, i->system); + mkString((*v.attrs)[state.sOutPath].value, i->queryOutPath(state)); if (drvPath != "") - mkString((*v.attrs)[state.sDrvPath], i->queryDrvPath(state)); + mkString((*v.attrs)[state.sDrvPath].value, i->queryDrvPath(state)); - state.mkAttrs((*v.attrs)[state.sMeta]); + state.mkAttrs((*v.attrs)[state.sMeta].value); MetaInfo meta = i->queryMetaInfo(state); foreach (MetaInfo::const_iterator, j, meta) { - Value & v2((*(*v.attrs)[state.sMeta].attrs)[state.symbols.create(j->first)]); + Value & v2((*(*v.attrs)[state.sMeta].value.attrs)[state.symbols.create(j->first)].value); switch (j->second.type) { case MetaValue::tpInt: mkInt(v2, j->second.intValue); break; case MetaValue::tpString: mkString(v2, j->second.stringValue); break; @@ -116,10 +116,10 @@ bool createUserEnv(EvalState & state, DrvInfos & elems, builder with the manifest as argument. */ Value args, topLevel; state.mkAttrs(args); - mkString((*args.attrs)[state.sSystem], thisSystem); - mkString((*args.attrs)[state.symbols.create("manifest")], + mkString((*args.attrs)[state.sSystem].value, thisSystem); + mkString((*args.attrs)[state.symbols.create("manifest")].value, manifestFile, singleton<PathSet>(manifestFile)); - (*args.attrs)[state.symbols.create("derivations")] = manifest; + (*args.attrs)[state.symbols.create("derivations")].value = manifest; mkApp(topLevel, envBuilder, args); /* Evaluate it. */ |