2009-03-23 20:36:48 +00:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir unzipped
|
|
|
|
pushd unzipped
|
2010-05-01 08:07:25 +01: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
|
2015-09-06 09:21:43 +01:00
|
|
|
find $out -type f -perm -0100 \
|
2014-12-17 18:11:30 +00:00
|
|
|
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
|
2015-09-06 09:21:43 +01:00
|
|
|
find $out -type f -perm -0100 \
|
2009-03-23 20:36:48 +00:00
|
|
|
-exec patchelf --set-rpath "$rpath" {} \;
|