mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
c43dbd671e
svn path=/nixpkgs/trunk/; revision=21472
28 lines
510 B
Bash
28 lines
510 B
Bash
source $stdenv/setup
|
|
|
|
mkdir unzipped
|
|
pushd unzipped
|
|
unzip $src || true
|
|
popd
|
|
|
|
ensureDir $out
|
|
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" {} \;
|