From f581ce0b0cb86670db2b806f98ac0ec368b8cdc1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 9 Nov 2012 14:58:10 +0100 Subject: [PATCH] Don't start copy-from-other-stores if $NIX_OTHER_STORES is unset Slight optimisation. --- src/libstore/globals.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 9b22d54508..7b881d1d2f 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -61,7 +61,8 @@ void Settings::processEnvironment() string subs = getEnv("NIX_SUBSTITUTERS", "default"); if (subs == "default") { - substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl"); + if (getEnv("NIX_OTHER_STORES") != "") + substituters.push_back(nixLibexecDir + "/nix/substituters/copy-from-other-stores.pl"); substituters.push_back(nixLibexecDir + "/nix/substituters/download-using-manifests.pl"); substituters.push_back(nixLibexecDir + "/nix/substituters/download-from-binary-cache.pl"); } else