2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
|
|
|
|
, freetype, fontconfig, libX11, libXrender, zlib
|
2018-03-07 20:29:51 +00:00
|
|
|
, glib, gtk3, libXtst, jdk, gsettings-desktop-schemas
|
|
|
|
, webkitgtk ? null # for internal web browser
|
2018-07-21 01:44:44 +01:00
|
|
|
, buildEnv, runCommand
|
2015-07-30 22:36:14 +01:00
|
|
|
, callPackage
|
2016-09-11 22:24:51 +01:00
|
|
|
}:
|
2009-05-13 14:55:53 +01:00
|
|
|
|
2011-04-11 21:29:47 +01:00
|
|
|
assert stdenv ? glibc;
|
2010-05-09 15:17:21 +01:00
|
|
|
|
2017-10-18 17:11:14 +01:00
|
|
|
# http://download.eclipse.org/eclipse/downloads/ is the main place to
|
|
|
|
# find the downloads needed for new versions
|
|
|
|
|
2019-02-11 18:22:02 +00:00
|
|
|
let
|
|
|
|
platform_major = "4";
|
|
|
|
platform_minor = "10";
|
|
|
|
year = "2018";
|
|
|
|
month = "12";
|
|
|
|
timestamp = "201812060815";
|
|
|
|
|
|
|
|
in rec {
|
2010-05-09 15:17:21 +01:00
|
|
|
|
2017-03-04 19:21:25 +00:00
|
|
|
buildEclipse = import ./build-eclipse.nix {
|
|
|
|
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
2018-03-07 20:29:51 +00:00
|
|
|
jdk glib gtk3 libXtst gsettings-desktop-schemas webkitgtk
|
2017-03-14 10:14:29 +00:00
|
|
|
makeWrapper;
|
2017-03-04 19:21:25 +00:00
|
|
|
};
|
2010-05-09 15:17:21 +01:00
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Eclipse CPP
|
2016-10-20 19:04:38 +01:00
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-cpp = buildEclipse {
|
2019-02-11 18:22:02 +00:00
|
|
|
name = "eclipse-cpp-${platform_major}.${platform_minor}";
|
2017-07-02 16:58:15 +01:00
|
|
|
description = "Eclipse IDE for C/C++ Developers, Oxygen release";
|
2011-04-11 21:29:47 +01:00
|
|
|
src =
|
2019-02-11 18:22:02 +00:00
|
|
|
fetchurl {
|
|
|
|
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";
|
|
|
|
sha512 = "1f5yr7cydz4iw8c14yn713d44f1g1wkiqiwmb4ikdfx4l70rc5xxsdxv9b4mhm89b02cqnxdh9p5hivkssmnzg0km3ab5bx9mvzgzx7";
|
|
|
|
};
|
2015-03-18 15:30:01 +00:00
|
|
|
};
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Eclipse Modeling
|
2011-04-11 21:29:47 +01:00
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-modeling = buildEclipse {
|
2019-02-11 18:22:02 +00:00
|
|
|
name = "eclipse-modeling-${platform_major}.${platform_minor}";
|
2016-10-20 16:27:01 +01:00
|
|
|
description = "Eclipse Modeling Tools";
|
|
|
|
src =
|
2019-02-11 18:22:02 +00: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";
|
|
|
|
sha512 = "18psh1lgqg21dmndyc0yr6rz7piqyk861j9mlhgv9xaq8nz11fb6lil594sk64yyv0qbgi98vp03f1p06zvhgs37k9rjkfjmzl7n97k";
|
|
|
|
};
|
2016-10-20 16:27:01 +01:00
|
|
|
};
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Eclipse Platform
|
2016-10-20 19:04:38 +01:00
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-platform = buildEclipse {
|
2019-02-11 18:22:02 +00: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";
|
|
|
|
sha512 = "2zdvbjk05a00lbcad9v30rcr93j03d2pycdhpwrvrakr8z4yrxs6svamq9s294ry1w3lw04pgsnqklw6zjx6iil1kp51f374lkfpxn7";
|
|
|
|
};
|
2018-09-27 17:58:22 +01:00
|
|
|
};
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Eclipse Scala SDK
|
2016-09-08 08:56:17 +01:00
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-scala-sdk = buildEclipse {
|
2016-10-20 21:08:27 +01:00
|
|
|
name = "eclipse-scala-sdk-4.4.1";
|
2016-10-20 19:04:38 +01:00
|
|
|
description = "Eclipse IDE for Scala Developers";
|
2012-07-28 20:54:40 +01:00
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2016-10-20 19:04:38 +01:00
|
|
|
fetchurl { # tested
|
2016-10-28 22:04:07 +01:00
|
|
|
url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86_64.tar.gz;
|
2016-10-20 21:08:27 +01:00
|
|
|
sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";
|
2012-07-28 20:54:40 +01:00
|
|
|
}
|
|
|
|
else
|
2016-10-20 19:04:38 +01:00
|
|
|
fetchurl { # untested
|
2016-10-28 22:04:07 +01:00
|
|
|
url = https://downloads.typesafe.com/scalaide-pack/4.4.1-vfinal-luna-211-20160504/scala-SDK-4.4.1-vfinal-2.11-linux.gtk.x86.tar.gz;
|
2016-10-20 21:08:27 +01:00
|
|
|
sha256 = "35383cb09567187e14a30c15de9fd9aa0eef99e4bbb342396ce3acd11fb5cbac";
|
2014-06-28 18:47:35 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Eclipse SDK
|
2015-07-26 09:33:10 +01:00
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-sdk = buildEclipse {
|
2019-02-11 18:22:02 +00: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";
|
|
|
|
sha512 = "1kq14vhzcngfhl8kjs722rshny81gxv6wcgln46x7lnpg2274sb9dprhns62fpq97l0355cmg8mnny6fsd1nqibrw09xq932v86cfm8";
|
|
|
|
};
|
2018-09-27 17:58:22 +01:00
|
|
|
};
|
|
|
|
|
2018-10-14 13:02:23 +01:00
|
|
|
### Eclipse Java
|
|
|
|
|
2019-02-11 16:27:13 +00:00
|
|
|
eclipse-java = buildEclipse {
|
2019-02-11 18:22:02 +00:00
|
|
|
name = "eclipse-java-${platform_major}.${platform_minor}";
|
2018-10-14 13:02:23 +01:00
|
|
|
description = "Eclipse IDE for Java Developers";
|
|
|
|
src =
|
2019-02-11 18:22:02 +00: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";
|
|
|
|
sha512 = "2xd5q7kg3aly7jnz2fijn06ljmnnd7ggwwzmndfhqwfzxpyjg1lnlln76pcd6chx7gnwdrl7khg0fs566ddabfjv17c46dj5fpw9y6j";
|
|
|
|
};
|
2018-10-14 13:02:23 +01:00
|
|
|
};
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Environments
|
2016-03-19 10:45:04 +00:00
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
# Function that assembles a complete Eclipse environment from an
|
|
|
|
# Eclipse package and list of Eclipse plugins.
|
2015-07-26 09:33:10 +01:00
|
|
|
eclipseWithPlugins = { eclipse, plugins ? [], jvmArgs ? [] }:
|
|
|
|
let
|
|
|
|
# Gather up the desired plugins.
|
|
|
|
pluginEnv = buildEnv {
|
|
|
|
name = "eclipse-plugins";
|
2015-07-29 22:29:38 +01:00
|
|
|
paths =
|
|
|
|
with stdenv.lib;
|
|
|
|
filter (x: x ? isEclipsePlugin) (closePropagation plugins);
|
2015-07-26 09:33:10 +01: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 21:00:53 +00: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 09:33:10 +01:00
|
|
|
makeWrapper ${eclipse}/bin/eclipse $out/bin/eclipse \
|
2016-01-06 21:00:53 +00:00
|
|
|
--add-flags "--launcher.ini $out/etc/eclipse.ini"
|
2015-07-26 09:33:10 +01:00
|
|
|
|
|
|
|
ln -s ${eclipse}/share $out/
|
|
|
|
'';
|
|
|
|
|
2016-10-21 09:44:31 +01:00
|
|
|
### Plugins
|
|
|
|
|
2015-07-30 22:36:14 +01:00
|
|
|
plugins = callPackage ./plugins.nix { };
|
2015-07-26 09:38:04 +01:00
|
|
|
|
2009-05-13 14:55:53 +01:00
|
|
|
}
|