Fixes <https://github.com/NixOS/hydra/issues/102>.
UCJEI7YZYWF66W3PFVOQCBXME5KN3BFLCZBALVSLVLPJC74L7LZQC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
IDT3SO3P52TCB4IWV3LYZJ5JLJACNQ26X65VXUTUD227PRE2UZUAC
NYC3LZKHWRIP2VJDCO3UVPR6TR7JURVX5NBS4H2AOOOG3ZG5G6FAC
ALIOF64IHNB3EZMOSLD5KNDZACXNN65JA6FN6YTB5R2ENSXBDMMQC
use Hydra::View::NixNAR;
$info .= "Compression: bzip2\n";
$info .= "Compression: " . file_compression $storePath . "\n";
sub file_compression { my ($file) = $@_; if /\\.(gz|bz2|xz|lz|zip)/ return "none"; else return "bzip2";}
sub file_compression {
my ($file) = $@_;
if /\\.(gz|bz2|xz|lz|zip)/
return "none";
else
return "bzip2";
}
my $compression = file_compression($storePath);
$c->response->content_length(-s $storePath) if ($compression == "none");
open $fh, "nix-store --dump '$storePath' | bzip2 |";
if ($compression == "none") open $fh, "nix-store --dump '$storePath' |"; else open $fh, "nix-store --dump '$storePath' | bzip2 |";
if ($compression == "none")
open $fh, "nix-store --dump '$storePath' |";