summaryrefslogtreecommitdiffstats
path: root/corepkgs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-05 11:02:44 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-05 11:02:44 +0100
commit566afa1e9c804dd4a893960f30325a38c81a4c51 (patch)
treecfba6b7fd4bab207513e1e4d20ccadf6ec2a49c8 /corepkgs
parent444b03a36fc038f030241d3d006d13ba2ae12e6b (diff)
Support xz compression of nixexprs.tar in channels
Diffstat (limited to 'corepkgs')
-rw-r--r--corepkgs/unpack-channel.nix7
1 files changed, 6 insertions, 1 deletions
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