diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-03-23 20:36:48 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-03-23 20:36:48 +0000 |
commit | 779b015a0358e04efce228cc5aad67ecc94a3333 (patch) | |
tree | 15a3f851148fb922188486b201aa048c4247ebf3 /pkgs/development/libraries/wtk | |
parent | 0474b4f148e4ee9afbae652c79c4d29410955af0 (diff) | |
download | nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar.gz nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar.bz2 nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar.lz nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar.xz nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.tar.zst nixlib-779b015a0358e04efce228cc5aad67ecc94a3333.zip |
Adding the Sun Wireless ToolKit for i686-linux at least.
svn path=/nixpkgs/trunk/; revision=14666
Diffstat (limited to 'pkgs/development/libraries/wtk')
-rw-r--r-- | pkgs/development/libraries/wtk/builder.sh | 42 | ||||
-rw-r--r-- | pkgs/development/libraries/wtk/default.nix | 21 |
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/libraries/wtk/builder.sh b/pkgs/development/libraries/wtk/builder.sh new file mode 100644 index 000000000000..bf65b96c7cac --- /dev/null +++ b/pkgs/development/libraries/wtk/builder.sh @@ -0,0 +1,42 @@ +source $stdenv/setup + +if ! test -e "$pathname"; then + echo "" + echo "SORRY!" + echo "You should download \`$(basename $pathname)' from Sun and place it in $(dirname $pathname)." + echo "Blame Sun, not us." + echo "" + exit 1 +fi + +actual=$(md5sum -b $pathname | cut -c1-32) +if test "$actual" != "$md5"; then + echo "hash is $actual, expected $md5" + exit 1 +fi + +mkdir unzipped +pushd unzipped +unzip $pathname || 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" {} \; diff --git a/pkgs/development/libraries/wtk/default.nix b/pkgs/development/libraries/wtk/default.nix new file mode 100644 index 000000000000..3298b5fe6f7b --- /dev/null +++ b/pkgs/development/libraries/wtk/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, unzip, xlibs }: + +assert stdenv.system == "i686-linux"; + +stdenv.mkDerivation { + name = "sun-java-wtk-2.5.2_01"; + + pathname = "/tmp/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh"; + md5 = "6b70b6e6d426eac121db8a087991589f"; + + builder = ./builder.sh; + + buildInputs = [ unzip ]; + + libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.gcc.gcc ]; + + meta = { + homepage = http://java.sun.com/products/sjwtoolkit/download.html; + description = "Sun Java Wireless Toolkit 2.5.2_01 for CLDC"; + }; +} |