contents of my *~/.config/* directory
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/nixpkgs/jdk17.nix

27 lines
1.2 KiB

{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
name = "openjdk17"; # name of the package
sourceRoot = ".";
src = fetchurl { # there's also fetchgit and other helpers
url = "https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz";
sha256 = "1c0a73cbb863aad579b967316bf17673b8f98a9bb938602a140ba2e5c38f880a";
};
installPhase = ''
mkdir -pv $out/share/java $out/bin
cp -r ./plugins/ $out
cp -r ./features/ $out
cp -r ./bin/ $out
makeWrapper ${jre}/bin/java $out/bin/eclipse-jdt-ls \
--add-flags "--add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
-noverify -Xmx1G \
-jar $out/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar \
-configuration ~/.config/eclipse/ \
-data ~/.eclipse/" \
--set _JAVA_OPTIONS "-Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.level=ALL -Dfile.encoding=utf-8"
'';
}