1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 01:39:36 +01:00

Merge remote-tracking branch 'origin/master' into flakes

This commit is contained in:
Eelco Dolstra 2019-11-07 11:44:02 +01:00
commit f730841db4
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
15 changed files with 153 additions and 25 deletions

View file

@ -24,8 +24,8 @@
#include <chrono>
#include <regex>
#include <queue>
#include <climits>
#include <limits.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>

View file

@ -34,6 +34,10 @@ DownloadSettings downloadSettings;
static GlobalConfig::Register r1(&downloadSettings);
CachedDownloadRequest::CachedDownloadRequest(const std::string & uri)
: uri(uri), ttl(settings.tarballTtl)
{ }
std::string resolveUri(const std::string & uri)
{
if (uri.compare(0, 8, "channel:") == 0)

View file

@ -2,7 +2,7 @@
#include "types.hh"
#include "hash.hh"
#include "globals.hh"
#include "config.hh"
#include <string>
#include <future>
@ -71,12 +71,12 @@ struct CachedDownloadRequest
bool unpack = false;
std::string name;
Hash expectedHash;
unsigned int ttl = settings.tarballTtl;
unsigned int ttl;
bool gcRoot = false;
bool getLastModified = false;
CachedDownloadRequest(const std::string & uri)
: uri(uri) { }
CachedDownloadRequest(const std::string & uri);
CachedDownloadRequest() = delete;
};
struct CachedDownloadResult