2009-03-23 20:36:48 +00:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir unzipped
|
|
|
|
pushd unzipped
|
2010-05-01 07:07:25 +00:00
|
|
|
unzip $src || true
|
2009-03-23 20:36:48 +00:00
|
|
|
popd
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2009-03-23 20:36:48 +00: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" {} \;
|