Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / wtk / builder.sh
blobca5157c6d71ab1d9d0a3e79320961675925f01b7
1 if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
2 source $stdenv/setup
4 mkdir unzipped
5 pushd unzipped
6 unzip $src || true
7 popd
9 mkdir -p $out
10 mv unzipped/* $out/
12 # Remove crap in the root directory.
13 for file in $out/*
15 if test -f $file ; then
16 rm $file
18 done
20 # Set the dynamic linker.
21 rpath=
22 for i in $libraries; do
23 rpath=$rpath${rpath:+:}$i/lib
24 done
25 find $out -type f -perm -0100 \
26 -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
27 find $out -type f -perm -0100 \
28 -exec patchelf --set-rpath "$rpath" {} \;