-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
jdt-language-server: init at 1.8.0 #99330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| { lib | ||
| , stdenv | ||
| , fetchurl | ||
| , makeWrapper | ||
| , jdk | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "jdt-language-server"; | ||
| version = "1.8.0"; | ||
| timestamp = "202201261434"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://download.eclipse.org/jdtls/milestones/${version}/jdt-language-server-${version}-${timestamp}.tar.gz"; | ||
| sha256 = "0wlnsr72hncdqrbpgfl9hgwqw9d9rppq4iymnjmgfn51rjcqadv8"; | ||
| }; | ||
|
|
||
| sourceRoot = "."; | ||
matt-snider marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| buildInputs = [ | ||
| jdk | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| makeWrapper | ||
| ]; | ||
|
|
||
| installPhase = | ||
| let | ||
| # The application ships with config directories for linux and mac | ||
| configDir = if stdenv.isDarwin then "config_mac" else "config_linux"; | ||
| in | ||
| '' | ||
| # Copy jars | ||
| install -D -t $out/share/java/plugins/ plugins/*.jar | ||
|
|
||
| # Copy config directories for linux and mac | ||
| install -Dm 444 -t $out/share/config ${configDir}/* | ||
|
|
||
| # Get latest version of launcher jar | ||
| # e.g. org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar | ||
| launcher="$(ls $out/share/java/plugins/org.eclipse.equinox.launcher_* | sort -V | tail -n1)" | ||
|
|
||
| # The wrapper script will create a directory in the user's cache, copy in the config | ||
| # files since this dir can't be read-only, and by default use this as the runtime dir. | ||
| # | ||
| # The following options are required as per the upstream documentation: | ||
| # | ||
| # -Declipse.application=org.eclipse.jdt.ls.core.id1 | ||
| # -Dosgi.bundles.defaultStartLevel=4 | ||
| # -Declipse.product=org.eclipse.jdt.ls.core.product | ||
matt-snider marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # -noverify | ||
| # --add-modules=ALL-SYSTEM | ||
| # --add-opens java.base/java.util=ALL-UNNAMED | ||
| # --add-opens java.base/java.lang=ALL-UNNAMED | ||
| # | ||
| # The following options configure the server to run without writing logs to the nix store: | ||
| # | ||
| # -Dosgi.sharedConfiguration.area.readOnly=true | ||
| # -Dosgi.checkConfiguration=true | ||
| # -Dosgi.configuration.cascaded=true | ||
| # -Dosgi.sharedConfiguration.area=$out/share/config | ||
| # | ||
| # Other options which the caller may change: | ||
| # | ||
| # -Dlog.level: | ||
| # Log level. | ||
| # This can be overidden by setting JAVA_OPTS. | ||
| # | ||
| # The caller must specify the following: | ||
| # | ||
| # -data: | ||
| # The application stores runtime data here. We set this to <cache-dir>/$PWD | ||
| # so that projects don't collide with each other. | ||
| # This can be overidden by specifying -configuration to the wrapper. | ||
| # | ||
| # Java options, such as -Xms and Xmx can be specified by setting JAVA_OPTS. | ||
| # | ||
| makeWrapper ${jdk}/bin/java $out/bin/jdt-language-server \ | ||
| --add-flags "-Declipse.application=org.eclipse.jdt.ls.core.id1" \ | ||
| --add-flags "-Dosgi.bundles.defaultStartLevel=4" \ | ||
| --add-flags "-Declipse.product=org.eclipse.jdt.ls.core.product" \ | ||
| --add-flags "-Dosgi.sharedConfiguration.area=$out/share/config" \ | ||
| --add-flags "-Dosgi.sharedConfiguration.area.readOnly=true" \ | ||
| --add-flags "-Dosgi.checkConfiguration=true" \ | ||
| --add-flags "-Dosgi.configuration.cascaded=true" \ | ||
| --add-flags "-Dlog.level=ALL" \ | ||
| --add-flags "-noverify" \ | ||
| --add-flags "\$JAVA_OPTS" \ | ||
| --add-flags "-jar $launcher" \ | ||
| --add-flags "--add-modules=ALL-SYSTEM" \ | ||
| --add-flags "--add-opens java.base/java.util=ALL-UNNAMED" \ | ||
| --add-flags "--add-opens java.base/java.lang=ALL-UNNAMED" | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
| homepage = "https://github.com/eclipse/eclipse.jdt.ls"; | ||
| description = "Java language server"; | ||
| license = licenses.epl20; | ||
| maintainers = with maintainers; [ matt-snider ]; | ||
| }; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.