Skip to content
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

jetbrains: fix JRE configuration for devcontainer development #297695

Closed

Conversation

atishnazir
Copy link

Description of changes

Jetbrains IDEs download the remote client GUI on each invocation. This client is not patched for Nix and includes its own JDK. JDK selection can be overridden through environment variable (to a Nix patched version).

Previously this was done with JETBRAINSCLIENT_JDK, now it should be done with JETBRAINS_CLIENT_JDK.

See previous PR #195132.

Without this change when trying to start a devcontainer session with either IntelliJ Ultimate or Jetbrains Gateway fails due to attempting to invoke the internally bundled JRE.

Things done

Set JETBRAINS_CLIENT_JDK in addition to JETBRAINSCLIENT_JDK to preserve inconsistent behaviour of downloaded clients.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Manually tested with the following environment:

nix-shell -I nixpkgs=$NIXPKGS -p jetbrains.gateway -p jetbrains.idea-ultimate 

Checked that IntelliJ Ultimate and Jetbrains Gateway is able to start a devcontainer for the Jetbrains sample project and author's own Go based projects.

Using following script to check environment variables were set as expected:

cat /proc/$(pgrep -f JetBrainsClient)/environ | xargs -0 -n1 echo | grep  JDK
JDK_HOME=/nix/store/a9hjq76qi7acm4pfi928ih7z70d5bndj-jetbrains-jdk-jcef-17.0.8-b1000.8/lib/openjdk
IDEA_JDK=/nix/store/a9hjq76qi7acm4pfi928ih7z70d5bndj-jetbrains-jdk-jcef-17.0.8-b1000.8/lib/openjdk
JETBRAINSCLIENT_JDK=/nix/store/a9hjq76qi7acm4pfi928ih7z70d5bndj-jetbrains-jdk-jcef-17.0.8-b1000.8/lib/openjdk
JETBRAINS_CLIENT_JDK=/nix/store/a9hjq76qi7acm4pfi928ih7z70d5bndj-jetbrains-jdk-jcef-17.0.8-b1000.8/lib/openjdk

Jetbrains IDEs download the remote client GUI on each invocation.
This client is not patched for Nix and includes its own JDK.  JDK
selection can be overriden through environment variable (to a Nix
patched version).

Previously this was done with `JETBRAINSCLIENT_JDK`, now it should
be done with `JETBRAINS_CLIENT_JDK`.

See previous PR NixOS#195132.
@atishnazir
Copy link
Author

When checking my PR references, I see that this duplicates #249699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants