1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

Get rid of downloadCached()

Everything uses the generic caching system now.
This commit is contained in:
Eelco Dolstra 2020-03-18 17:23:56 +01:00
parent c5ec95e2c7
commit f6ddf48882
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
9 changed files with 113 additions and 260 deletions

View file

@ -545,6 +545,7 @@ formal
#include "eval.hh"
#include "download.hh"
#include "fetchers/fetchers.hh"
#include "store-api.hh"
@ -687,9 +688,8 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
if (isUri(elem.second)) {
try {
CachedDownloadRequest request(elem.second);
request.unpack = true;
res = { true, getDownloader()->downloadCached(store, request).path };
res = { true, store->toRealPath(fetchers::downloadTarball(
store, resolveUri(elem.second), "source", false).storePath) };
} catch (DownloadError & e) {
printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
res = { false, "" };