Skip to content

jetbrains.jdk: fix fallback to default X11 cursor#479767

Merged
MattSturgeon merged 1 commit intoNixOS:masterfrom
jys1670:jetbrains-jdk-env-fix
Jan 15, 2026
Merged

jetbrains.jdk: fix fallback to default X11 cursor#479767
MattSturgeon merged 1 commit intoNixOS:masterfrom
jys1670:jetbrains-jdk-env-fix

Conversation

@jys1670
Copy link
Contributor

@jys1670 jys1670 commented Jan 13, 2026

The cursor theme in all JetBrains products on X11 has been broken since the __structuredAttrs changes were introduced (see #425529 (comment)):

Screenshot_20260113_172030-1

The root cause seems to be a complete env override of the original JDK package. These changes fix the cursor theme in both PyCharm and CLion for me.

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.

@nixpkgs-ci nixpkgs-ci bot added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jan 13, 2026
@nixpkgs-ci nixpkgs-ci bot requested a review from aoli-al January 13, 2026 18:14
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jan 13, 2026
@tom-ricci
Copy link

Just tried it with nix run github:jys1670/nixpkgs/jetbrains-jdk-env-fix#jetbrains.idea, and it solves all my issues from #467636 (comment)

@theCapypara
Copy link
Member

I can't test locally at the moment, but note that this PR can't be built with nixpkgs-review-gha.

The build takes multiple hours and then fails with the runner losing communication, probably going OOM.

I don't know if this is a GitHub issue or something caused by this PR, I haven't experienced it yet with building the JetBrains IDEs

https://github.com/theCapypara/nixpkgs-review-gha/actions/runs/20972181982

@aoli-al
Copy link
Member

aoli-al commented Jan 15, 2026

Tried the patch with idea and confirm it fixes the scale and cursor. It is unclear why build time env affects this.

Is it because these flags are missing? https://github.com/NixOS/nixpkgs/blob/54671be46b6c40328559e3c06b7b31a919455b00/pkgs/development/compilers/openjdk/generic.nix#L451C1-L462C8

    NIX_LDFLAGS = lib.concatStringsSep " " (
      lib.optionals (!headless) [
        "-lfontconfig"
        "-lcups"
        "-lXinerama"
        "-lXrandr"
        "-lmagic"
      ]
      ++ lib.optionals (!headless && enableGtk) [
        (if atLeast11 then "-lgtk-3" else "-lgtk-x11-2.0")
        "-lgio-2.0"
      ]
    );

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Jan 15, 2026
@theCapypara
Copy link
Member

theCapypara commented Jan 15, 2026

Can we please confirm why nixpkgs-review fails before merging? I also wasn't able to build this PR locally with 32 GB RAM, my machine ran out of memory

I think it's animeko, so unrelated to this PR probably, but I'd like to be sure. Can anybody else build this?

I hope I'll have some time later today to investigate this.

My current attempt via GHA is still running. 5h already now, this is very unusual
https://github.com/theCapypara/nixpkgs-review-gha/actions/runs/21028220108/job/60457743798

@theCapypara
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 479767 --skip-package animeko
Commit: cfd5a5e7e8a28c835f46d6e227176f9d0489845c


x86_64-linux

✅ 21 packages built:
  • jetbrains.clion
  • jetbrains.datagrip
  • jetbrains.dataspell
  • jetbrains.gateway
  • jetbrains.goland
  • jetbrains.idea
  • jetbrains.idea-oss
  • jetbrains.jdk
  • jetbrains.jdk-no-jcef
  • jetbrains.jdk-no-jcef-17
  • jetbrains.jdk-no-jcef-17.debug
  • jetbrains.jdk-no-jcef.debug
  • jetbrains.jdk.debug
  • jetbrains.mps
  • jetbrains.phpstorm
  • jetbrains.pycharm
  • jetbrains.pycharm-oss
  • jetbrains.rider
  • jetbrains.ruby-mine
  • jetbrains.rust-rover
  • jetbrains.webstorm

Copy link
Member

@theCapypara theCapypara left a comment

Choose a reason for hiding this comment

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

I was able to build now locally when skipping animeko, but I notice that pycharm-oss and idea-oss are using quite a significant amount of memory to build. I'm not sure this was the case before, I don't think so?

The oss packages also run (and show the correct cursor).

I personally don't think animeko should block this, if the issue is even caused by this PR, so LGTM!

I started a nixpkgs-review-gha run without animeko, to see if aarch64 builds.

Thanks for figuring this out!

pinging @pokon548 if you want to look into animeko.

@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 Jan 15, 2026
@theCapypara

This comment has been minimized.

@theCapypara
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 479767 -P animeko
Commit: cfd5a5e7e8a28c835f46d6e227176f9d0489845c (subsequent changes)
Merge: 0aaecd18751207f31fa3cef030a7e133c5fd1e97

Logs: https://github.com/theCapypara/nixpkgs-review-gha/actions/runs/21039435876


x86_64-linux

✅ 21 packages built:
  • jetbrains.clion
  • jetbrains.datagrip
  • jetbrains.dataspell
  • jetbrains.gateway
  • jetbrains.goland
  • jetbrains.idea
  • jetbrains.idea-oss
  • jetbrains.jdk
  • jetbrains.jdk-no-jcef
  • jetbrains.jdk-no-jcef-17
  • jetbrains.jdk-no-jcef-17.debug
  • jetbrains.jdk-no-jcef.debug
  • jetbrains.jdk.debug
  • jetbrains.mps
  • jetbrains.phpstorm
  • jetbrains.pycharm
  • jetbrains.pycharm-oss
  • jetbrains.rider
  • jetbrains.ruby-mine
  • jetbrains.rust-rover
  • jetbrains.webstorm

aarch64-linux

✅ 21 packages built:
  • jetbrains.clion
  • jetbrains.datagrip
  • jetbrains.dataspell
  • jetbrains.gateway
  • jetbrains.goland
  • jetbrains.idea
  • jetbrains.idea-oss
  • jetbrains.jdk
  • jetbrains.jdk-no-jcef
  • jetbrains.jdk-no-jcef-17
  • jetbrains.jdk-no-jcef-17.debug
  • jetbrains.jdk-no-jcef.debug
  • jetbrains.jdk.debug
  • jetbrains.mps
  • jetbrains.phpstorm
  • jetbrains.pycharm
  • jetbrains.pycharm-oss
  • jetbrains.rider
  • jetbrains.ruby-mine
  • jetbrains.rust-rover
  • jetbrains.webstorm

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

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.

nixpkgs-review-gha still fails, so the memory requirements really seem to be higher. I don't have the time at the moment to directly compare before and after.

It would be great if we could fix this, since this will probably also prevent the update scripts of the oss packages from running and make reviewing IDE updates harder, but I'd still rather merge this to fix the cursor and scaling issues.

If there is an issue caused by some env attr that gets passed into the JDK derivation, that's worth investigating.

But this PR's actual diff is very small and seems trivially correct to me; when overriding env or any other derivation attr, you almost certainly want to preserve prev attrs rather than overriding them all.

I notice you were able to run nixpkgs-review-gha after all, so maybe it was a transient GHA runner issue rather than an actual package issue?

@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 Jan 15, 2026
@MattSturgeon MattSturgeon added this pull request to the merge queue Jan 15, 2026
Merged via the queue into NixOS:master with commit 56d010a Jan 15, 2026
32 of 34 checks passed
@jys1670 jys1670 deleted the jetbrains-jdk-env-fix branch January 15, 2026 19:47
@theCapypara theCapypara added the backport release-25.11 Backport PR automatically label Jan 16, 2026
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 16, 2026

Successfully created backport PR for release-25.11:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle! backport release-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants