@@ -3,7 +3,7 @@
33rec {
44 gen =
55
6− { version, nativeVersion, sha256, defaultJava ? jdk8 }:
6+ { version, nativeVersion, sha256, defaultJava ? jdk8, supportedPlatforms ? null }:
77
88 { lib, stdenv, fetchurl, makeWrapper, unzip, java ? defaultJava
99 , javaToolchains ? [ ], ncurses5, ncurses6 }:
@@ -87,7 +87,7 @@ rec {
8787 changelog = "https://docs.gradle.org/${version}/release-notes.html";
8888 downloadPage = "https://gradle.org/next-steps/?version=${version}";
8989 license = licenses.asl20;
90− platforms = platforms.unix;
90+ platforms = if (supportedPlatforms != null) then supportedPlatforms else platforms.unix;
9191 maintainers = with maintainers; [ lorenzleutgeb liff ];
9292 };
9393 };
@@ -100,6 +100,9 @@ rec {
100100 nativeVersion = "0.22-milestone-21";
101101 sha256 = "00h3z0vxc4hv31sc71gb88r8yabyqgz304wpr0bxhbx2d14f11mm";
102102 defaultJava = jdk17;
103+ # Gradle 7 ships some binaries that are only available for some platforms
104+ # See https://github.com/gradle/native-platform#supported-platforms
105+ supportedPlatforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-cygwin" "x86_64-windows" "i686-windows" ];
103106 };
104107
105108 gradle_6 = gen {
@@ -107,6 +110,9 @@ rec {
107110 nativeVersion = "0.22-milestone-20";
108111 sha256 = "13qyk3f6namw27ynh6nxljxpk9r3l12vxl3f0qpglprdf3c6ydcb";
109112 defaultJava = jdk11;
113+ # Gradle 6 ships some binaries that are only available for some platforms
114+ # See https://github.com/gradle/native-platform#supported-platforms
115+ supportedPlatforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-cygwin" "x86_64-windows" "i686-windows" ];
110116 };
111117
112118 # NOTE: No GitHub Release for the following versions. `update.sh` will not work.