2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
|
|
|
|
, freetype, fontconfig, libX11, libXrender, zlib
|
2018-03-07 21:29:51 +01:00
|
|
|
, glib, gtk3, libXtst, jdk, gsettings-desktop-schemas
|
|
|
|
, 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
|
|
|
|
2017-10-18 18:11:14 +02:00
|
|
|
# http://download.eclipse.org/eclipse/downloads/ is the main place to
|
|
|
|
# find the downloads needed for new versions
|
|
|
|
|
2019-02-11 19:22:02 +01:00
|
|
|
let
|
|
|
|
platform_major = "4";
|
2019-10-07 15:46:43 +02:00
|
|
|
platform_minor = "13";
|
2019-07-09 15:17:06 +02:00
|
|
|
year = "2019";
|
2019-10-07 15:46:43 +02:00
|
|
|
month = "09";
|
|
|
|
timestamp = "201909161045";
|
2019-02-11 19:22:02 +01:00
|
|
|
|
|
|
|
in rec {
|
2010-05-09 16:17:21 +02:00
|
|
|
|
2017-03-04 20:21:25 +01:00
|
|
|
buildEclipse = import ./build-eclipse.nix {
|
|
|
|
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
2018-03-07 21:29:51 +01:00
|
|
|
jdk glib gtk3 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}";
|
2017-07-02 17:58:15 +02:00
|
|
|
description = "Eclipse IDE for C/C++ Developers, Oxygen release";
|
2011-04-11 22:29:47 +02:00
|
|
|
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-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
|
2019-10-07 15:46:43 +02:00
|
|
|
sha512 = "0s9wvxd1bahlcdw7l6cyfi59p78j6gym3a3mn1z6dm6swxgyb2wjjl7hx8bkg0zs8x31bwllpdq22y2vcm6j57h40v53l3xkhy73m8v";
|
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";
|
2019-10-07 15:46:43 +02:00
|
|
|
sha512 = "09nc7ipv67h0gr7lkxsbxrgj9gn48348asn03ylcvflyrcxghqs8n11a75rwvdj98igdzpw922saicx5lqq5g2flfqiga97lwwhfiz5";
|
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";
|
2019-10-07 15:46:43 +02:00
|
|
|
sha512 = "2c40wwrc2ip32n0m5cs8ds0g7cs7018acw8gjkd23msa4pr9x9511c3dj6rbnn1hwzf9yjq6vnjmib5qarxd3vly76jwxhf867l1f7v";
|
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
|
|
|
|
2019-02-11 17:27:13 +01:00
|
|
|
eclipse-scala-sdk = buildEclipse {
|
2016-10-20 22:08:27 +02:00
|
|
|
name = "eclipse-scala-sdk-4.4.1";
|
2016-10-20 20:04:38 +02:00
|
|
|
description = "Eclipse IDE for Scala Developers";
|
2012-07-28 21:54:40 +02:00
|
|
|
src =
|
2018-08-20 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2016-10-20 20:04:38 +02:00
|
|
|
fetchurl { # tested
|
2016-10-28 23:04:07 +02: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 22:08:27 +02:00
|
|
|
sha256 = "4c2d1ac68384e12a11a851cf0fc7757aea087eba69329b21d539382a65340d27";
|
2012-07-28 21:54:40 +02:00
|
|
|
}
|
|
|
|
else
|
2016-10-20 20:04:38 +02:00
|
|
|
fetchurl { # untested
|
2016-10-28 23:04:07 +02: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 22:08:27 +02:00
|
|
|
sha256 = "35383cb09567187e14a30c15de9fd9aa0eef99e4bbb342396ce3acd11fb5cbac";
|
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";
|
2019-10-07 15:46:43 +02:00
|
|
|
sha512 = "2vm646d1crzzzysll3p5pjfljfjzxx4qd37dqcp6xjm91zg8iskli688h0lgla0rmbwz5kj509jp22m4rxkp3cbgd006dd0jr3icdls";
|
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";
|
2019-10-07 15:46:43 +02:00
|
|
|
sha512 = "3zyxqd8iwrfgjjg91dfi4bda61rd2717hy53swmbygi48zaaam70swx997yp5qzxwjp3macdslfk6sqhq2qlcdwcdl6dmkry018jh7b";
|
2019-02-11 19:22:02 +01:00
|
|
|
};
|
2018-10-14 14:02:23 +02:00
|
|
|
};
|
|
|
|
|
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
|
|
|
}
|