mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
BinaryCacheStore: Support bzip2 compression
This commit is contained in:
parent
6963de2091
commit
4dde0b0562
3 changed files with 130 additions and 45 deletions
|
@ -87,7 +87,10 @@ void BinaryCacheStore::addToCache(const ValidPathInfo & info, ref<std::string> n
|
|||
% duration);
|
||||
|
||||
/* Atomically write the NAR file. */
|
||||
narInfo->url = "nar/" + printHash32(narInfo->fileHash) + ".nar.xz";
|
||||
narInfo->url = "nar/" + printHash32(narInfo->fileHash) + ".nar"
|
||||
+ (compression == "xz" ? ".xz" :
|
||||
compression == "bzip2" ? ".bz2" :
|
||||
"");
|
||||
if (!fileExists(narInfo->url)) {
|
||||
stats.narWrite++;
|
||||
upsertFile(narInfo->url, *narCompressed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue