1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Document tarball downloading

This commit is contained in:
Eelco Dolstra 2015-06-01 15:14:44 +02:00
parent c1323b53e3
commit da196ec68f
6 changed files with 171 additions and 15 deletions

View file

@ -212,6 +212,7 @@ Path downloadFileCached(const string & url, bool unpack)
printMsg(lvlInfo, format("unpacking %1%...") % url);
Path tmpDir = createTempDir();
AutoDelete autoDelete(tmpDir, true);
// FIXME: this requires GNU tar for decompression.
runProgram("tar", true, {"xf", storePath, "-C", tmpDir, "--strip-components", "1"}, "");
unpackedStorePath = store->addToStore(name, tmpDir, true, htSHA256, defaultPathFilter, false);
}