1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 13:21:47 +02:00

Disable TLS verification for builtin fetchurl

This makes it consistent with the Nixpkgs fetchurl and makes it work
in chroots. We don't need verification because the hash of the result
is checked anyway.
This commit is contained in:
Eelco Dolstra 2015-10-21 14:59:01 +02:00
parent 357d31b339
commit 5db358d4d7
4 changed files with 32 additions and 12 deletions

View file

@ -5,13 +5,19 @@
namespace nix {
struct DownloadOptions
{
string expectedETag;
bool verifyTLS{true};
};
struct DownloadResult
{
bool cached;
string data, etag;
};
DownloadResult downloadFile(string url, string expectedETag = "");
DownloadResult downloadFile(string url, const DownloadOptions & options);
Path downloadFileCached(const string & url, bool unpack);