about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/derivations.cc
diff options
context:
space:
mode:
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 007c268bab2a..adfc6fc05fc1 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -40,8 +40,9 @@ BasicDerivation BasicDerivation::from_proto(
   result.builder = proto_derivation->builder().path();
   store.assertStorePath(result.builder);
 
-  result.outputs.insert(proto_derivation->outputs().begin(),
-                        proto_derivation->outputs().end());
+  for (auto [k, v] : proto_derivation->outputs()) {
+    result.outputs.emplace(k, v);
+  }
 
   result.inputSrcs.insert(proto_derivation->input_sources().paths().begin(),
                           proto_derivation->input_sources().paths().end());