about summary refs log blame commit diff
path: root/corepkgs/channels/unpack.sh.in
blob: f349f3da3862ba467ddb2655a3db189a76ab8425 (plain) (tree)























                                      
#! @shell@ -e

export PATH=/bin:/usr/bin # !!! impure

mkdir $out
mkdir $out/tmp
cd $out/tmp

expr=$out/default.nix
echo '[' > $expr

nr=0
for i in $inputs; do
    echo "unpacking $i"
    @bunzip2@ < $i | tar xvf -
    mv * ../$nr # !!! hacky
    echo "(import ./$nr)" >> $expr
    nr=$(($nr + 1))
done

echo ']' >> $expr

cd ..
rmdir tmp