16 gsettings-desktop-schemas,
25 src ? builtins.getAttr stdenv.hostPlatform.system sources,
31 stdenv.mkDerivation rec {
34 desktopItem = makeDesktopItem {
38 comment = "Integrated Development Environment";
39 desktopName = "Eclipse IDE";
40 genericName = "Integrated Development Environment";
41 categories = [ "Development" ];
52 gsettings-desktop-schemas
60 ] ++ lib.optional (webkitgtk_4_0 != null) webkitgtk_4_0;
68 interpreter="$(cat $NIX_BINTOOLS/nix-support/dynamic-linker)"
69 libCairo=$out/eclipse/libcairo-swt.so
70 patchelf --set-interpreter $interpreter $out/eclipse/eclipse
71 [ -f $libCairo ] && patchelf --set-rpath ${
81 # Create wrapper script. Pass -configuration to store
82 # settings in ~/.eclipse/org.eclipse.platform_<version> rather
83 # than ~/.eclipse/org.eclipse.platform_<version>_<number>.
84 productId=$(sed 's/id=//; t; d' $out/eclipse/.eclipseproduct)
86 makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
87 --prefix PATH : ${jdk}/bin \
88 --prefix LD_LIBRARY_PATH : ${
96 ++ lib.optional (webkitgtk_4_0 != null) webkitgtk_4_0
99 --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
100 --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
101 --add-flags "-configuration \$HOME/.eclipse/''${productId}_${productVersion}/configuration"
103 # Create desktop item.
104 mkdir -p $out/share/applications
105 cp ${desktopItem}/share/applications/* $out/share/applications
106 mkdir -p $out/share/pixmaps
107 ln -s $out/eclipse/icon.xpm $out/share/pixmaps/eclipse.xpm
109 # ensure eclipse.ini does not try to use a justj jvm, as those aren't compatible with nix
110 perl -i -p0e 's|-vm\nplugins/org.eclipse.justj.*/jre/bin.*\n||' $out/eclipse/eclipse.ini
114 homepage = "https://www.eclipse.org/";
116 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];