From 986a8f6b75ffa51682cbe730c5c2907296082cd4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 22 May 2020 01:58:12 +0100 Subject: 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. --- third_party/nix/src/libexpr/primops/fetchGit.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'third_party/nix/src/libexpr/primops/fetchGit.cc') diff --git a/third_party/nix/src/libexpr/primops/fetchGit.cc b/third_party/nix/src/libexpr/primops/fetchGit.cc index 7ef3dea8eef6..cb4c008cdd3a 100644 --- a/third_party/nix/src/libexpr/primops/fetchGit.cc +++ b/third_party/nix/src/libexpr/primops/fetchGit.cc @@ -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 = -- cgit 1.4.1