Jetbrains Tools: Difference between revisions
imported>Magneticflux- Add section on JetBrains Toolbox and workarounds |
imported>Haraldh Add example nix-ld config |
||
Line 28: | Line 28: | ||
It may also help to enable {{ic|nix-ld}} or launch through JetBrains Toolbox itself if the downloaded IDEs are unable to launch; see [https://github.com/NixOS/nixpkgs/issues/240444 nixpkgs#240444]. | It may also help to enable {{ic|nix-ld}} or launch through JetBrains Toolbox itself if the downloaded IDEs are unable to launch; see [https://github.com/NixOS/nixpkgs/issues/240444 nixpkgs#240444]. | ||
With the following configuration {{ic|rustrover}} was successfully started: | |||
programs.nix-ld.enable = true; | |||
programs.nix-ld.libraries = with pkgs; [ | |||
curl | |||
expat | |||
fontconfig | |||
freetype | |||
fuse | |||
fuse3 | |||
glib | |||
icu | |||
libclang.lib | |||
libdbusmenu | |||
libxcrypt-legacy | |||
libxml2 | |||
nss | |||
openssl | |||
python3 | |||
stdenv.cc.cc | |||
xorg.libX11 | |||
xorg.libXcursor | |||
xorg.libXext | |||
xorg.libXi | |||
xorg.libXrender | |||
xorg.libXtst | |||
xz | |||
zlib | |||
]; |
Revision as of 14:54, 5 March 2024
Various JetBrains IDEs and tools are available from nixpkgs under the `jetbrains` namespace. For instance, CLion is available as the jetbrains.clion
package.
Plugins
Some Jetbrains IDE plugins such as Github Copilot need to be patched in order to work on NixOS.
At the time of writing, plugin support is not available in the latest stable version of Nixpkgs (23.05). To install a package from nixos-unstable, see the FAQ.
For example, a package of CLion with the Github Copilot plugin pre-installed can be obtained by adding the following line to your package list:
(pkgs.jetbrains.plugins.addPlugins pkgs.jetbrains.clion ["github-copilot"])
where pkgs is a suitable version of nixpkgs.
Note that Jetbrains IDEs tend to manage their configuration and plugins statefully. For example, if you have previously attempted to install Copilot through the IDE's plugin manager, you may need to delete the IDE's state in as described in the JetBrains documentation.
JetBrains Toolbox
If you (understandably) want to eschew a fully-stateless JetBrains IDE setup, JetBrains Toolbox manages everything under ~/.local/share/JetBrains/Toolbox
but currently (Jan. 2024) needs some tweaks to get working.
- Install
pkgs.jetbrains-toolbox
and launch it once - Edit
~/.local/share/JetBrains/Toolbox/.storage.json
to add the line"preferredKeychain": "linux-fallback"
- Start to log-in normally, but stop after the JetBrains webpage opens
- Reopen JetBrains Toolbox, navigate to Settings, and click "Troubleshoot..."
- Follow the manual login flow as directed
After following these steps, JetBrains Toolbox will store user credentials in an encrypted (with a static key) file at ~/.local/share/JetBrains/Toolbox/.securestorage
. If not followed, JetBrains Toolbox is unable to retrieve credentials via libsecret
(due to bwrap sandboxing?) and persistently notifies the user to re-authorize.
It may also help to enable nix-ld
or launch through JetBrains Toolbox itself if the downloaded IDEs are unable to launch; see nixpkgs#240444.
With the following configuration rustrover
was successfully started:
programs.nix-ld.enable = true; programs.nix-ld.libraries = with pkgs; [ curl expat fontconfig freetype fuse fuse3 glib icu libclang.lib libdbusmenu libxcrypt-legacy libxml2 nss openssl python3 stdenv.cc.cc xorg.libX11 xorg.libXcursor xorg.libXext xorg.libXi xorg.libXrender xorg.libXtst xz zlib ];