1source $stdenv/setup
2
3mkdir unzipped
4pushd unzipped
5unzip $src || true
6popd
7
8mkdir -p $out
9mv unzipped/* $out/
10
11# Remove crap in the root directory.
12for file in $out/*
13do
14 if test -f $file ; then
15 rm $file
16 fi
17done
18
19# Set the dynamic linker.
20rpath=
21for i in $libraries; do
22 rpath=$rpath${rpath:+:}$i/lib
23done
24find $out -type f -perm -0100 \
25 -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
26find $out -type f -perm -0100 \
27 -exec patchelf --set-rpath "$rpath" {} \;