about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--third_party/nix/src/libstore/derivations.cc5
-rw-r--r--third_party/nix/src/libstore/derivations.hh2
2 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index adfc6fc05fc1..0e8b637fa78f 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 dfdebdd01ec8..cbfea2050382 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<std::string, DerivationOutput>;
    output IDs we are interested in. */
 using DerivationInputs = absl::btree_map<Path, StringSet>;
 
-using StringPairs = std::map<std::string, std::string>;
+using StringPairs = absl::btree_map<std::string, std::string>;
 
 struct BasicDerivation {
   DerivationOutputs outputs; /* keyed on symbolic IDs */