diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wtk/builder.sh')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wtk/builder.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wtk/builder.sh b/nixpkgs/pkgs/development/libraries/wtk/builder.sh new file mode 100644 index 000000000000..86f2719537cd --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/wtk/builder.sh @@ -0,0 +1,27 @@ +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" {} \; |