2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
|
|
|
|
, freetype, fontconfig, libX11, libXrender, zlib
|
2020-04-16 21:24:50 +02:00
|
|
|
, glib, gtk3, gtk2, libXtst, jdk, jdk8, gsettings-desktop-schemas
|
2018-03-07 21:29:51 +01:00
|
|
|
, webkitgtk ? null # for internal web browser
|
2018-07-21 02:44:44 +02:00
|
|
|
, buildEnv, runCommand
|
2015-07-30 23:36:14 +02:00
|
|
|
, callPackage
|
2016-09-11 23:24:51 +02:00
|
|
|
}:
|
2009-05-13 15:55:53 +02:00
|
|
|
|
2011-04-11 22:29:47 +02:00
|
|
|
assert stdenv ? glibc;
|
2010-05-09 16:17:21 +02:00
|
|
|
|
2020-06-19 00:49:27 +02:00
|
|
|
# https://download.eclipse.org/eclipse/downloads/ is the main place to
|
2017-10-18 18:11:14 +02:00
|
|
|
# find the downloads needed for new versions
|
2020-11-19 19:27:15 +01:00
|
|
|
#
|
|
|
|
# to test:
|
|
|
|
# $ for e in cpp modeling platform sdk java committers; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done
|
2017-10-18 18:11:14 +02:00
|
|
|
|
2019-02-11 19:22:02 +01:00
|
|
|
let
|
|
|
|
platform_major = "4";
|
2020-11-19 19:27:15 +01:00
|
|
|
platform_minor = "17";
|
2020-03-23 14:18:15 +01:00
|
|
|
year = "2020";
|
2020-11-19 19:27:15 +01:00
|
|
|
month = "09";
|
|
|
|
timestamp = "${year}${month}021800";
|
2020-04-16 21:24:50 +02:00
|
|
|
gtk = gtk3;
|
2019-02-11 19:22:02 +01:00
|
|
|
in rec {
|
2010-05-09 16:17:21 +02:00
|
|
|
|
2020-04-16 21:24:50 +02:00
|
|
|
buildEclipse = callPackage ./build-eclipse.nix {
|
2017-03-04 20:21:25 +01:00
|
|
|
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
2020-04-16 21:24:50 +02:00
|
|
|
jdk glib gtk libXtst gsettings-desktop-schemas webkitgtk
|
2017-03-14 11:14:29 +01:00
|
|
|
makeWrapper;
|
2017-03-04 20:21:25 +01:00
|
|
|
};
|
2010-05-09 16:17:21 +02:00
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse CPP
|
2016-10-20 20:04:38 +02:00
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-cpp = buildEclipse {
|
2019-02-11 19:22:02 +01:00
|
|
|
name = "eclipse-cpp-${platform_major}.${platform_minor}";
|
2019-12-21 21:22:53 +01:00
|
|
|
description = "Eclipse IDE for C/C++ Developers";
|
2011-04-11 22:29:47 +02:00
|
|
|
src =
|
2019-02-11 19:22:02 +01:00
|
|
|
fetchurl {
|
2020-06-19 00:49:27 +02:00
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "270pk7vvfvanig49xkrail01nf967zlp7xf8rvyh2ya7s0y0akj2bi0y4yms4gwijmingm8y2ir9qynd360mzwl8mnc1c31ykf9l3lh";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2015-03-18 16:30:01 +01:00
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Modeling
|
2011-04-11 22:29:47 +02:00
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-modeling = buildEclipse {
|
2019-02-11 19:22:02 +01:00
|
|
|
name = "eclipse-modeling-${platform_major}.${platform_minor}";
|
2016-10-20 17:27:01 +02:00
|
|
|
description = "Eclipse Modeling Tools";
|
|
|
|
src =
|
2019-02-11 19:22:02 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "26bb6cbnw94ml585aqrs8wpfksd2883njlqi48klpbn5n1bwpnpwvymx9q46i49piiyp0r1pa8ghdcgiwcakvri5nzldlh522fs7h5y";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2016-10-20 17:27:01 +02:00
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Platform
|
2016-10-20 20:04:38 +02:00
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-platform = buildEclipse {
|
2019-02-11 19:22:02 +01:00
|
|
|
name = "eclipse-platform-${platform_major}.${platform_minor}";
|
|
|
|
description = "Eclipse Platform ${year}-${month}";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "2i3gjxmq1i4p70q2l5749b96z1r4nv15dii17fywbyby3kbggwhfvaydizy7z5p6kn0y91dw13p7gmg3qpr9d46mb8f8h3sxks7fyl9";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2018-09-27 18:58:22 +02:00
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Scala SDK
|
2016-09-08 09:56:17 +02:00
|
|
|
|
2020-04-16 21:24:50 +02:00
|
|
|
eclipse-scala-sdk =
|
|
|
|
buildEclipse.override { jdk = jdk8; gtk = gtk2; } {
|
|
|
|
name = "eclipse-scala-sdk-4.7.0";
|
|
|
|
description = "Eclipse IDE for Scala Developers";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "https://downloads.typesafe.com/scalaide-pack/4.7.0-vfinal-oxygen-212-20170929/scala-SDK-4.7.0-vfinal-2.12-linux.gtk.x86_64.tar.gz";
|
|
|
|
sha256 = "1n5w2a7mh9ajv6fxcas1gpgwb04pdxbr9v5dzr67gsz5bhahq4ya";
|
2014-06-28 19:47:35 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse SDK
|
2015-07-26 10:33:10 +02:00
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-sdk = buildEclipse {
|
2019-02-11 19:22:02 +01:00
|
|
|
name = "eclipse-sdk-${platform_major}.${platform_minor}";
|
|
|
|
description = "Eclipse ${year}-${month} Classic";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "1c29r7qwjrjv86q2c4bhlrmmh50690lrq164jzrlisys9vnxb6wii0gwb34p9m1xqr3lgba1zhffb4jx18prrk0x8xbd78mp0lvya3k";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2018-09-27 18:58:22 +02:00
|
|
|
};
|
|
|
|
|
2018-10-14 14:02:23 +02:00
|
|
|
### Eclipse Java
|
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-java = buildEclipse {
|
2019-02-11 19:22:02 +01:00
|
|
|
name = "eclipse-java-${platform_major}.${platform_minor}";
|
2018-10-14 14:02:23 +02:00
|
|
|
description = "Eclipse IDE for Java Developers";
|
|
|
|
src =
|
2019-02-11 19:22:02 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "3rkpngrk6423i2pcf241wbr9jfzwxm2qwm57ipjpjw6705w1rapcws4bibqjznlf34lqvnynkw2wihy51j1ryw25z9fc2jsvyj67c1q";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2018-10-14 14:02:23 +02:00
|
|
|
};
|
|
|
|
|
2020-01-28 10:36:19 +01:00
|
|
|
### Eclipse Committers
|
|
|
|
|
|
|
|
eclipse-committers = buildEclipse {
|
|
|
|
name = "eclipse-committers-${platform_major}.${platform_minor}";
|
|
|
|
description = "Eclipse IDE for Eclipse Committers and Eclipse Platform Plugin Developers";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-committers-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
2020-11-19 19:27:15 +01:00
|
|
|
sha512 = "3gnqamrn3x2gr4dfcgl7ppxpyi1q422l0sm7sh0vmipbs9l1c58plm3p14j9rjsyjlly2xjci6dg7sb9mj6259vc640wafnzcs89ii1";
|
2020-01-28 10:36:19 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-12-08 16:56:17 +01:00
|
|
|
### Eclipse IDE for RCP and RAP Developers
|
|
|
|
|
|
|
|
eclipse-rcp = buildEclipse {
|
|
|
|
name = "eclipse-rcp-${platform_major}.${platform_minor}";
|
|
|
|
description = "Eclipse IDE for RCP and RAP Developers";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rcp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
|
|
|
sha512 = "216g805fgpb7vwbgk36xkf467vijvaa3x0gk4d94pi92d9wdh5dph6wjjr4ka9rvg0pzxxr8y3sgbfqqzqpc82bgiz5qqr93sprh9bj";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Environments
|
2016-03-19 11:45:04 +01:00
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
# Function that assembles a complete Eclipse environment from an
|
|
|
|
# Eclipse package and list of Eclipse plugins.
|
2015-07-26 10:33:10 +02:00
|
|
|
eclipseWithPlugins = { eclipse, plugins ? [], jvmArgs ? [] }:
|
|
|
|
let
|
|
|
|
# Gather up the desired plugins.
|
|
|
|
pluginEnv = buildEnv {
|
|
|
|
name = "eclipse-plugins";
|
2015-07-29 23:29:38 +02:00
|
|
|
paths =
|
|
|
|
with stdenv.lib;
|
|
|
|
filter (x: x ? isEclipsePlugin) (closePropagation plugins);
|
2015-07-26 10:33:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Prepare the JVM arguments to add to the ini file. We here also
|
|
|
|
# add the property indicating the plugin directory.
|
|
|
|
dropinPropName = "org.eclipse.equinox.p2.reconciler.dropins.directory";
|
|
|
|
dropinProp = "-D${dropinPropName}=${pluginEnv}/eclipse/dropins";
|
|
|
|
jvmArgsText = stdenv.lib.concatStringsSep "\n" (jvmArgs ++ [dropinProp]);
|
|
|
|
|
|
|
|
# Base the derivation name on the name of the underlying
|
|
|
|
# Eclipse.
|
|
|
|
name = (stdenv.lib.meta.appendToName "with-plugins" eclipse).name;
|
|
|
|
in
|
|
|
|
runCommand name { buildInputs = [ makeWrapper ]; } ''
|
2016-01-06 22:00:53 +01:00
|
|
|
mkdir -p $out/bin $out/etc
|
|
|
|
|
|
|
|
# Prepare an eclipse.ini with the plugin directory.
|
|
|
|
cat ${eclipse}/eclipse/eclipse.ini - > $out/etc/eclipse.ini <<EOF
|
|
|
|
${jvmArgsText}
|
|
|
|
EOF
|
|
|
|
|
2015-07-26 10:33:10 +02:00
|
|
|
makeWrapper ${eclipse}/bin/eclipse $out/bin/eclipse \
|
2016-01-06 22:00:53 +01:00
|
|
|
--add-flags "--launcher.ini $out/etc/eclipse.ini"
|
2015-07-26 10:33:10 +02:00
|
|
|
|
|
|
|
ln -s ${eclipse}/share $out/
|
|
|
|
'';
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Plugins
|
|
|
|
|
2015-07-30 23:36:14 +02:00
|
|
|
plugins = callPackage ./plugins.nix { };
|
2015-07-26 10:38:04 +02:00
|
|
|
|
2009-05-13 15:55:53 +02:00
|
|
|
}
|