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

Add a ‘--repair’ flag to nix-instantiate

This allows repairing corrupted derivations and other source files.
This commit is contained in:
Eelco Dolstra 2012-10-03 15:09:18 -04:00
parent a807edfae8
commit 0a7084567f
11 changed files with 36 additions and 25 deletions

View file

@ -158,12 +158,12 @@ public:
libutil/archive.hh). */
virtual Path addToStore(const Path & srcPath,
bool recursive = true, HashType hashAlgo = htSHA256,
PathFilter & filter = defaultPathFilter) = 0;
PathFilter & filter = defaultPathFilter, bool repair = false) = 0;
/* Like addToStore, but the contents written to the output path is
a regular file containing the given string. */
virtual Path addTextToStore(const string & name, const string & s,
const PathSet & references) = 0;
const PathSet & references, bool repair = false) = 0;
/* Export a store path, that is, create a NAR dump of the store
path and append its references and its deriver. Optionally, a