diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc index adfc6fc05..0e8b637fa 100644 --- a/third_party/nix/src/libstore/derivations.cc +++ b/third_party/nix/src/libstore/derivations.cc @@ -50,8 +50,9 @@ BasicDerivation BasicDerivation::from_proto( result.args.insert(result.args.end(), proto_derivation->args().begin(), proto_derivation->args().end()); - result.env.insert(proto_derivation->env().begin(), - proto_derivation->env().end()); + for (auto [k, v] : proto_derivation->env()) { + result.env.emplace(k, v); + } return result; } diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh index dfdebdd01..cbfea2050 100644 --- a/third_party/nix/src/libstore/derivations.hh +++ b/third_party/nix/src/libstore/derivations.hh @@ -44,7 +44,7 @@ using DerivationOutputs = absl::btree_map; output IDs we are interested in. */ using DerivationInputs = absl::btree_map; -using StringPairs = std::map; +using StringPairs = absl::btree_map; struct BasicDerivation { DerivationOutputs outputs; /* keyed on symbolic IDs */