1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-24 09:50:55 +01:00

Move download stuff into tarball.hh

This commit is contained in:
Eelco Dolstra 2022-08-01 16:05:58 +02:00
parent 48012603b3
commit 71b155b9e6
10 changed files with 38 additions and 25 deletions

View file

@ -2,14 +2,13 @@
#include "types.hh"
#include "hash.hh"
#include "path.hh"
#include "canon-path.hh"
#include "attrs.hh"
#include "url.hh"
#include <memory>
namespace nix { class Store; class InputAccessor; }
namespace nix { class Store; class StorePath; class InputAccessor; }
namespace nix::fetchers {
@ -148,25 +147,4 @@ struct InputScheme
void registerInputScheme(std::shared_ptr<InputScheme> && fetcher);
struct DownloadFileResult
{
StorePath storePath;
std::string etag;
std::string effectiveUrl;
};
DownloadFileResult downloadFile(
ref<Store> store,
const std::string & url,
const std::string & name,
bool locked,
const Headers & headers = {});
std::pair<StorePath, time_t> downloadTarball(
ref<Store> store,
const std::string & url,
const std::string & name,
bool locked,
const Headers & headers = {});
}