about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-08-06T02·34+0100
committertazjin <mail@tazj.in>2020-08-06T02·49+0000
commit6a97206cebf17f15b5cfede556bcb3c259ce5154 (patch)
treef9edd43335632c96ca18c89850dce20fb9f6f087 /third_party/nix/src/libstore/derivations.cc
parent3ec366167823c0821d94b4b79fb6265c58e8bffb (diff)
refactor(tvix): Use absl::btree_map for BasicDerivation's env r/1612
Change-Id: I111a9a268debea322f23fdced3bed9ff3e8ed3b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1685
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix/src/libstore/derivations.cc')
-rw-r--r--third_party/nix/src/libstore/derivations.cc5
1 files changed, 3 insertions, 2 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;
 }