forked from mirrors/nixpkgs
eclipses: 2022-12 -> 2023-03
* generalize the justj-stripping regex a tad, since it has grown a
trailing /java in some flavors of eclipse.
* resurrect .eclipseproduct workaround from 2012-12 /
8a7561ec09
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
5f4e07deb7
commit
52eac4e1d5
|
@ -2,7 +2,7 @@
|
|||
, zlib, jdk, glib, glib-networking, gtk, libXtst, libsecret, gsettings-desktop-schemas, webkitgtk
|
||||
, makeWrapper, perl, ... }:
|
||||
|
||||
{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description }:
|
||||
{ name, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null, description, productVersion }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||
categories = [ "Development" ];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper perl ];
|
||||
buildInputs = [
|
||||
fontconfig freetype glib gsettings-desktop-schemas gtk jdk libX11
|
||||
libXrender libXtst libsecret zlib
|
||||
|
@ -38,14 +38,13 @@ stdenv.mkDerivation rec {
|
|||
# settings in ~/.eclipse/org.eclipse.platform_<version> rather
|
||||
# than ~/.eclipse/org.eclipse.platform_<version>_<number>.
|
||||
productId=$(sed 's/id=//; t; d' $out/eclipse/.eclipseproduct)
|
||||
productVersion=$(sed 's/version=//; t; d' $out/eclipse/.eclipseproduct)
|
||||
|
||||
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
|
||||
--prefix PATH : ${jdk}/bin \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ glib gtk libXtst libsecret ] ++ lib.optional (webkitgtk != null) webkitgtk)} \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
|
||||
--add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration"
|
||||
--add-flags "-configuration \$HOME/.eclipse/''${productId}_${productVersion}/configuration"
|
||||
|
||||
# Create desktop item.
|
||||
mkdir -p $out/share/applications
|
||||
|
@ -54,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||
ln -s $out/eclipse/icon.xpm $out/share/pixmaps/eclipse.xpm
|
||||
|
||||
# ensure eclipse.ini does not try to use a justj jvm, as those aren't compatible with nix
|
||||
${perl}/bin/perl -i -p0e 's|-vm\nplugins/org.eclipse.justj.*/jre/bin\n||' $out/eclipse/eclipse.ini
|
||||
perl -i -p0e 's|-vm\nplugins/org.eclipse.justj.*/jre/bin.*\n||' $out/eclipse/eclipse.ini
|
||||
''; # */
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
# find the downloads needed for new versions
|
||||
#
|
||||
# to test:
|
||||
# $ 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
|
||||
# for e in cpp modeling platform sdk java jee committers rcp; do for s in pkgs pkgsCross.aarch64-multiplatform; do echo; echo $s $e; nix build -f default.nix ${s}.eclipses.eclipse-${e} -o eclipse-${s}-${e}; done; done
|
||||
|
||||
let
|
||||
platform_major = "4";
|
||||
platform_minor = "26";
|
||||
year = "2022";
|
||||
month = "12"; #release month
|
||||
buildmonth = "11"; #sometimes differs from release month
|
||||
timestamp = "${year}${buildmonth}231800";
|
||||
platform_minor = "27";
|
||||
year = "2023";
|
||||
month = "03"; #release month
|
||||
buildmonth = "03"; #sometimes differs from release month
|
||||
timestamp = "${year}${buildmonth}020300";
|
||||
gtk = gtk3;
|
||||
arch = if stdenv.hostPlatform.isx86_64 then
|
||||
"x86_64"
|
||||
|
@ -27,11 +27,13 @@ let
|
|||
else throw "don't know what platform suffix for ${stdenv.hostPlatform.system} will be";
|
||||
in rec {
|
||||
|
||||
buildEclipse = callPackage ./build-eclipse.nix {
|
||||
# work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=476075#c3
|
||||
buildEclipseUnversioned = callPackage ./build-eclipse.nix {
|
||||
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
|
||||
jdk glib gtk libXtst gsettings-desktop-schemas webkitgtk
|
||||
makeWrapper;
|
||||
};
|
||||
buildEclipse = eclipseData: buildEclipseUnversioned (eclipseData // { productVersion = "${platform_major}.${platform_minor}"; });
|
||||
|
||||
### Eclipse CPP
|
||||
|
||||
|
@ -42,8 +44,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-nqqY4dewq1bjeNoZdWvOez+cBti+f9qXshx1eqJ2lB7sGJva5mcR9e+CZTVD0+EtVJ/U+8viJ+E1Veht1ZnqOw==";
|
||||
aarch64 = "sha512-kmeNH6F8oK72LtrYtiJVLKhy6Q1HwnU+Bh+mpXdXSrfj9KtqzHQkJ0kTnnJkGYLtpi+zyXDwsxzyjh6pPyDRJA==";
|
||||
x86_64 = "sha256-MBng3ETarHMlUUPpVvMIZxVqpe9JW5xNHonnN6CHRcw=";
|
||||
aarch64 = "sha256-7FgpPzp5MY/fB6Q/wvrvi+Lpcm3tmH7bUTLh7q2Rjek=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -57,8 +59,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-WU2BJt6GL3ug3yOUOd5y6/AbGLcr2MkCg+QJiNIMkSXvoU9TF6R6oimoGVc3kPZmazRy6WYoes55T3bWrHnO8Q==";
|
||||
aarch64 = "sha512-F63f2o9u/p7hhrxI+Eu6NiL4sPccIYw876Nnj8mfSZ7bozs1OVNWftZj+xbdLLbr0bVz3WKnt4BHzcLUA6QG7g==";
|
||||
x86_64 = "sha256-BXofrKElgCG3+WUCanpX1sGLhirj2pLi+pi24Z+WjBk=";
|
||||
aarch64 = "sha256-CdePRa6jmWlt3Wismt3RahGzYOm1ZDwQRt82kRVXSdM=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -72,8 +74,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-hmdWGteMDt4HhYq+k9twuftalpTzHtGnVVLphZcpJcw+6vJfersciDMaeLRqbCAeFbzJdgzjYo76bpP6FubySw==";
|
||||
aarch64 = "sha512-BvUkOdCsjwtscPeuBXG7ZpitOr8EQK5JL8nSGpw/RhhBEFz46nsc7W18l0aYjdzRHh2ie55RylS2PEQELkS/hQ==";
|
||||
x86_64 = "sha256-aprXjNv2NMoIDCNkFxwmMKcGUt2ssRonzTZ/hH57Mig=";
|
||||
aarch64 = "sha256-Aq9PDVo/9zTeQ2j6q5bf1aIKjKM7oonIr1mEQ7rX48Y=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -81,9 +83,10 @@ in rec {
|
|||
### Eclipse Scala SDK
|
||||
|
||||
eclipse-scala-sdk =
|
||||
(buildEclipse.override { jdk = jdk8; gtk = gtk2; } {
|
||||
(buildEclipseUnversioned.override { jdk = jdk8; gtk = gtk2; } {
|
||||
name = "eclipse-scala-sdk-4.7.0";
|
||||
description = "Eclipse IDE for Scala Developers";
|
||||
productVersion = "4.7";
|
||||
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";
|
||||
|
@ -103,8 +106,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-yH4/K9sBLCUc2EVYwPL0dLql/S3AfaV6fFh7ewAuIb7yHtcsOWMqy/h1hZUlFFg2ykfwDWDDHEK7qfTI0hM7BQ==";
|
||||
aarch64 = "sha512-UYp8t7r2RrN3rKN180cWpJyhyO5LVXL8LrTRKJzttUgB7kM1nroTEI3DesBu+Hw4Ynl7eLiBK397rqcpOAfxJw==";
|
||||
x86_64 = "sha256-39DXU7wIsdxkUpNKnYPT7+qPJ2DrF7G7UJqPfhEDGGs=";
|
||||
aarch64 = "sha256-7GwKGNHWPZ3uOFyzQj1dftFFz/3oa2j8XWkRn0wnllY=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -118,8 +121,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-71mXYVLVnyDjYZbJGBKc0aDPq8sbTxlVZRQq7GlSUDv2fsoNYWYgqYfK7RSED5yoasCfs3HUYr7QowRAKJOnfQ==";
|
||||
aarch64 = "sha512-KOQ6BZuQJeVpbMQVxF67M3F/KXMmDhmZQBNq0yWM+/8+d0DiBRkwJtqPYsnTqrax8FSunn2yy+CzlfyHSoNvpg==";
|
||||
x86_64 = "sha256-zNBzFHmNaxUutzMh/5pOglJiKh5NAvSVwvPYyA6RVr4=";
|
||||
aarch64 = "sha256-RtLXB9kgpLERfhpvDTaJG84qVyN1Puud1PTZtk/WIO0=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -133,8 +136,8 @@ in rec {
|
|||
fetchurl {
|
||||
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==";
|
||||
x86_64 = "sha256-vpvmKZKVl6ubfq8QMDr0xprXYMWl576hu+ovvREN4ak=";
|
||||
aarch64 = "sha256-5Yqxgl4kkN3Bb7hsTnd9q5TsCpVBVkEVvqPbL5MYEyg=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -148,8 +151,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha512-zGeynifM0dn1214HEVS7OVtv7xa8asjLzOXh5riJK8c/DWvNrRduHn6o6PGnxYOYVIfC9BzNRAjG1STkWu9j+Q==";
|
||||
aarch64 = "sha512-B866dFJcsTkq+h0RZ61CxXE83TWvCf8ZAbGeIC385PpPR3i/gZnRjN2oRrDP22CNR5XXA+PfXKxqvERhJB5ebA==";
|
||||
x86_64 = "sha256-4SAiEZWSUaiK8QO2Hg39FBcj1aYRtbOJkeF1W1AMQBo=";
|
||||
aarch64 = "sha256-+KGDlo6QK3o/n2vSiD0HpIkBwqwIiMXzdFUpfE48gps=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
@ -163,8 +166,8 @@ in rec {
|
|||
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-${arch}.tar.gz";
|
||||
hash = {
|
||||
x86_64 = "sha256-ml76ix0fHuR0KqYWQuTftEBAgq7iaOIyvr8V6WhuzeU=";
|
||||
aarch64 = "sha256-sMB6a3f0fiL6ZentIjJTMi59ZOh7dizXrkMQuIRbds0=";
|
||||
x86_64 = "sha256-bhcpzsS9cci3Y3Pk9DOrtPonKjRg/vzDqDr3Be/xfks=";
|
||||
aarch64 = "sha256-YCb4leFWRtx4VPwK/5vgwwDH3/f0/0OWEy4ueAS7sUw=";
|
||||
}.${arch};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -254,13 +254,13 @@ rec {
|
|||
|
||||
cdt = buildEclipseUpdateSite rec {
|
||||
name = "cdt-${version}";
|
||||
# find current version at https://www.eclipse.org/cdt/downloads.php
|
||||
version = "11.0.0";
|
||||
# find current version at https://github.com/eclipse-cdt/cdt/releases
|
||||
version = "11.1.1";
|
||||
|
||||
src = fetchzip {
|
||||
stripRoot = false;
|
||||
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/${lib.versions.majorMinor version}/${name}/${name}.zip";
|
||||
hash = "sha256-2rt9crMqNFevIHFIdOGWDq+j0ZJPVt1a9Z7P9HG58Ks=";
|
||||
hash = "sha256-k78QKPIb3Lr0Wcg2tTlX1abdpcvxspjaxJiP2Hrgb4A=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue