diff --git a/pkgs/applications/editors/eclipse/builder.sh b/pkgs/applications/editors/eclipse/builder.sh index 6e064e1fa9b..050d71761c2 100755 --- a/pkgs/applications/editors/eclipse/builder.sh +++ b/pkgs/applications/editors/eclipse/builder.sh @@ -15,9 +15,16 @@ find $out \( -type f -a -perm +0100 \) \ --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" +# don't use makeWrapper in order to change the last line. + +ensureDir $out/bin +cat >> $out/bin/eclipse << EOF +#! /bin/sh -e +export PATH=${jdk}/bin\${PATH:+:}\$PATH +export LD_LIBRARY_PATH=$rpath\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH +exec \$(dirname $0)/../eclipse/eclipse $@ +EOF +chmod +x $out/bin/eclipse ensureDir plugin-working-dir workingdir="$(pwd)/plugin-working-dir" diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix index 17fbd51cb57..1cbfff91986 100644 --- a/pkgs/applications/editors/eclipse/default.nix +++ b/pkgs/applications/editors/eclipse/default.nix @@ -1,22 +1,33 @@ -{fetchurl, stdenv, makeWrapper, jdk, gtk, glib, libXtst, plugins ? []}: +# recommended installation: +# nix-build -A eclipsesdk +# then cp -r $store-path ~/my-eclipse; chmod -R 777 ~/my-eclipse # ugh! I'm to lazy to assign permissions properly +# maybe also using a wrapper such as this (lower values should suffice for most needs) +# eclipseWrapper () { +# "$@" -vmargs -Xms2048m -Xmx2048m -XX:MaxPermSize=2048m +# } +# +# Why use a local copy? This way it's easier to use the update manager to get plugins :-) + + +{fetchurl, stdenv, jdk, gtk, glib, libXtst, plugins ? []}: let { body = stdenv.mkDerivation { - name = "eclipse-sdk-3.3.2"; + name = "eclipse-sdk-3.5M6"; builder = ./builder.sh; src = bindist; - buildInputs = [makeWrapper]; + buildInputs = []; inherit jdk plugins; libraries = [gtk glib libXtst]; }; bindist = if (stdenv.system == "x86_64-linux") then fetchurl { - url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz; - sha256 = "fa7ff6fd17d053a53f743fa3d79493aa2e359402563cc736db9709a87826af21"; + url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk-x86_64.tar.gz; + sha256 = "10p4idp5rcdf7xqwfk3kvmjxhi8x1v835m0y4pn9q4nhfb5643pi"; } else fetchurl { - url = http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-SDK-3.3.2-linux-gtk.tar.gz; - sha256 = "624460c87f763b855fcddca86d969f2e4c730e654fe1a0dd69624afe576b13c8"; + url = ftp://mirror.micromata.de/eclipse/eclipse/downloads/drops/S-3.5M6-200903130100/eclipse-SDK-3.5M6-linux-gtk.tar.gz; + sha256 = "1z8j26b632ydhqrmwgbcqgiq7f1a542jam06z2h62mcbqazrcyah"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 56db260cffc..0d96f773f75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7997,7 +7997,7 @@ let eclipse = plugins: import ../applications/editors/eclipse { - inherit fetchurl stdenv makeWrapper jdk; + inherit fetchurl stdenv jdk; inherit (gtkLibs) gtk glib; inherit (xlibs) libXtst; inherit plugins;