Fix xz compression
This commit is contained in:
parent
440adfbdd1
commit
6b1e671ac6
1 changed files with 3 additions and 3 deletions
|
@ -8,10 +8,10 @@ let
|
||||||
|
|
||||||
if [ $compressionType = "xz" ]; then
|
if [ $compressionType = "xz" ]; then
|
||||||
ext=xz
|
ext=xz
|
||||||
compressor=${xz} -9
|
compressor="${xz} -9"
|
||||||
else
|
else
|
||||||
ext=bz2
|
ext=bz2
|
||||||
compressor=${bzip2}
|
compressor="${bzip2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "packing ‘$storePath’..."
|
echo "packing ‘$storePath’..."
|
||||||
|
@ -19,7 +19,7 @@ let
|
||||||
dst=$out/tmp.nar.$ext
|
dst=$out/tmp.nar.$ext
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
nix-store --dump "$storePath" | $compressor -9 > $dst
|
nix-store --dump "$storePath" | $compressor > $dst
|
||||||
|
|
||||||
hash=$(nix-hash --flat --type $hashAlgo --base32 $dst)
|
hash=$(nix-hash --flat --type $hashAlgo --base32 $dst)
|
||||||
echo -n $hash > $out/nar-compressed-hash
|
echo -n $hash > $out/nar-compressed-hash
|
||||||
|
|
Loading…
Reference in a new issue