Home Explore Blog Models CI



nixpkgs

1st chunk of `pkgs/applications/editors/jetbrains/readme.md`
94e9b57d34fc3f283ca5076747f7200ff6ec7146d25e0b960000000100000896
This directory contains the build expressions needed to build any of the jetbrains IDEs.
The jdk is in `pkgs/development/compilers/jetbrains-jdk`.

## Tests:
- To test the build process of every IDE (as well as the process for adding plugins), build `jetbrains.plugins.tests.empty`.
- To test the build process with all plugins\* supported by all IDEs, build `jetbrains.plugins.tests.all`.
- To test only plugins for a specific IDE\*, build `jetbrains.ide-name.tests.plugins.all`.
- To test that plugins are correctly stored in the plugins directory, build `jetbrains.plugins.tests.stored-correctly`.

\*: Plugins marked as broken in nixpkgs are skipped: When updating/fixing plugins, please check the `broken-plugins` in `plugins/tests.nix` and update it if needed.

## How to use plugins:
 - Get the ide you want and call `jetbrains.plugins.addPlugins` with a list of plugins you want to add.
 - The list of plugins can be a list of ids or names (as in `plugins/plugins.json`)
 - Example: `jetbrains.plugins.addPlugins jetbrains.pycharm-professional [ "nixidea" ]`
 - The list can also contain drvs giving the directory contents of the plugin (this is how you use a plugin not added to nixpkgs) or a single `.jar` (executable). For an example, look at the implementation of `fetchPluginSrc` in `plugins/default.nix`.

### How to add a new plugin to nixpkgs
 - Find the page for the plugin on https://plugins.jetbrains.com
 - Find the id (it's the number after https://plugins.jetbrains.com/plugin/)
 - Run `plugins/update_plugins.py` add (plugin id)
 - If binaries need patch or some other special treatment, add an entry to `plugins/specialPlugins.nix`

## How to update stuff:
 - Run ./bin/update_bin.py, this will update binary IDEs and plugins, and automatically commit them
 - Source builds need a bit more effort, as they **aren't automated at the moment**:
   - Run ./source/update.py ./source/ides.json ./bin/versions.json. This will update the source version to the version of their corresponding binary packages.
   - Run these commands respectively:
     - `nix build .#jetbrains.idea-community-src.src.src && ./source/build_maven.py source/idea_maven_artefacts.json result/` for IDEA

Title: JetBrains IDE Builds, Plugins, and Updates
Summary
This document outlines the process for building JetBrains IDEs, specifying that the JDK is located in `pkgs/development/compilers/jetbrains-jdk`. It details various testing procedures, including building all IDEs and plugins, or specific IDE plugins. Instructions are provided for adding plugins to an IDE using `jetbrains.plugins.addPlugins`, either by ID/name or by providing direct plugin directories/JARs. The process for adding new plugins to nixpkgs is also described, involving finding the plugin ID and running an update script. Finally, it covers updating components, noting that binary IDEs and plugins can be updated automatically, while source builds require a manual process involving updating source versions and building Maven artifacts.