Skip to content

jetbrains: introduce mirror://#414807

Closed
SandaruKasa wants to merge 1 commit intoNixOS:masterfrom
SandaruKasa:jetbrains-cf
Closed

jetbrains: introduce mirror://#414807
SandaruKasa wants to merge 1 commit intoNixOS:masterfrom
SandaruKasa:jetbrains-cf

Conversation

@SandaruKasa
Copy link
Contributor

@SandaruKasa SandaruKasa commented Jun 7, 2025

Replaced https://download.jetbrains.com/ with mirror://jetbrains/, which aliases to the previous url as well as https://download-cf.jetbrains.com/. Update according nix files and internal python scripts. Made sure that the scripts are working and the download hashes match.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

nixpkgs-review eats up to 10+GiBs of RAM and takes 15 minutes to finish even though my change impacted only fixed-output derivations.
This is a major pain point whenever I try to contribute to nixpkgs.


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) label Jun 7, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jun 7, 2025
@leona-ya
Copy link
Member

leona-ya commented Jun 9, 2025

I'm not sure why this change is actually necessary. Did you have problems with downloading from downloads.jetbrains.com? From what I see jetbrains.com also just links to downloads.
Also there is a discussion about whether we want to have that many mirrors #409110


to your side-comment: modern nixpkgs-review downloads the GitHub eval report, when you have the gh cli installed locally and are logged in.

@SandaruKasa
Copy link
Contributor Author

I'm not sure why this change is actually necessary. Did you have problems with downloading from downloads.jetbrains.com?

Yes, it seems to be considerably less reliable on my ISP than download-cf.jetbrains.com.

Also there is a discussion about whether we want to have that many mirrors #409110

If I understand correctly, most of the arguments listed there do not apply in this case. JetBrains packages do not seem to get cached by nix (because they are unfree?). The connections are not unencrypted, neither is any FTP involved. And the concern is not with the load on JetBrains's servers but with availability & reliability.


to your side-comment: modern nixpkgs-review downloads the GitHub eval report, when you have the gh cli installed locally and are logged in.

Ah, thanks a lot! A bit sad that I have to open a PR before I can test this, but it's a major improvement indeed. Btw, might there be a way to cache the eval stage locally somehow? Maybe make it go through the newer nix commands instead of nix-eval, so that there's some eval-caching (if I'm not mistaken). Or just generate a report locally once and then be able to reuse for subsequent invocations of the nixpkgs-review?

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 25, 2025
@Yappaholic
Copy link

I'm not sure why this change is actually necessary. Did you have problems with downloading from downloads.jetbrains.com?

Some people report that downloading without a mirror can have issues (see here). Also, in sanctioned countries https://download-cf.jetbrains.com works, when https://download.jetbrains.com throws code 451 with message We are sorry, but we are currently unable to provide our products or services to you due to export control regulations..

@philiptaron
Copy link
Contributor

I'm loathe to merge this due to the mirror system. Would #410186 work for your use case?

@SandaruKasa
Copy link
Contributor Author

I'm loathe to merge this due to the mirror system. Would #410186 work for your use case?

I guess it does, thanks, that's really helpful.

Still, maybe consider including download-cf.jetbrains.com as fallback in nixpkgs? Because I'm not sure how many users are aware of rewriteURL existing.

@philiptaron
Copy link
Contributor

Since rewriteURL is the general purpose solution, I'd rather solve the documentation and marketing problem rather than making the mirror system even more load bearing for even more esoteric reasons (such as evading apparent export controls, yeesh!)

@SandaruKasa SandaruKasa closed this Oct 5, 2025
@SandaruKasa SandaruKasa deleted the jetbrains-cf branch October 5, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants