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
|
2015-09-06 10:21:43 +02:00
|
|
|
find $out -type f -perm -0100 \
|
2014-12-17 19:11:30 +01:00
|
|
|
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
|
2015-09-06 10:21:43 +02:00
|
|
|
find $out -type f -perm -0100 \
|
2009-03-23 21:36:48 +01:00
|
|
|
-exec patchelf --set-rpath "$rpath" {} \;
|