2009-03-23 21:36:48 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir unzipped
|
|
|
|
pushd unzipped
|
2010-05-01 09:07:25 +02:00
|
|
|
unzip $src || true
|
2009-03-23 21:36:48 +01:00
|
|
|
popd
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out
|
2009-03-23 21:36:48 +01:00
|
|
|
mv unzipped/* $out/
|
|
|
|
|
|
|
|
# Remove crap in the root directory.
|
|
|
|
for file in $out/*
|
|
|
|
do
|
|
|
|
if test -f $file ; then
|
|
|
|
rm $file
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Set the dynamic linker.
|
|
|
|
rpath=
|
|
|
|
for i in $libraries; do
|
|
|
|
rpath=$rpath${rpath:+:}$i/lib
|
|
|
|
done
|
|
|
|
find $out -type f -perm +100 \
|
|
|
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" {} \;
|
|
|
|
find $out -type f -perm +100 \
|
|
|
|
-exec patchelf --set-rpath "$rpath" {} \;
|