about summary refs log tree commit diff
path: root/src/libstore/machines.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/machines.cc')
-rw-r--r--src/libstore/machines.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc
index edd03d147832..f848582dafd4 100644
--- a/src/libstore/machines.cc
+++ b/src/libstore/machines.cc
@@ -89,10 +89,11 @@ void parseMachines(const std::string & s, Machines & machines)
 
 Machines getMachines()
 {
-    Machines machines;
-
-    parseMachines(settings.builders, machines);
-
+    static auto machines = [&]() {
+        Machines machines;
+        parseMachines(settings.builders, machines);
+        return machines;
+    }();
     return machines;
 }