summary refs log blame commit diff
path: root/pkgs/development/libraries/wtk/builder.sh
blob: 86f2719537cd0a9b48cfe882ce1b2aa9f7d48570 (plain) (tree)
1
2
3
4
5
6
7
8

                    

              
                  

    
             














                                    
                               
                                                                                  
                               
                                             
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 -0100 \
    -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
find $out -type f -perm -0100 \
    -exec patchelf --set-rpath "$rpath" {} \;