diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2023-12-16 23:14:56 -0500 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2023-12-16 23:14:56 -0500 |
commit | 17c3a3bfff150a42c904233fa39818d73c9f68f3 (patch) | |
tree | a7614b7cd9a7106ea59f5ac1caad0c2c496b3a45 /nix/nix-daemon | |
parent | f5493629e2650c0d30caf0f01f76b2383f78b9de (diff) | |
parent | fe86819d8bde674766659c22b215d3a689a8026e (diff) |
Merge branch 'master' into mesa-updates
Change-Id: I0c6e2410c51335c68634738be030e374f5b492e9
Diffstat (limited to 'nix/nix-daemon')
-rw-r--r-- | nix/nix-daemon/nix-daemon.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 497de11a04..4cb05c802e 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -736,6 +736,23 @@ static void performOp(bool trusted, unsigned int clientVersion, break; } + case wopSubstituteURLs: { + startWork(); + Strings urls; + if (settings.get("build-use-substitutes", std::string("false")) == "true") { + /* First check the client-provided substitute URLs, then those + passed to the daemon. */ + auto str = settings.get("untrusted-substitute-urls", std::string("")); + if (str.empty()) { + str = settings.get("substitute-urls", std::string("")); + } + urls = tokenizeString<Strings>(str); + } + stopWork(); + writeStrings(urls, to); + break; + } + default: throw Error(format("invalid operation %1%") % op); } |