Skip to content

jetbrains: drop bundled plugins#470147

Merged
MattSturgeon merged 1 commit intoNixOS:masterfrom
theCapypara:jetbrains/drop-plugins
Dec 25, 2025
Merged

jetbrains: drop bundled plugins#470147
MattSturgeon merged 1 commit intoNixOS:masterfrom
theCapypara:jetbrains/drop-plugins

Conversation

@theCapypara
Copy link
Member

The bundled plugins in nixpkgs are kinda a headache to maintain (especially the "special plugins") and are updated very infrequently (along with IDE updates).

This PR drops them. This is a discussion, feel free to voice your opinion! I however don't think that bundling these inside of nixpkgs itself is much of an advantage. Having them outside of nixpkgs allows for much faster updates and makes maintaining the Jetbrains stack in general much easier.

I also plan to add support for updateScript / rryan-tm and having to also update all plugins every time would lead to merge conflicts all the time.

This does not remove the addPlugins function. It is still possible to add plugins by providing the source to them.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@theCapypara theCapypara force-pushed the jetbrains/drop-plugins branch from 093384b to 8eb970b Compare December 12, 2025 13:28
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation labels Dec 12, 2025
@theCapypara theCapypara force-pushed the jetbrains/drop-plugins branch from 8eb970b to 3998cdd Compare December 13, 2025 22:51
@jamesward
Copy link
Contributor

I agree with this approach.

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 15, 2025
@MattSturgeon
Copy link
Contributor

The bundled plugins in nixpkgs are kinda a headache to maintain (especially the "special plugins") and are updated very infrequently (along with IDE updates).

If they are hard to maintain, or aren't actively maintained, then I agree they should be dropped.

I did enjoy the convenience of addPlugins idea [ "ideavim" ], but if we can find more maintainable out-of-tree ways to package plugins, such that addPlugins remains useful, then I suppose that makes sense.

Having them outside of nixpkgs allows for much faster updates and makes maintaining the Jetbrains stack in general much easier.

It'd be great if we could actually make it easier to use addPlugins on obscure plugins that were never going to make it into nixpkgs?


This does not remove the addPlugins function.

Off-topic, but does a separate plugins.addPlugins attribute really make the most sense? I wonder if adding a withPlugins directly to the the IDE package's passthru attrs would be a cleaner API... 🤔 Internally, this could reference finalAttrs.finalPackage.

@theCapypara
Copy link
Member Author

If they are hard to maintain, or aren't actively maintained, then I agree they should be dropped.

I did enjoy the convenience of addPlugins idea [ "ideavim" ], but if we can find more maintainable out-of-tree ways to package plugins, such that addPlugins remains useful, then I suppose that makes sense.
...
It'd be great if we could actually make it easier to use addPlugins on obscure plugins that were never going to make it into nixpkgs?

There is https://github.com/nix-community/nix-jetbrains-plugins which I recently moved to nix-community and can pretty much do that for you:

{
  environment.systemPackages = with nix-jetbrains-plugins.lib."${system}"; [
    # Adds the latest IDEA version with the latest compatible version of "com.intellij.plugins.watcher".
    (buildIdeWithPlugins pkgs.jetbrains "idea" ["com.intellij.plugins.watcher"])
  ];
}

It just doesn't have any of the special plugins code, it's just the plugins straight up from the repo. But I have never ran into any plugin that doesn't just work. We could allow contributions over there to allow a similiar "special plugins" logic, but I just fear nobody would maintain it. For the few that need special things, those reportedly always just have worked when installed through the IDE, which IMO is a perfectly fine workaround for the handful of plugins that need it.

Off-topic, but does a separate plugins.addPlugins attribute really make the most sense? I wonder if adding a withPlugins directly to the the IDE package's passthru attrs would be a cleaner API... 🤔 Internally, this could reference finalAttrs.finalPackage.

True! We should do that in a follow-up PR

Copy link
Member

@leona-ya leona-ya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change, the plugins are awful to maintain

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 20, 2025
@theCapypara theCapypara force-pushed the jetbrains/drop-plugins branch from 3998cdd to 81c9618 Compare December 21, 2025 14:38
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 21, 2025
Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing plugins SGTM. I've reviewed the relevant documentation below:

@theCapypara theCapypara force-pushed the jetbrains/drop-plugins branch from 81c9618 to 38c6630 Compare December 24, 2025 10:05
@theCapypara
Copy link
Member Author

@MattSturgeon Thanks for your suggestions, I applied them.

Copy link
Contributor

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spotted a minor issue with the error message that doesn't make as much sense now that addPlugins doesn't do plugin resolution. (I should really have noticed this in my earlier review, sorry!)

Otherwise, LGTM. Are you good for this to be merged when resolved, or do you want to wait for further input?

Comment on lines 20 to 23
if lib.isDerivation plugin then
plugin
else if byId ? "${plugin}" then
byId."${plugin}" ide.pname ide.buildNumber
else if byName ? "${plugin}" then
byName."${plugin}" ide.pname ide.buildNumber
else
throw "Could not resolve plugin ${plugin}";
throw "Could not resolve plugin ${plugin}. Note that plugins can no longer be added by name/ID since NixOS 26.05.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could simplify to lib.throwIfNot (lib.isDerivation plugin) "..." plugin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this error should no longer be about "resolving pulgins". Instead it should be a deprecation notice along the lines of

addPlugins no longer supports resolving plugin name or id strings. Please supply a derivation instead.

Suggested change
if lib.isDerivation plugin then
plugin
else if byId ? "${plugin}" then
byId."${plugin}" ide.pname ide.buildNumber
else if byName ? "${plugin}" then
byName."${plugin}" ide.pname ide.buildNumber
else
throw "Could not resolve plugin ${plugin}";
throw "Could not resolve plugin ${plugin}. Note that plugins can no longer be added by name/ID since NixOS 26.05.";
lib.throwIfNot (lib.isDerivation) "addPlugins no longer supports resolving plugin name or id strings. Please supply a derivation instead" plugin;

(will probably need formatting, may benefit from improved wording)

@theCapypara theCapypara force-pushed the jetbrains/drop-plugins branch from 38c6630 to 1daa63c Compare December 25, 2025 09:56
@theCapypara
Copy link
Member Author

I think we can merge this.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Dec 25, 2025
@MattSturgeon MattSturgeon added this pull request to the merge queue Dec 25, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Dec 25, 2025
Merged via the queue into NixOS:master with commit 09af4be Dec 25, 2025
32 of 34 checks passed
sarahec pushed a commit to sarahec/nixpkgs that referenced this pull request Dec 25, 2025
MrSom3body added a commit to MrSom3body/dotfiles that referenced this pull request Dec 30, 2025
MrSom3body added a commit to MrSom3body/dotfiles that referenced this pull request Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants