Commit Graph

20 Commits

Author SHA1 Message Date
Artturi
10e07e27ef
Merge pull request #246622 from GenericNerdyUsername/jetbrains-allow-vmopts-override 2023-10-14 05:55:42 +03:00
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
nixdrin
8ff6850f25 jetbrains: drop libstdc++.so.6 from 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, there is one outlier: stdenv.cc.cc.lib is also added to the
LD_LIBRARY_PATH for libstdc++.so.6 because it is reportedly needed
for some "internals". It does not make sense to access libstdc++
from Java code so it feels like this one was added to work around
some native library or executable that should be patched instead
of using LD_LIBRARY_PATH.

Unfortunately, having libstdc++ in LD_LIBRARY_PATH can also easily
cause ABI conflicts. This is because this variable is inherited into
terminals opened within the IDE. Using a Nix environment there with
different versions of libstdc++ easily causes errors such as

  libstdc++.so.6: version `GLIBCXX_3.4.29' not found

Most of the IDEs work just fine without having libstdc++ in
LD_LIBRARY_PATH. Since it's not really clear why it has to be in
there let's just drop it to avoid the ABI conflicts.

[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:47 +02:00
Pavel Anpin
bee39a0151 jetbrains added udev to extraLdPath 2023-09-10 20:35:23 +03:00
GenericNerdyUsername
1b11184175
jetbrains.*: allow overriding of the vmopts file 2023-08-01 18:40:49 +01:00
Oscar Molnar
4d0d2601a6 jetbrains: fix remote dev server for IDEs
Adds the necessary patch to fix the remote dev server in the Jetbrains IDEs ( see #153335 ).
2023-07-16 16:11:47 +01:00
GenericNerdyUsername
dd47be7ec8
jetbrains.*: replace jbr directory instead of removing 2023-07-13 19:44:59 +01:00
Janik
27e754677b
Merge pull request #240521 from GenericNerdyUsername/jetbrains-plugins-overhauled 2023-07-01 09:50:32 +02:00
Tillerino
89a9b36d69
jetbrains: fix application icon (#239416)
My Desktop doesn't recognize the icon in ~/.local/share/pixmaps which is
how the icon would have to be found when doing a user profile install.

For me, it's hard to find information on this, but it seems like
share/pixmaps is something old and the share/icons location should be
used instead:

https://www.reddit.com/r/linuxquestions/comments/htg6c/comment/c1yfi0a/

https://github.com/spyder-ide/spyder/issues/6188

https://github.com/FreeSpacenav/spnavcfg/issues/9

In this PR we _add_ the icons location so that both are available for
compatibility.
2023-06-26 20:33:58 +02:00
GenericNerdyUsername
f797b35da3
jetbrains: add plugin support 2023-06-26 12:36:29 +01:00
Matthew Penner
a9a080a60b
jetbrains: add python3 to PATH 2023-05-26 11:43:30 -06:00
Shawn8901
3866fa44a7 treewide: remove global with lib; in pkgs/{audio,blockchain,editors} 2023-01-21 23:11:12 +01:00
GenericNerdyUsername
b1efcf7886
jetbrains-jdk: add JCEF support 2023-01-14 11:37:38 +00:00
Artturin
05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Dominik Ritter
62104560c4 jetbrains.mps: Fix build 2022-11-05 10:21:57 +01:00
Steven Kou
2b387a08cc
jetbrains: set JDK for JetBrains Client 2022-10-13 01:57:23 +08:00
Artturin
c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
Artturin
0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
Felix Buehler
e0476d93fe treewide: rename name to pname&version 2022-03-23 22:34:54 +01:00
Jason Pickens
5497a92786
jetbrains: add support for Apple M1 2022-03-13 12:50:19 +13:00