From 566afa1e9c804dd4a893960f30325a38c81a4c51 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Dec 2012 11:02:44 +0100 Subject: Support xz compression of nixexprs.tar in channels --- corepkgs/unpack-channel.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'corepkgs') diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix index 8cf79f828..5c2a61e66 100644 --- a/corepkgs/unpack-channel.nix +++ b/corepkgs/unpack-channel.nix @@ -6,7 +6,12 @@ let '' mkdir $out cd $out - ${bzip2} -d < $src | ${tar} xf - ${tarFlags} + pat="\.xz\$" + if [[ "$src" =~ $pat ]]; then + ${xz} -d < $src | ${tar} xf - ${tarFlags} + else + ${bzip2} -d < $src | ${tar} xf - ${tarFlags} + fi mv * $out/$channelName if [ -n "$binaryCacheURL" ]; then mkdir $out/binary-caches -- cgit v1.2.3