fix(3p/nix): Update for usage of new attribute set API
The new attribute set API uses the iterators of the btree_map directly. This requires changes in various files because the internals of libexpr are very entangled. This code runs and compiles, but there is a bug causing empty attribute sets to be assigned incorrectly.
This commit is contained in:
parent
42205f27fc
commit
986a8f6b75
14 changed files with 187 additions and 176 deletions
5
third_party/nix/src/nix-env/nix-env.cc
vendored
5
third_party/nix/src/nix-env/nix-env.cc
vendored
|
|
@ -1209,13 +1209,12 @@ static void opQuery(Globals& globals, Strings opFlags, Strings opArgs) {
|
|||
attrs2["type"] = "strings";
|
||||
XMLOpenElement m(xml, "meta", attrs2);
|
||||
Bindings& attrs = *v->attrs;
|
||||
for (auto& i : attrs) {
|
||||
Attr& a(*attrs.find(i.name));
|
||||
for (auto& [name, a] : attrs) {
|
||||
if (a.value->type != tString) {
|
||||
continue;
|
||||
}
|
||||
XMLAttrs attrs3;
|
||||
attrs3["type"] = i.name;
|
||||
attrs3["type"] = name;
|
||||
attrs3["value"] = a.value->string.s;
|
||||
xml.writeEmptyElement("string", attrs3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue