Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
tarball.hh
1#pragma once
2
3#include <optional>
4
5#include "nix/util/hash.hh"
6#include "nix/store/path.hh"
7#include "nix/util/ref.hh"
8#include "nix/util/types.hh"
9#include "nix/util/url.hh"
10
11namespace nix {
12class Store;
13struct SourceAccessor;
14} // namespace nix
15
16namespace nix::fetchers {
17
18struct Settings;
19
21{
22 StorePath storePath;
23 std::string etag;
24 std::string effectiveUrl;
25 std::optional<std::string> immutableUrl;
26};
27
28DownloadFileResult downloadFile(
29 Store & store,
30 const Settings & settings,
31 const VerbatimURL & url,
32 const std::string & name,
33 const Headers & headers = {});
34
36{
37 Hash treeHash;
38 time_t lastModified;
39 std::optional<std::string> immutableUrl;
40 ref<SourceAccessor> accessor;
41};
42
47ref<SourceAccessor> downloadTarball(Store & store, const Settings & settings, const std::string & url);
48
49} // namespace nix::fetchers
Definition path.hh:33
Definition store-api.hh:397
Definition ref.hh:58
Definition hash.hh:58
Definition source-accessor.hh:50
Definition url.hh:353
Definition tarball.hh:21
Definition tarball.hh:36
Definition fetch-settings.hh:27