[Nix-dev] nixpkgs & Eclipse

Marc Weber marco-oweber at gmx.de
Sun Sep 13 11:48:44 CEST 2009


niksnut asked me why I commented the existing Eclipse applications only
keeping a "runner script" requiring the user to read a long description
rather than just doing nix-env -iA eclipse and be done.

Scrol down to the first occurence of "bad:" to read what the user has to
do instead now.

Let me try to explain why I did this. Then we can discuss whether to
(partially) revert my patch.

facts:
  http://eclipse.org/downloads provides many different versions of
  Eclipse. Lot's of them follow release schedules ensuring that plugins
  work together smoothly. So you get the distribution and you're done.

  Eclipse classic suffices for most new users of Eclipse. You can
  compile some simple Java apps and be done
  So if we support a minimal set this should be the one (IMHO)

  Quite a bunch of people joined #eclipse screaming about Eclipse not
  working correctly. (maybe 2 within 2 weeks). Why? They installed
  Eclipse using apt-get or such and got a very outdated Eclipse-XX
  version. The problems were solved by telling them: "get current
  Eclipse binaries from the website"

  There is a new plugin dependency system called Equinox p2
    details: http://wiki.eclipse.org/Category:Equinox_p2

    It's main purpose is to resolve dependencies automatically by picking
    "target" plugins by user input or the dropins folder. Then it gets the
    missing requirements or tells you "no solution found to install all
    the required plugins becase X requires Z-1.0 and Y requires Z-2.0"
    This system is awesome: You can bootstrap Eclipse itself this way and
    even share "plugins" in a pool to run different Eclipse versions.
    The Eclipse plugin even provide things like switch back to previous
    version.

    So there is a working solution which grew over 6month or more.
    I don't know anyone having time to do something similar on for nix
    right now.
    

  You can "inject" plugins into a working Eclipse system in various
  ways. niksnut showed me http://wiki.eclipse.org/FAQ_Can_I_install_plug-ins_outside_the_main_install_directory%3F
  today which tells you that you can drop features and the plugin
  directory into the main Eclipse installation or use a Eclipse gui to
  add "Extension locations". You'll find various sites telling you that
  you can do the same in a more sane way using link files.
  They contain a link="other Eclipse plugin location" line or such
  telling Eclipse to load plugins from there. While this works very well
  for small plugins such as ViPlugin it doesn't work for dependency
  hells. And if you ever looked at the plugin list of Eclipse you know
  feel that it must be a hell you don't want to maintain manually.
  I even provided this solution for nix (-> eclipseNew).
  It isn't perfect but it worked.. Until there was a new Eclipse
  version.
  This has been replaced by the dropins folder by Equinox p2.

  I don't have time to visit websites and pick the latest versions
  *and* test they fit together. That's why I gave this up.
  That's why Eclipse people started releasing schedules and already
  provide many flavours of Eclipse. That's why they asked developers to
  add dependency information and invented Equinox p2 which can do this
  automatically and more accurate / faster than nix can do!

  Anyway there are some brave folks trying to provide a solution for
  Linux users which want to use their favourite package manager (apt,
  rpm, nix (?) ..) You can join them at #eclipse-linux on freenode.

I looked at the Fedora build script once. It was very long. It contained
some special hacks. It collected many of those plugins manually. It
would have taken me month to understand parts of it because Eclipse is
huge. And I remember it being outdated as well.

So what must a Eclipse installation do to satisfy the user?
  a) it must work
  b) the user must be able to install plugins easily

nice to have: build from scratch from sources.
  I got it working however the update feature didn't work.

My proposal (that's what I've comitted)
  - provide the runner script so that everyone can get started with any
    Eclipse distribution easily.
    bad:  user has to read long description (can be done)
          user has to add alias eclipse="nix-eclipse-runner $PATH_TO_ECLIPSE/eclipse/eclipse"
          to his .bashrc (can be done as well)
          User even *wants* this because Eclipse is likely to run out of
          heap space or such easily (See comments in the runner script)

    good: no effort to maintain it
          ========================

  - maybe provide one up to date eclipse classic derivation so that
    users who only want to run Eclipse once can run it easily (maybe
    without update features)
    good: some people like it because they can just install it
    bad:  users will notice that the update feature doesn't work and
          may not find the comments telling them to make a local copy

That has been my experience. Step up and volunteer and find a better
solution - start at #eclipse-linux and by reading Equinox p2
documentation.

In any case I don't like to keep Eclipse 3.3.x (current is 3.5)

Anyway I think we should try to keep things simple. There are more
important things to work on such as Xen, upgrade upstart and such stuff.

Yours
Marc Weber



More information about the nix-dev mailing list