2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper
|
2018-07-21 00:44:44 +00:00
|
|
|
, freetype, fontconfig, libX11, libXrender, zlib
|
2020-04-16 19:24:50 +00:00
|
|
|
, glib, gtk3, gtk2, libXtst, jdk, jdk8, gsettings-desktop-schemas
|
2018-03-07 20:29:51 +00:00
|
|
|
, webkitgtk ? null # for internal web browser
|
2018-07-21 00:44:44 +00:00
|
|
|
, buildEnv, runCommand
|
2015-07-30 21:36:14 +00:00
|
|
|
, callPackage
|
2016-09-11 21:24:51 +00:00
|
|
|
}:
|
2009-05-13 13:55:53 +00:00
|
|
|
|
2020-06-18 22:49:27 +00:00
|
|
|
# https://download.eclipse.org/eclipse/downloads/ is the main place to
|
2017-10-18 16:11:14 +00:00
|
|
|
# find the downloads needed for new versions
|
2020-11-19 18:27:15 +00:00
|
|
|
#
|
|
|
|
# to test:
|
2021-04-09 15:32:42 +00:00
|
|
|
# $ for e in cpp modeling platform sdk java jee committers rcp; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done
|
2017-10-18 16:11:14 +00:00
|
|
|
|
2019-02-11 18:22:02 +00:00
|
|
|
let
|
|
|
|
platform_major = "4";
|
2023-01-02 23:44:39 +00:00
|
|
|
platform_minor = "26";
|
2022-04-04 13:33:21 +00:00
|
|
|
year = "2022";
|
2023-01-02 23:44:39 +00:00
|
|
|
month = "12"; #release month
|
|
|
|
buildmonth = "11"; #sometimes differs from release month
|
|
|
|
timestamp = "${year}${buildmonth}231800";
|
2020-04-16 19:24:50 +00:00
|
|
|
gtk = gtk3;
|
2023-01-15 12:34:14 +00:00
|
|
|
arch = if stdenv.hostPlatform.isx86_64 then
|
|
|
|
"x86_64"
|
|
|
|
else if stdenv.hostPlatform.isAarch64 then
|
|
|
|
"aarch64"
|
|
|
|
else throw "don't know what platform suffix for ${stdenv.hostPlatform.system} will be";
|
2019-02-11 18:22:02 +00:00
|
|
|
in rec {
|
2010-05-09 14:17:21 +00:00
|
|
|
|
2023-01-02 23:44:39 +00:00
|
|
|
buildEclipse = callPackage ./build-eclipse.nix {
|
2017-03-04 19:21:25 +00:00
|
|
|
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
2020-04-16 19:24:50 +00:00
|
|
|
jdk glib gtk 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 14:17:21 +00:00
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Eclipse CPP
|
2016-10-20 18:04:38 +00: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}";
|
2019-12-21 20:22:53 +00:00
|
|
|
description = "Eclipse IDE for C/C++ Developers";
|
2011-04-11 20:29:47 +00:00
|
|
|
src =
|
2019-02-11 18:22:02 +00:00
|
|
|
fetchurl {
|
2023-01-15 12:34:14 +00: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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-nqqY4dewq1bjeNoZdWvOez+cBti+f9qXshx1eqJ2lB7sGJva5mcR9e+CZTVD0+EtVJ/U+8viJ+E1Veht1ZnqOw==";
|
|
|
|
aarch64 = "sha512-kmeNH6F8oK72LtrYtiJVLKhy6Q1HwnU+Bh+mpXdXSrfj9KtqzHQkJ0kTnnJkGYLtpi+zyXDwsxzyjh6pPyDRJA==";
|
|
|
|
}.${arch};
|
2019-02-11 18:22:02 +00:00
|
|
|
};
|
2015-03-18 15:30:01 +00:00
|
|
|
};
|
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Eclipse Modeling
|
2011-04-11 20:29:47 +00: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 15:27:01 +00:00
|
|
|
description = "Eclipse Modeling Tools";
|
|
|
|
src =
|
2019-02-11 18:22:02 +00:00
|
|
|
fetchurl {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-WU2BJt6GL3ug3yOUOd5y6/AbGLcr2MkCg+QJiNIMkSXvoU9TF6R6oimoGVc3kPZmazRy6WYoes55T3bWrHnO8Q==";
|
|
|
|
aarch64 = "sha512-F63f2o9u/p7hhrxI+Eu6NiL4sPccIYw876Nnj8mfSZ7bozs1OVNWftZj+xbdLLbr0bVz3WKnt4BHzcLUA6QG7g==";
|
|
|
|
}.${arch};
|
2019-02-11 18:22:02 +00:00
|
|
|
};
|
2016-10-20 15:27:01 +00:00
|
|
|
};
|
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Eclipse Platform
|
2016-10-20 18:04:38 +00: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 {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-hmdWGteMDt4HhYq+k9twuftalpTzHtGnVVLphZcpJcw+6vJfersciDMaeLRqbCAeFbzJdgzjYo76bpP6FubySw==";
|
|
|
|
aarch64 = "sha512-BvUkOdCsjwtscPeuBXG7ZpitOr8EQK5JL8nSGpw/RhhBEFz46nsc7W18l0aYjdzRHh2ie55RylS2PEQELkS/hQ==";
|
|
|
|
}.${arch};
|
2019-02-11 18:22:02 +00:00
|
|
|
};
|
2018-09-27 16:58:22 +00:00
|
|
|
};
|
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Eclipse Scala SDK
|
2016-09-08 07:56:17 +00:00
|
|
|
|
2020-04-16 19:24:50 +00:00
|
|
|
eclipse-scala-sdk =
|
2023-01-15 12:34:14 +00:00
|
|
|
(buildEclipse.override { jdk = jdk8; gtk = gtk2; } {
|
2020-04-16 19:24:50 +00:00
|
|
|
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 17:47:35 +00:00
|
|
|
};
|
2023-01-15 12:34:14 +00:00
|
|
|
}).overrideAttrs(oa: {
|
|
|
|
# Only download for x86_64
|
|
|
|
meta.platforms = [ "x86_64-linux" ];
|
|
|
|
});
|
2014-06-28 17:47:35 +00:00
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Eclipse SDK
|
2015-07-26 08:33:10 +00: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 {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
2023-02-07 16:35:28 +00:00
|
|
|
x86_64 = "sha512-yH4/K9sBLCUc2EVYwPL0dLql/S3AfaV6fFh7ewAuIb7yHtcsOWMqy/h1hZUlFFg2ykfwDWDDHEK7qfTI0hM7BQ==";
|
2023-01-15 12:34:14 +00:00
|
|
|
aarch64 = "sha512-UYp8t7r2RrN3rKN180cWpJyhyO5LVXL8LrTRKJzttUgB7kM1nroTEI3DesBu+Hw4Ynl7eLiBK397rqcpOAfxJw==";
|
|
|
|
}.${arch};
|
2019-02-11 18:22:02 +00:00
|
|
|
};
|
2018-09-27 16:58:22 +00:00
|
|
|
};
|
|
|
|
|
2018-10-14 12:02:23 +00: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 12:02:23 +00:00
|
|
|
description = "Eclipse IDE for Java Developers";
|
|
|
|
src =
|
2019-02-11 18:22:02 +00:00
|
|
|
fetchurl {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-71mXYVLVnyDjYZbJGBKc0aDPq8sbTxlVZRQq7GlSUDv2fsoNYWYgqYfK7RSED5yoasCfs3HUYr7QowRAKJOnfQ==";
|
|
|
|
aarch64 = "sha512-KOQ6BZuQJeVpbMQVxF67M3F/KXMmDhmZQBNq0yWM+/8+d0DiBRkwJtqPYsnTqrax8FSunn2yy+CzlfyHSoNvpg==";
|
|
|
|
}.${arch};
|
2021-04-09 15:32:42 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
### Eclipse Java EE
|
|
|
|
|
|
|
|
eclipse-jee = buildEclipse {
|
|
|
|
name = "eclipse-jee-${platform_major}.${platform_minor}";
|
|
|
|
description = "Eclipse IDE for Enterprise Java and Web Developers";
|
|
|
|
src =
|
|
|
|
fetchurl {
|
2023-01-15 12:34:14 +00:00
|
|
|
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-jee-${year}-${month}-R-linux-gtk-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-55i9YVOa+vKHt72vHIqy9BmKMkg1KaLqMStjTtfaLTH5yP0ei+NTP2XL8IBHOgu0hCEJqYXTq+3I3RQy476etQ==";
|
|
|
|
aarch64 = "sha512-iaoTB/Pinoj1weiGBBv0plQ4jGNdFs2JiBG7S/icUoAX5O6jTGAgJvOwh7Nzn+0N6YL6+HPWaV24a6lM43y8Og==";
|
|
|
|
}.${arch};
|
2019-02-11 18:22:02 +00:00
|
|
|
};
|
2018-10-14 12:02:23 +00:00
|
|
|
};
|
|
|
|
|
2020-01-28 09:36:19 +00: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 {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha512-zGeynifM0dn1214HEVS7OVtv7xa8asjLzOXh5riJK8c/DWvNrRduHn6o6PGnxYOYVIfC9BzNRAjG1STkWu9j+Q==";
|
|
|
|
aarch64 = "sha512-B866dFJcsTkq+h0RZ61CxXE83TWvCf8ZAbGeIC385PpPR3i/gZnRjN2oRrDP22CNR5XXA+PfXKxqvERhJB5ebA==";
|
|
|
|
}.${arch};
|
2020-01-28 09:36:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-12-08 15:56:17 +00: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 {
|
2023-01-15 12:34:14 +00:00
|
|
|
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-${arch}.tar.gz";
|
|
|
|
hash = {
|
|
|
|
x86_64 = "sha256-ml76ix0fHuR0KqYWQuTftEBAgq7iaOIyvr8V6WhuzeU=";
|
|
|
|
aarch64 = "sha256-sMB6a3f0fiL6ZentIjJTMi59ZOh7dizXrkMQuIRbds0=";
|
|
|
|
}.${arch};
|
2020-12-20 15:13:31 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Environments
|
2016-03-19 10:45:04 +00:00
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
# Function that assembles a complete Eclipse environment from an
|
|
|
|
# Eclipse package and list of Eclipse plugins.
|
2015-07-26 08:33:10 +00:00
|
|
|
eclipseWithPlugins = { eclipse, plugins ? [], jvmArgs ? [] }:
|
|
|
|
let
|
|
|
|
# Gather up the desired plugins.
|
|
|
|
pluginEnv = buildEnv {
|
|
|
|
name = "eclipse-plugins";
|
2015-07-29 21:29:38 +00:00
|
|
|
paths =
|
2021-01-15 13:21:58 +00:00
|
|
|
with lib;
|
2015-07-29 21:29:38 +00:00
|
|
|
filter (x: x ? isEclipsePlugin) (closePropagation plugins);
|
2015-07-26 08:33:10 +00: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";
|
2021-01-15 13:21:58 +00:00
|
|
|
jvmArgsText = lib.concatStringsSep "\n" (jvmArgs ++ [dropinProp]);
|
2015-07-26 08:33:10 +00:00
|
|
|
|
|
|
|
# Base the derivation name on the name of the underlying
|
|
|
|
# Eclipse.
|
2021-01-15 13:21:58 +00:00
|
|
|
name = (lib.meta.appendToName "with-plugins" eclipse).name;
|
2015-07-26 08:33:10 +00:00
|
|
|
in
|
2021-02-07 09:17:39 +00:00
|
|
|
runCommand name { nativeBuildInputs = [ 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 08:33:10 +00: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 08:33:10 +00:00
|
|
|
|
|
|
|
ln -s ${eclipse}/share $out/
|
|
|
|
'';
|
|
|
|
|
2016-10-21 08:44:31 +00:00
|
|
|
### Plugins
|
|
|
|
|
2015-07-30 21:36:14 +00:00
|
|
|
plugins = callPackage ./plugins.nix { };
|
2015-07-26 08:38:04 +00:00
|
|
|
|
2009-05-13 13:55:53 +00:00
|
|
|
}
|