1This directory contains the build expressions needed to build any of the jetbrains IDEs.
2The jdk is in `pkgs/development/compilers/jetbrains-jdk`.
3
4## Tests:
5- To test the build process of every IDE (as well as the process for adding plugins), build `jetbrains.plugins.tests.empty`.
6- To test the build process with all plugins\* supported by all IDEs, build `jetbrains.plugins.tests.all`.
7- To test only plugins for a specific IDE\*, build `jetbrains.ide-name.tests.plugins.all`.
8- To test that plugins are correctly stored in the plugins directory, build `jetbrains.plugins.tests.stored-correctly`.
9
10\*: 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.
11
12## How to use plugins:
13 - Get the ide you want and call `jetbrains.plugins.addPlugins` with a list of plugins you want to add.
14 - The list of plugins can be a list of ids or names (as in `plugins/plugins.json`)
15 - Example: `jetbrains.plugins.addPlugins jetbrains.pycharm-professional [ "nixidea" ]`
16 - 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`.
17
18### How to add a new plugin to nixpkgs
19 - Find the page for the plugin on https://plugins.jetbrains.com
20 - Find the id (it's the number after https://plugins.jetbrains.com/plugin/)
21 - Run `plugins/update_plugins.py` add (plugin id)
22 - If binaries need patch or some other special treatment, add an entry to `plugins/specialPlugins.nix`
23
24## How to update stuff:
25 - Run ./bin/update_bin.py, this will update binary IDEs and plugins, and automatically commit them
26 - Source builds need a bit more effort, as they **aren't automated at the moment**:
27 - Run ./source/update.py ./source/ides.json ./bin/versions.json. This will update the source version to the version of their corresponding binary packages.
28 - Run these commands respectively:
29 - `nix build .#jetbrains.idea-community-src.src.src && ./source/build_maven.py source/idea_maven_artefacts.json result/` for IDEA
30 - `nix build .#jetbrains.pycharm-community-src.src.src && ./source/build_maven.py source/pycharm_maven_artefacts.json result/` for PyCharm
31 - Update `brokenPlugins` timestamp and hash (from https://web.archive.org/web/*/https://plugins.jetbrains.com/files/brokenPlugins.json)
32 - Do a test build
33 - Notice that sometimes a newer Kotlin version is required to build from source, if build fails, first check the recommended Kotlin version in `.idea/kotlinc.xml` in the IDEA source root
34 - Feel free to update the Kotlin version to a compatible one
35 - If it succeeds, make a commit
36 - Run ./plugins/update_plugins.py, this will update plugins and automatically commit them
37 - make a PR/merge
38 - If it fails, ping/message GenericNerdyUsername or the nixpkgs Jetbrains maintainer team
39
40## How to add an IDE:
41 - Make dummy entries in `bin/versions.json` (make sure to set the version to something older than the real one)
42 - Run `bin/update_bin.py`
43 - Add an entry in `bin/ides.json`
44 - Add an entry in `default.nix`
45
46### TODO:
47 - move/copy plugin docs to nixpkgs manual
48 - replace `libxcrypt-legacy` with `libxcrypt` when supported
49 - make `jetbrains-remote-dev.patch` cleaner
50 - is extraLdPath needed for IDEA?
51 - set meta.sourceProvenance for everything
52 - from source builds:
53 - remove timestamps in output `.jar` of `jps-bootstrap`
54 - automated update scripts
55 - fetch `.jar` s from stuff built in nixpkgs when available
56 - what stuff built in nixpkgs provides `.jar`s we care about?
57 - kotlin
58 - make `configurePhase` respect `$NIX_BUILD_CORES`
59 - make the subdir of the resulting tar.gz always have a release number (2023.2.2) instead of a build number (232.9921.89)
60 - jdk:
61 - build on darwin
62 - use chromium stuff built by nixpkgs for jcef?
63 - make `buildPhase` respect `$NIX_BUILD_CORES`
64 - automated update script?
65 - on `aarch64-linux`:
66 - test plugins
67 - from source build
68 - see if build (binary or source) works without expat
69 - on `x86_64-darwin`:
70 - test plugins
71 - from source build
72 - on `aarch64-darwin`:
73 - test plugins
74 - from source build