summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authornixdrin <146267602+nixdrin@users.noreply.github.com>2023-09-28 20:04:03 +0200
committernixdrin <146267602+nixdrin@users.noreply.github.com>2023-10-08 17:15:48 +0200
commit7a8b142607999eb082a5fb9be5ec75d2cdedc50e (patch)
tree6ca553c0dfea57ba820c28654c0afcf580bb6d75 /pkgs/development/python-modules/rangehttpserver
parent8ff6850f2564d26a91b30eb8f7993a7a2c3bf4bb (diff)
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]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java#L40 [2]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/credential-store/src/linuxSecretLibrary.kt#L38
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions