nixpkgs/pkgs/applications/editors/jetbrains
nixdrin 7a8b142607 jetbrains: use -Djna.libary.path instead of LD_LIBRARY_PATH
Most of the libraries listed in the LD_LIBRARY_PATH for the Jetbrains
IDEs are loaded indirectly using JNA in Java code, e.g.

  myLibNotify = Native.load("libnotify.so.4", LibNotify.class); [1]
  private val library = Native.load("secret-1", SecretLibrary::class.java) [2]

In this case the typical patching mechanism with Nix does not work
because JNA does the library lookup at runtime with its own mechanism.

However, to avoid causing ABI conflicts when using Nix in the terminal
of the IDE it's better to avoid using LD_LIBRARY_PATH. JNA also looks
for a "jna.library.path" Java system property when looking for libraries.

Generate that property with the needed paths instead and append it to
the vmopts file so that the property is applied when starting the IDE.
With this the libraries only become available for the IDE and do not
leak into terminals opened within the IDE context.

[1]: c0a703267a/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java (L40)
[2]: c0a703267a/platform/credential-store/src/linuxSecretLibrary.kt (L38)
2023-10-08 17:15:48 +02:00
..
plugins jetbrains.plugins: add new Rust plugin 2023-09-28 15:59:56 +02:00
darwin.nix jetbrains.rust-rover: fix darwin install (#258814) 2023-10-04 18:49:31 +02:00
default.nix jetbrains.gateway: remove maintainer 2023-10-05 01:30:54 -04:00
JetbrainsRemoteDev.patch jetbrains: fix remote dev server for IDEs 2023-07-16 16:11:47 +01:00
linux.nix jetbrains: use -Djna.libary.path instead of LD_LIBRARY_PATH 2023-10-08 17:15:48 +02:00
update_ides.py jetbrains: Commit in one line 2023-08-13 00:33:23 +02:00
versions.json jetbrains: 2023.2 -> 2023.2.2 2023-09-23 12:59:58 +02:00