diff --git a/pkgs/applications/editors/eclipse/runner.nix b/pkgs/applications/editors/eclipse/runner.nix new file mode 100644 index 000000000000..dccc7b5376fd --- /dev/null +++ b/pkgs/applications/editors/eclipse/runner.nix @@ -0,0 +1,32 @@ +args: with args; +stdenv.mkDerivation { + name = "nix-eclipse-runner-script"; + + phases = "installPhase"; + installPhase = '' + ensureDir $out/bin + target=$out/bin/nix-run-eclipse + cat > $target << EOF + #!/bin/sh + export PATH=${jre}/bin:$PATH + export LD_LIBRARY_PATH=${glib}/lib:${gtk}/lib:${libXtst}/lib + # If you run out of XX space try these? -vmargs -Xms512m -Xmx2048m -XX:MaxPermSize=256m + exec "\$@" + EOF + chmod +x $target + ''; + + meta = { + description = "provide environment to run Eclipse"; + longDescription = '' + Is there one distribution providing support for up to date Eclipse installations? + There are various reasons why not. + Installing binaries just works. Get Eclipse binaries form eclipse.org/downloads + install this wrapper then run Eclipse like this: + nix-run-eclipse $PATH_TO_ECLIPSE/eclipse/eclipse + and be happy. Everything works including update sites. + ''; + maintainers = [args.lib.maintainers.marcweber]; + platforms = args.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79f16fc8bd17..30caace7f5eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6274,6 +6274,20 @@ let inherit (xlibs) libX11; }; + eclipseRunner = import ../applications/editors/eclipse/runner.nix { + inherit stdenv lib jre; + inherit (gtkLibs) gtk glib; + inherit (xlibs) libXtst; + }; + + /* commenting out eclipse - Have a look at eclipseRunner - Marc Weber + + Reason: You can get Eclipse in many prepacked variations on eclipse.org + No need to duplicate efforts. + To make Equinox p2 work you have to create a local copy of Eclipse anyway (AFAIK). + Maybe there is a solution. I don't have time to investigate. I want to prevent + people from using old crappy Eclipse versions. + # put something like this into your ~/.nixpkgs/config.nix file #eclipse = { # plugins = {eclipse, version, plugins } : let p = plugins; in @@ -6317,6 +6331,7 @@ let # eclipsePlugins = import ../applications/editors/eclipse/plugins.nix { # inherit fetchurl stdenv; # }; + */ ed = import ../applications/editors/ed { inherit fetchurl stdenv;