2015-10-05 12:23:02 +02:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper
|
2009-11-20 16:19:00 +01:00
|
|
|
, freetype, fontconfig, libX11, libXext, libXrender, zlib
|
2017-03-14 11:14:29 +01:00
|
|
|
, glib, gtk2, libXtst, jdk, gsettings_desktop_schemas
|
2017-05-26 15:43:25 +02:00
|
|
|
, webkitgtk24x-gtk2 ? null # for internal web browser
|
2015-07-26 10:33:10 +02:00
|
|
|
, buildEnv, writeText, 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
|
|
|
|
2016-01-16 18:35:35 +01:00
|
|
|
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
|
2017-05-26 15:43:25 +02:00
|
|
|
jdk glib gtk2 libXtst gsettings_desktop_schemas webkitgtk24x-gtk2
|
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
|
|
|
|
2017-02-27 20:09:18 +01:00
|
|
|
eclipse-cpp = eclipse-cpp-46; # always point to latest
|
|
|
|
|
2016-10-20 20:04:38 +02:00
|
|
|
eclipse-cpp-46 = buildEclipse {
|
|
|
|
name = "eclipse-cpp-4.6.0";
|
|
|
|
description = "Eclipse IDE for C/C++ Developers, Neon release";
|
2011-04-11 22:29:47 +02:00
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/neon/R/eclipse-cpp-neon-R-linux-gtk-x86_64.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "09fqsgvbjfdqvn7z03crkii34z4bsb34y272q68ib8741bxk0i6m";
|
2010-05-09 16:17:21 +02:00
|
|
|
}
|
2016-10-20 20:04:38 +02:00
|
|
|
else if stdenv.system == "i686-linux" then
|
2011-04-11 22:29:47 +02:00
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/neon/R/eclipse-cpp-neon-R-linux-gtk.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "0a12qmqq22v7sbmwn1hjv1zcrkmp64bf0ajmdjljhs9ac79mxn5h";
|
2015-03-18 16:30:01 +01:00
|
|
|
}
|
2016-10-20 20:04:38 +02:00
|
|
|
else throw "Unsupported system: ${stdenv.system}";
|
2015-03-18 16:30:01 +01:00
|
|
|
};
|
|
|
|
|
2016-10-20 20:04:38 +02:00
|
|
|
eclipse-cpp-37 = buildEclipse {
|
|
|
|
name = "eclipse-cpp-3.7";
|
2011-04-11 22:29:47 +02:00
|
|
|
description = "Eclipse IDE for C/C++ Developers";
|
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk-x86_64.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "14ppc9g9igzvj1pq7jl01vwhzb66nmzbl9wsdl1sf3xnwa9wnqk3";
|
2011-04-11 22:29:47 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/indigo/R/eclipse-cpp-indigo-incubation-linux-gtk.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "1cvg1vgyazrkinwzlvlf0dpl197p4784752srqybqylyj5psdi3b";
|
2011-04-11 22:29:47 +02:00
|
|
|
};
|
2009-11-20 16:33:06 +01:00
|
|
|
};
|
2016-10-20 20:04:38 +02:00
|
|
|
eclipse_cpp_37 = eclipse-cpp-37; # backward compatibility, added 2016-01-30
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Modeling
|
2011-04-11 22:29:47 +02:00
|
|
|
|
2017-02-27 20:09:18 +01:00
|
|
|
eclipse-modeling = eclipse-modeling-46; # always point to latest
|
|
|
|
|
2016-10-20 17:27:01 +02:00
|
|
|
eclipse-modeling-46 = buildEclipse {
|
|
|
|
name = "eclipse-modeling-4.6";
|
|
|
|
description = "Eclipse Modeling Tools";
|
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/neon/1a/eclipse-modeling-neon-1a-linux-gtk-x86_64.tar.gz;
|
2016-10-20 17:27:01 +02:00
|
|
|
sha1 = "3695fd049c4cca2d235f424557e19877795a8183";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/neon/1a/eclipse-modeling-neon-1a-linux-gtk.tar.gz;
|
2016-10-20 17:27:01 +02:00
|
|
|
sha1 = "fa0694a0b44e8e9c2301417f84dba45cf9ac6e61";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-01-30 13:32:51 +01:00
|
|
|
eclipse-modeling-36 = buildEclipse {
|
2011-04-12 10:41:53 +02:00
|
|
|
name = "eclipse-modeling-3.6.2";
|
|
|
|
description = "Eclipse Modeling Tools (includes Incubating components)";
|
|
|
|
src =
|
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk-x86_64.tar.gz;
|
2011-04-12 10:41:53 +02:00
|
|
|
sha1 = "e96f5f006298f68476f4a15a2be8589158d5cc61";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/helios/SR2/eclipse-modeling-helios-SR2-incubation-linux-gtk.tar.gz;
|
2011-04-12 10:41:53 +02:00
|
|
|
sha1 = "696377895bb26445de39d82a916b7e69edb1d939";
|
|
|
|
};
|
|
|
|
};
|
2016-01-30 13:32:51 +01:00
|
|
|
eclipse_modeling_36 = eclipse-modeling-36; # backward compatibility, added 2016-01-30
|
2011-04-12 10:41:53 +02:00
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Platform
|
2016-10-20 20:04:38 +02:00
|
|
|
|
2017-06-28 20:07:49 +02:00
|
|
|
eclipse-platform = eclipse-platform-47; # always point to latest
|
2017-01-02 15:53:02 +01:00
|
|
|
|
|
|
|
eclipse-platform-46 = buildEclipse {
|
|
|
|
name = "eclipse-platform-4.6.2";
|
|
|
|
description = "Eclipse Platform Neon 2";
|
|
|
|
sources = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-platform-4.6.2-linux-gtk-x86_64.tar.gz;
|
|
|
|
sha256 = "1fmpirjkp210angyfz3nr5jp58snjy6784zkkbmdxkiyg9kg2wqq";
|
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-platform-4.6.2-linux-gtk.tar.gz;
|
|
|
|
sha256 = "0274g6ypiqsqkch10868ygbm6avc5pa57saz9wd196kdivl1bdpm";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2013-04-15 21:17:23 +02:00
|
|
|
|
2017-06-28 20:07:49 +02:00
|
|
|
eclipse-platform-47 = buildEclipse {
|
|
|
|
name = "eclipse-platform-4.7";
|
|
|
|
description = "Eclipse Platform Oxygen";
|
|
|
|
sources = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-platform-4.7-linux-gtk-x86_64.tar.gz;
|
|
|
|
sha256 = "0hrgijydxvd2zz1npv5qw8d79f48a6lsdw3qy1wqf7k59aqyg2fq";
|
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-platform-4.7-linux-gtk.tar.gz;
|
|
|
|
sha256 = "00m89j26m8nj190q144wx8d88mldx1z6i797p8isg3rhbz3x5dbc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-21 10:44:31 +02:00
|
|
|
### Eclipse Scala SDK
|
2016-09-08 09:56:17 +02:00
|
|
|
|
2017-02-27 20:09:18 +01:00
|
|
|
eclipse-scala-sdk = eclipse-scala-sdk-441; # always point to latest
|
|
|
|
|
2016-10-20 22:08:27 +02:00
|
|
|
eclipse-scala-sdk-441 = buildEclipse {
|
|
|
|
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 =
|
|
|
|
if stdenv.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
|
|
|
|
2017-06-28 20:08:36 +02:00
|
|
|
eclipse-sdk = eclipse-sdk-47; # always point to latest
|
2017-02-27 20:09:18 +01:00
|
|
|
|
2016-08-04 03:25:29 +02:00
|
|
|
eclipse-sdk-46 = buildEclipse {
|
2017-01-01 21:27:15 +01:00
|
|
|
name = "eclipse-sdk-4.6.2";
|
|
|
|
description = "Eclipse Neon 2 Classic";
|
2016-08-04 03:25:29 +02:00
|
|
|
sources = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
2017-01-01 21:27:15 +01:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-SDK-4.6.2-linux-gtk-x86_64.tar.gz;
|
|
|
|
sha256 = "0g3nk1gcz178j8xk6nblkfsaysm8gq8101383fx60x6w25rdfgjb";
|
2016-08-04 03:25:29 +02:00
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
2017-01-01 21:27:15 +01:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.6.2-201611241400/eclipse-SDK-4.6.2-linux-gtk.tar.gz;
|
|
|
|
sha256 = "09wlkcxs5h3j8habqxgr4all99vkgmyixc0vr9dj3qs0kl85k5mz";
|
2016-08-04 03:25:29 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2015-11-06 15:26:34 +01:00
|
|
|
|
2017-06-28 20:08:36 +02:00
|
|
|
eclipse-sdk-47 = buildEclipse {
|
|
|
|
name = "eclipse-sdk-4.7";
|
|
|
|
description = "Eclipse Oxygen Classic";
|
|
|
|
sources = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-SDK-4.7-linux-gtk-x86_64.tar.gz;
|
|
|
|
sha256 = "1nz0hl0gg4a8iffnaggbhdw0ra8a7wljlimvijbbybh0nhvfd9n3";
|
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-SDK-4.7-linux-gtk.tar.gz;
|
|
|
|
sha256 = "0dar69v7d7bkl18si45bccvil809a85ghb7k88m1q2cq1kd2r8z5";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-20 20:04:38 +02:00
|
|
|
eclipse-sdk-37 = buildEclipse {
|
|
|
|
name = "eclipse-sdk-3.7";
|
|
|
|
description = "Eclipse Classic";
|
2016-01-20 20:28:53 +01:00
|
|
|
sources = {
|
|
|
|
"x86_64-linux" = fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops/R-3.7.2-201202080800/eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "0nf4nv7awhp1k8b1hjb7chpjyjrqnyszsjbc4dlk9phpjv3j4wg5";
|
2016-01-20 20:28:53 +01:00
|
|
|
};
|
|
|
|
"i686-linux" = fetchurl {
|
2016-10-28 23:04:07 +02:00
|
|
|
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops/R-3.7.2-201202080800/eclipse-SDK-3.7.2-linux-gtk.tar.gz;
|
2016-10-20 20:04:38 +02:00
|
|
|
sha256 = "1isn7i45l9kyn2yx6vm88jl1gnxph8ynank0aaa218cg8kdygk7j";
|
2016-01-20 20:28:53 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2016-10-20 20:04:38 +02:00
|
|
|
eclipse_sdk_37 = eclipse-sdk-37; # backward compatibility, added 2016-01-30
|
2016-01-20 20:28:53 +01: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
|
|
|
}
|