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:
Vincent Ambo 2020-05-22 01:58:12 +01:00
parent 42205f27fc
commit 986a8f6b75
14 changed files with 187 additions and 176 deletions

View file

@ -214,7 +214,8 @@ static void prim_fetchGit(EvalState& state, const Pos& pos, Value** args,
if (args[0]->type == tAttrs) {
state.forceAttrs(*args[0], pos);
for (auto& attr : *args[0]->attrs) {
for (auto& attr_iter : *args[0]->attrs) {
auto& attr = attr_iter.second;
std::string n(attr.name);
if (n == "url")
url =