jetbrains.*-oss: Add fallback URLs w/o the cache redirector

Co-Authored-By: Matt Sturgeon <matt@sturgeon.me.uk>
This commit is contained in:
Marco "Capypara" Köpcke
2025-12-21 15:29:38 +01:00
parent 4dce2ed811
commit c583914eee
@@ -173,7 +173,12 @@ let
mkRepoEntry = entry: {
name = ".m2/repository/" + entry.path;
path = fetchurl {
urls = map (url: "${url}/${entry.url}") repositories;
urls = lib.concatMap (url: [
"https://cache-redirector.jetbrains.com/${url}/${entry.url}"
"https://${url}/${entry.url}"
]) repositories;
# Do not try to retry 4xx errors
curlOptsList = [ "--no-retry-all-errors" ];
sha256 = entry.hash;
};
};
@@ -181,25 +186,26 @@ let
kotlin-jps-plugin-classpath =
let
repoUrl = "https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/org/jetbrains/kotlin/kotlin-jps-plugin-classpath";
groupId = builtins.replaceStrings [ "." ] [ "/" ] "org.jetbrains.kotlin";
repoBaseUrl = "packages.jetbrains.team/maven/p/ij/intellij-dependencies";
repoUrls = [
"https://cache-redirector.jetbrains.com/${repoBaseUrl}"
"https://${repoBaseUrl}"
];
groupId = "org/jetbrains/kotlin";
artefactId = "kotlin-jps-plugin-classpath";
version = kotlin-jps-plugin.version;
in
fetchurl {
url =
repoUrl
+ "/"
+ groupId
+ "/"
+ artefactId
+ "/"
+ version
+ "/"
+ artefactId
+ "-"
+ version
+ ".jar";
urls = map (
url:
lib.concatStringsSep "/" [
url
groupId
artefactId
version
"${artefactId}-${version}.jar"
]
) repoUrls;
hash = kotlin-jps-plugin.hash;
};
@@ -215,7 +221,10 @@ let
"OpenSourceCommunityInstallersBuildTarget";
xplat-launcher = fetchzip {
url = "https://cache-redirector.jetbrains.com/intellij-dependencies/org/jetbrains/intellij/deps/launcher/242.22926/launcher-242.22926.tar.gz";
urls = [
"https://cache-redirector.jetbrains.com/intellij-dependencies/org/jetbrains/intellij/deps/launcher/242.22926/launcher-242.22926.tar.gz"
"https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/org/jetbrains/intellij/deps/launcher/242.22926/launcher-242.22926.tar.gz"
];
hash = "sha256-ttrQZUbBvvyH1BSVt1yWOoD82WwRi/hkoRfrsdCjwTA=";
stripRoot = false;
};