mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
7a8b142607
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]: |
||
---|---|---|
.. | ||
plugins | ||
darwin.nix | ||
default.nix | ||
JetbrainsRemoteDev.patch | ||
linux.nix | ||
update_ides.py | ||
versions.json |