nixpkgs/pkgs/development/libraries/wtk/builder.sh
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

28 lines
509 B
Bash

source $stdenv/setup
mkdir unzipped
pushd unzipped
unzip $src || true
popd
mkdir -p $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" {} \;