mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
* Store user environment manifests as a Nix expression in
$out/manifest.nix rather than as an ATerm. (Hm, I thought I committed this two days ago...)
This commit is contained in:
parent
f3b8833a48
commit
fe2d869e04
11 changed files with 205 additions and 183 deletions
|
@ -70,27 +70,6 @@ void DrvInfo::setMetaInfo(const MetaInfo & meta)
|
|||
{
|
||||
metaInfoRead = true;
|
||||
this->meta = meta;
|
||||
|
||||
#if 0
|
||||
Value * metaAttrs = state.allocValues(1);
|
||||
foreach (MetaInfo::const_iterator, i, meta) {
|
||||
Expr e;
|
||||
switch (i->second.type) {
|
||||
case MetaValue::tpInt: e = makeInt(i->second.intValue); break;
|
||||
case MetaValue::tpString: e = makeStr(i->second.stringValue); break;
|
||||
case MetaValue::tpStrings: {
|
||||
ATermList es = ATempty;
|
||||
foreach (Strings::const_iterator, j, i->second.stringValues)
|
||||
es = ATinsert(es, makeStr(*j));
|
||||
e = makeList(ATreverse(es));
|
||||
break;
|
||||
}
|
||||
default: abort();
|
||||
}
|
||||
metaAttrs.set(toATerm(i->first), makeAttrRHS(e, makeNoPos()));
|
||||
}
|
||||
attrs->set(toATerm("meta"), makeAttrs(metaAttrs));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,7 +101,7 @@ static bool getDerivation(EvalState & state, Value & v,
|
|||
if (i == v.attrs->end()) throw TypeError("derivation name missing");
|
||||
drv.name = state.forceStringNoCtx(i->second);
|
||||
|
||||
i = v.attrs->find(state.symbols.create("system"));
|
||||
i = v.attrs->find(state.sSystem);
|
||||
if (i == v.attrs->end())
|
||||
drv.system = "unknown";
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue