1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 10:31:15 +02:00

Implement caching of fetchurl/fetchTarball results

ETags are used to prevent redownloading unchanged files.
This commit is contained in:
Eelco Dolstra 2015-04-09 11:42:04 +02:00
parent 1711679ea5
commit 60340ce3e2
4 changed files with 152 additions and 29 deletions

View file

@ -110,6 +110,9 @@ Paths createDirs(const Path & path);
/* Create a symlink. */
void createSymlink(const Path & target, const Path & link);
/* Atomically create or replace a symlink. */
void replaceSymlink(const Path & target, const Path & link);
template<class T, class A>
T singleton(const A & a)
@ -334,6 +337,10 @@ string concatStringsSep(const string & sep, const StringSet & ss);
string chomp(const string & s);
/* Remove whitespace from the start and end of a string. */
string trim(const string & s, const string & whitespace = " \n\r\t");
/* Convert the exit status of a child as returned by wait() into an
error string. */
string statusToString(int status);