* Purified Eclipse.

svn path=/nixpkgs/trunk/; revision=4034
This commit is contained in:
Eelco Dolstra 2005-10-08 15:32:56 +00:00
parent f5a877c2a6
commit 5f8d52da6a
3 changed files with 34 additions and 4 deletions

View File

@ -5,4 +5,29 @@ unpackFile $src
ensureDir $out
mv eclipse $out/
makeWrapper $out/eclipse/eclipse $out/bin/eclipse
# Unpack the jars that contain .so files.
#echo "unpacking some jars..."
#for i in $(find $out -name "*.linux*.jar"); do
# echo $i
# cd $(dirname $i) && $jdk/bin/jar -x < $i
# rm $i
#done
# Set the dynamic linker and RPATH.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find $out \( -type f -a -perm +0100 \) \
-print \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
--set-rpath "$rpath" {} \;
#find $out \( -type f -a -name "*.so*" \) \
# -print \
# -exec patchelf --set-rpath "$rpath" {} \;
# Make a wrapper script so that the proper JDK is found.
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
--prefix PATH ":" "$jdk/bin" \
--prefix LD_LIBRARY_PATH ":" "$rpath"

View File

@ -1,4 +1,4 @@
{fetchurl, stdenv, makeWrapper}:
{fetchurl, stdenv, makeWrapper, patchelf, jdk, gtk, glib, libXtst}:
let {
body =
@ -6,7 +6,9 @@ let {
name = "eclipse-sdk-3.1";
builder = ./builder.sh;
src = bindist;
inherit makeWrapper;
inherit makeWrapper jdk;
buildInputs = [patchelf];
libraries = [gtk glib libXtst];
};
bindist =

View File

@ -1580,7 +1580,10 @@ rec {
};
eclipse = (import ../applications/editors/eclipse) {
inherit fetchurl stdenv makeWrapper;
inherit fetchurl stdenv makeWrapper jdk;
inherit (gtkLibs) gtk glib;
inherit (xlibs) libXtst;
patchelf = patchelfNew;
};
monodevelop = (import ../applications/editors/monodevelop) {