mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Get rid of downloadCached()
Everything uses the generic caching system now.
This commit is contained in:
parent
c5ec95e2c7
commit
f6ddf48882
9 changed files with 113 additions and 260 deletions
|
@ -4,7 +4,9 @@
|
|||
#include "util.hh"
|
||||
#include "eval.hh"
|
||||
#include "fetchers/registry.hh"
|
||||
#include "fetchers/fetchers.hh"
|
||||
#include "flake/flakeref.hh"
|
||||
#include "store-api.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -68,9 +70,9 @@ Bindings * MixEvalArgs::getAutoArgs(EvalState & state)
|
|||
Path lookupFileArg(EvalState & state, string s)
|
||||
{
|
||||
if (isUri(s)) {
|
||||
CachedDownloadRequest request(s);
|
||||
request.unpack = true;
|
||||
return getDownloader()->downloadCached(state.store, request).path;
|
||||
return state.store->toRealPath(
|
||||
fetchers::downloadTarball(
|
||||
state.store, resolveUri(s), "source", false).storePath);
|
||||
} else if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
||||
Path p = s.substr(1, s.size() - 2);
|
||||
return state.findFile(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue