Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 featureVersion, 3 4 lib, 5 stdenv, 6 7 fetchurl, 8 fetchpatch, 9 10 buildPackages, 11 pkg-config, 12 autoconf, 13 lndir, 14 unzip, 15 ensureNewerSourcesForZipFilesHook, 16 pandoc, 17 18 cpio, 19 file, 20 which, 21 zip, 22 perl, 23 zlib, 24 cups, 25 freetype, 26 harfbuzz, 27 alsa-lib, 28 libjpeg, 29 giflib, 30 libpng, 31 lcms2, 32 libX11, 33 libICE, 34 libXext, 35 libXrender, 36 libXtst, 37 libXt, 38 libXi, 39 libXinerama, 40 libXcursor, 41 libXrandr, 42 fontconfig, 43 44 setJavaClassPath, 45 46 versionCheckHook, 47 48 bash, 49 liberation_ttf, 50 cacert, 51 52 nixpkgs-openjdk-updater, 53 54 # TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages 55 # which should be fixable, this is a no-rebuild workaround for GHC. 56 headless ? lib.versionAtLeast featureVersion "21" && stdenv.targetPlatform.isGhcjs, 57 58 enableJavaFX ? false, 59 openjfx17, 60 openjfx21, 61 openjfx23, 62 openjfx24, 63 openjfx_jdk ? 64 { 65 "17" = openjfx17; 66 "21" = openjfx21; 67 "23" = openjfx23; 68 "24" = openjfx24; 69 } 70 .${featureVersion} or (throw "JavaFX is not supported on OpenJDK ${featureVersion}"), 71 72 enableGtk ? true, 73 gtk3, 74 gtk2, 75 glib, 76 77 temurin-bin-8, 78 temurin-bin-11, 79 temurin-bin-17, 80 temurin-bin-21, 81 temurin-bin-23, 82 temurin-bin-24, 83 jdk-bootstrap ? 84 { 85 "8" = temurin-bin-8.__spliced.buildBuild or temurin-bin-8; 86 "11" = temurin-bin-11.__spliced.buildBuild or temurin-bin-11; 87 "17" = temurin-bin-17.__spliced.buildBuild or temurin-bin-17; 88 "21" = temurin-bin-21.__spliced.buildBuild or temurin-bin-21; 89 "23" = temurin-bin-23.__spliced.buildBuild or temurin-bin-23; 90 "24" = temurin-bin-24.__spliced.buildBuild or temurin-bin-24; 91 } 92 .${featureVersion}, 93}: 94 95let 96 sourceFile = ./. + "/${featureVersion}/source.json"; 97 source = nixpkgs-openjdk-updater.openjdkSource { 98 inherit sourceFile; 99 featureVersionPrefix = tagPrefix + featureVersion; 100 }; 101 102 atLeast11 = lib.versionAtLeast featureVersion "11"; 103 atLeast17 = lib.versionAtLeast featureVersion "17"; 104 atLeast21 = lib.versionAtLeast featureVersion "21"; 105 atLeast23 = lib.versionAtLeast featureVersion "23"; 106 atLeast24 = lib.versionAtLeast featureVersion "24"; 107 108 tagPrefix = if atLeast11 then "jdk-" else "jdk"; 109 version = lib.removePrefix "refs/tags/${tagPrefix}" source.src.rev; 110 versionSplit = builtins.match (if atLeast11 then "(.+)+(.+)" else "(.+)-b(.+)") version; 111 versionBuild = lib.elemAt versionSplit 1; 112 113 # The JRE 8 libraries are in directories that depend on the CPU. 114 architecture = 115 if atLeast11 then 116 "" 117 else 118 { 119 i686-linux = "i386"; 120 x86_64-linux = "amd64"; 121 aarch64-linux = "aarch64"; 122 powerpc64le-linux = "ppc64le"; 123 } 124 .${stdenv.system} or (throw "Unsupported platform ${stdenv.system}"); 125 126 jdk-bootstrap' = jdk-bootstrap.override { 127 # when building a headless jdk, also bootstrap it with a headless jdk 128 gtkSupport = !headless; 129 }; 130in 131 132assert lib.assertMsg (lib.pathExists sourceFile) 133 "OpenJDK ${featureVersion} is not a supported version"; 134 135stdenv.mkDerivation (finalAttrs: { 136 pname = "openjdk" + lib.optionalString headless "-headless"; 137 inherit version; 138 139 outputs = [ 140 "out" 141 ] 142 ++ lib.optionals (!atLeast11) [ 143 "jre" 144 ]; 145 146 inherit (source) src; 147 148 patches = [ 149 ( 150 if atLeast24 then 151 ./24/patches/fix-java-home-jdk24.patch 152 else if atLeast21 then 153 ./21/patches/fix-java-home-jdk21.patch 154 else if atLeast11 then 155 ./11/patches/fix-java-home-jdk10.patch 156 else 157 ./8/patches/fix-java-home-jdk8.patch 158 ) 159 ( 160 if atLeast24 then 161 ./24/patches/read-truststore-from-env-jdk24.patch 162 else if atLeast11 then 163 ./11/patches/read-truststore-from-env-jdk10.patch 164 else 165 ./8/patches/read-truststore-from-env-jdk8.patch 166 ) 167 ] 168 ++ lib.optionals (!atLeast23) [ 169 ( 170 if atLeast11 then 171 ./11/patches/currency-date-range-jdk10.patch 172 else 173 ./8/patches/currency-date-range-jdk8.patch 174 ) 175 ] 176 ++ lib.optionals atLeast11 [ 177 ( 178 if atLeast17 then 179 ./17/patches/increase-javadoc-heap-jdk13.patch 180 else 181 ./11/patches/increase-javadoc-heap.patch 182 ) 183 ] 184 ++ lib.optionals atLeast17 [ 185 ( 186 if atLeast21 then 187 ./21/patches/ignore-LegalNoticeFilePlugin-jdk18.patch 188 else 189 ./17/patches/ignore-LegalNoticeFilePlugin-jdk17.patch 190 ) 191 ] 192 ++ lib.optionals (!atLeast21) [ 193 ( 194 if atLeast17 then 195 ./17/patches/fix-library-path-jdk17.patch 196 else if atLeast11 then 197 ./11/patches/fix-library-path-jdk11.patch 198 else 199 ./8/patches/fix-library-path-jdk8.patch 200 ) 201 ] 202 ++ lib.optionals (atLeast17 && !atLeast23) [ 203 # -Wformat etc. are stricter in newer gccs, per 204 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677 205 # so grab the work-around from 206 # https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24 207 (fetchurl { 208 url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch"; 209 sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r"; 210 }) 211 ] 212 ++ lib.optionals (featureVersion == "17") [ 213 # Patch borrowed from Alpine to fix build errors with musl libc and recent gcc. 214 # This is applied anywhere to prevent patchrot. 215 (fetchurl { 216 url = "https://git.alpinelinux.org/aports/plain/community/openjdk17/FixNullPtrCast.patch?id=41e78a067953e0b13d062d632bae6c4f8028d91c"; 217 sha256 = "sha256-LzmSew51+DyqqGyyMw2fbXeBluCiCYsS1nCjt9hX6zo="; 218 }) 219 ] 220 ++ lib.optionals atLeast11 [ 221 # Fix build for gnumake-4.4.1: 222 # https://github.com/openjdk/jdk/pull/12992 223 (fetchpatch { 224 name = "gnumake-4.4.1"; 225 url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch"; 226 hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; 227 }) 228 ] 229 ++ lib.optionals (!headless && enableGtk) [ 230 ( 231 if atLeast17 then 232 ./17/patches/swing-use-gtk-jdk13.patch 233 else if atLeast11 then 234 ./11/patches/swing-use-gtk-jdk10.patch 235 else 236 ./8/patches/swing-use-gtk-jdk8.patch 237 ) 238 ]; 239 240 strictDeps = true; 241 242 depsBuildBuild = [ buildPackages.stdenv.cc ]; 243 244 nativeBuildInputs = [ 245 pkg-config 246 ] 247 ++ lib.optionals atLeast11 [ 248 autoconf 249 ] 250 ++ lib.optionals (!atLeast11) [ 251 lndir 252 # Certificates generated using perl in `installPhase` 253 perl 254 ] 255 ++ lib.optionals (!atLeast11 && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 256 # Certificates generated using keytool in `installPhase` 257 buildPackages.jdk8 258 ] 259 ++ [ 260 unzip 261 zip 262 which 263 # Probably for BUILD_CC but not sure, not in closure. 264 zlib 265 ] 266 ++ lib.optionals atLeast21 [ 267 ensureNewerSourcesForZipFilesHook 268 ] 269 ++ lib.optionals atLeast24 [ 270 pandoc 271 ]; 272 273 buildInputs = [ 274 # TODO: Many of these should likely be in `nativeBuildInputs`. 275 cpio 276 # `-lmagic` in NIX_LDFLAGS 277 file 278 cups 279 freetype 280 ] 281 ++ lib.optionals (atLeast11 && !atLeast21) [ 282 harfbuzz 283 ] 284 ++ [ 285 alsa-lib 286 libjpeg 287 giflib 288 ] 289 ++ lib.optionals atLeast11 [ 290 libpng 291 zlib # duplicate 292 lcms2 293 ] 294 ++ [ 295 libX11 296 libICE 297 ] 298 ++ lib.optionals (!atLeast11) [ 299 libXext 300 ] 301 ++ [ 302 libXrender 303 ] 304 ++ lib.optionals atLeast11 [ 305 libXext 306 ] 307 ++ [ 308 libXtst 309 libXt 310 libXtst # duplicate 311 libXi 312 libXinerama 313 libXcursor 314 libXrandr 315 fontconfig 316 ] 317 ++ lib.optionals (!headless && enableGtk) [ 318 (if atLeast11 then gtk3 else gtk2) 319 glib 320 ]; 321 322 propagatedBuildInputs = lib.optionals (!atLeast11) [ setJavaClassPath ]; 323 324 nativeInstallCheckInputs = lib.optionals atLeast23 [ 325 versionCheckHook 326 ]; 327 328 # JDK's build system attempts to specifically detect 329 # and special-case WSL, and we don't want it to do that, 330 # so pass the correct platform names explicitly 331 ${if atLeast17 then "configurePlatforms" else null} = [ 332 "build" 333 "host" 334 ]; 335 336 # https://openjdk.org/groups/build/doc/building.html 337 configureFlags = [ 338 "--with-boot-jdk=${jdk-bootstrap'.home}" 339 # https://github.com/openjdk/jdk/blob/471f112bca715d04304cbe35c6ed63df8c7b7fee/make/autoconf/util_paths.m4#L315 340 # Ignoring value of READELF from the environment. Use command line variables instead. 341 "READELF=${stdenv.cc.targetPrefix}readelf" 342 "AR=${stdenv.cc.targetPrefix}ar" 343 "STRIP=${stdenv.cc.targetPrefix}strip" 344 "NM=${stdenv.cc.targetPrefix}nm" 345 "OBJDUMP=${stdenv.cc.targetPrefix}objdump" 346 "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" 347 ] 348 ++ ( 349 if atLeast23 then 350 [ 351 "--with-version-string=${version}" 352 "--with-vendor-version-string=(nix)" 353 ] 354 else if atLeast11 then 355 lib.optionals atLeast17 [ 356 "--with-version-build=${versionBuild}" 357 "--with-version-opt=nixos" 358 ] 359 ++ [ 360 "--with-version-pre=" 361 ] 362 else 363 [ 364 "--with-update-version=${lib.removePrefix "${featureVersion}u" (lib.elemAt versionSplit 0)}" 365 "--with-build-number=${versionBuild}" 366 "--with-milestone=fcs" 367 ] 368 ) 369 ++ [ 370 "--enable-unlimited-crypto" 371 "--with-native-debug-symbols=internal" 372 ] 373 ++ lib.optionals (!atLeast21) ( 374 if atLeast11 then 375 [ 376 "--with-freetype=system" 377 "--with-harfbuzz=system" 378 ] 379 else 380 [ 381 "--disable-freetype-bundling" 382 ] 383 ) 384 ++ ( 385 if atLeast11 then 386 [ 387 "--with-libjpeg=system" 388 "--with-giflib=system" 389 "--with-libpng=system" 390 "--with-zlib=system" 391 "--with-lcms=system" 392 ] 393 else 394 [ 395 "--with-zlib=system" 396 "--with-giflib=system" 397 ] 398 ) 399 ++ [ 400 "--with-stdc++lib=dynamic" 401 ] 402 ++ lib.optionals (featureVersion == "11") [ 403 "--disable-warnings-as-errors" 404 ] 405 # OpenJDK 11 cannot be built by recent versions of Clang, as far as I can tell (see 406 # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260319). Known to 407 # compile with LLVM 12. 408 ++ lib.optionals (atLeast11 && stdenv.cc.isClang) [ 409 "--with-toolchain-type=clang" 410 # Explicitly tell Clang to compile C++ files as C++, see 411 # https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859 412 "--with-extra-cxxflags=-xc++" 413 ] 414 # This probably shouldn’t apply to OpenJDK 21; see 415 # b7e68243306833845cbf92e2ea1e0cf782481a51 which removed it for 416 # versions 15 through 20. 417 ++ lib.optional ( 418 (featureVersion == "11" || featureVersion == "21") && stdenv.hostPlatform.isx86_64 419 ) "--with-jvm-features=zgc" 420 ++ lib.optional headless (if atLeast11 then "--enable-headless-only" else "--disable-headful") 421 ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx_jdk}"; 422 423 buildFlags = if atLeast17 then [ "images" ] else [ "all" ]; 424 425 separateDebugInfo = atLeast11; 426 __structuredAttrs = atLeast11; 427 428 # -j flag is explicitly rejected by the build system: 429 # Error: 'make -jN' is not supported, use 'make JOBS=N' 430 # Note: it does not make build sequential. Build system 431 # still runs in parallel. 432 enableParallelBuilding = false; 433 434 env = { 435 NIX_CFLAGS_COMPILE = 436 if atLeast17 then 437 "-Wno-error" 438 else if atLeast11 then 439 # Workaround for 440 # `cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]` 441 # when building jtreg 442 "-Wformat" 443 else 444 lib.concatStringsSep " " ( 445 [ 446 # glibc 2.24 deprecated readdir_r so we need this 447 # See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html 448 "-Wno-error=deprecated-declarations" 449 ] 450 ++ lib.optionals stdenv.cc.isGNU [ 451 # https://bugzilla.redhat.com/show_bug.cgi?id=1306558 452 # https://github.com/JetBrains/jdk8u/commit/eaa5e0711a43d64874111254d74893fa299d5716 453 "-fno-lifetime-dse" 454 "-fno-delete-null-pointer-checks" 455 "-std=gnu++98" 456 "-Wno-error" 457 ] 458 ++ [ 459 # error by default in GCC 14 460 "-Wno-error=int-conversion" 461 "-Wno-error=incompatible-pointer-types" 462 ] 463 ); 464 465 NIX_LDFLAGS = lib.concatStringsSep " " ( 466 lib.optionals (!headless) [ 467 "-lfontconfig" 468 "-lcups" 469 "-lXinerama" 470 "-lXrandr" 471 "-lmagic" 472 ] 473 ++ lib.optionals (!headless && enableGtk) [ 474 (if atLeast11 then "-lgtk-3" else "-lgtk-x11-2.0") 475 "-lgio-2.0" 476 ] 477 ); 478 } 479 // lib.optionalAttrs (!atLeast11) { 480 # OpenJDK 8 Hotspot cares about the host(!) version otherwise 481 DISABLE_HOTSPOT_OS_VERSION_CHECK = "ok"; 482 }; 483 484 ${if atLeast23 then "versionCheckProgram" else null} = "${placeholder "out"}/bin/java"; 485 486 ${if !atLeast11 then "doCheck" else null} = false; # fails with "No rule to make target 'y'." 487 488 doInstallCheck = atLeast23; 489 490 ${if atLeast17 then "postPatch" else null} = '' 491 chmod +x configure 492 patchShebangs --build configure 493 '' 494 + lib.optionalString atLeast24 '' 495 chmod +x make/scripts/*.{template,sh,pl} 496 patchShebangs --build make/scripts 497 ''; 498 499 ${if !atLeast17 then "preConfigure" else null} = '' 500 chmod +x configure 501 substituteInPlace configure --replace /bin/bash "${bash}/bin/bash" 502 '' 503 + lib.optionalString (!atLeast11) '' 504 substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "${stdenv.shell}" 505 substituteInPlace hotspot/make/linux/makefiles/dtrace.make --replace /usr/include/sys/sdt.h "/no-such-path" 506 ''; 507 508 installPhase = '' 509 mkdir -p $out/lib 510 511 mv build/*/images/${if atLeast11 then "jdk" else "j2sdk-image"} $out/lib/openjdk 512 513 # Remove some broken manpages. 514 rm -rf $out/lib/openjdk/man/ja* 515 516 # Mirror some stuff in top-level. 517 mkdir -p $out/share 518 ln -s $out/lib/openjdk/include $out/include 519 ln -s $out/lib/openjdk/man $out/share/man 520 '' 521 + lib.optionalString atLeast17 '' 522 523 # IDEs use the provided src.zip to navigate the Java codebase (https://github.com/NixOS/nixpkgs/pull/95081) 524 '' 525 + lib.optionalString atLeast11 '' 526 ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip 527 '' 528 + '' 529 530 # jni.h expects jni_md.h to be in the header search path. 531 ln -s $out/include/linux/*_md.h $out/include/ 532 533 # Remove crap from the installation. 534 rm -rf $out/lib/openjdk/demo${lib.optionalString (!atLeast11) " $out/lib/openjdk/sample"} 535 ${lib.optionalString headless ( 536 if atLeast11 then 537 '' 538 rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so 539 '' 540 else 541 '' 542 rm $out/lib/openjdk/jre/lib/${architecture}/{libjsound,libjsoundalsa,libsplashscreen,libawt*,libfontmanager}.so 543 rm $out/lib/openjdk/jre/bin/policytool 544 rm $out/lib/openjdk/bin/{policytool,appletviewer} 545 '' 546 )} 547 '' 548 + lib.optionalString (!atLeast11) '' 549 550 # Move the JRE to a separate output 551 mkdir -p $jre/lib/openjdk 552 mv $out/lib/openjdk/jre $jre/lib/openjdk/jre 553 mkdir $out/lib/openjdk/jre 554 lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre 555 556 # Make sure cmm/*.pf are not symlinks: 557 # https://youtrack.jetbrains.com/issue/IDEA-147272 558 rm -rf $out/lib/openjdk/jre/lib/cmm 559 ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm 560 561 # Setup fallback fonts 562 ${lib.optionalString (!headless) '' 563 mkdir -p $jre/lib/openjdk/jre/lib/fonts 564 ln -s ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback 565 ''} 566 567 # Remove duplicate binaries. 568 for i in $(cd $out/lib/openjdk/bin && echo *); do 569 if [ "$i" = java ]; then continue; fi 570 if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then 571 ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i 572 fi 573 done 574 575 # Generate certificates. 576 ( 577 cd $jre/lib/openjdk/jre/lib/security 578 rm cacerts 579 perl ${./8/generate-cacerts.pl} ${ 580 if stdenv.buildPlatform.canExecute stdenv.hostPlatform then 581 "$jre/lib/openjdk/jre/bin/keytool" 582 else 583 "keytool" 584 } ${cacert}/etc/ssl/certs/ca-bundle.crt 585 ) 586 '' 587 + '' 588 589 ln -s $out/lib/openjdk/bin $out/bin 590 '' 591 + lib.optionalString (!atLeast11) '' 592 ln -s $jre/lib/openjdk/jre/bin $jre/bin 593 ln -s $jre/lib/openjdk/jre $out/jre 594 ''; 595 596 preFixup = 597 ( 598 if atLeast11 then 599 '' 600 # Propagate the setJavaClassPath setup hook so that any package 601 # that depends on the JDK has $CLASSPATH set up properly. 602 mkdir -p $out/nix-support 603 #TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040 604 echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs 605 '' 606 else 607 '' 608 # Propagate the setJavaClassPath setup hook from the JRE so that 609 # any package that depends on the JRE has $CLASSPATH set up 610 # properly. 611 mkdir -p $jre/nix-support 612 printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs 613 '' 614 ) 615 + '' 616 617 # Set JAVA_HOME automatically. 618 mkdir -p $out/nix-support 619 cat <<EOF > $out/nix-support/setup-hook 620 if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi 621 EOF 622 ''; 623 624 postFixup = '' 625 # Build the set of output library directories to rpath against 626 LIBDIRS="" 627 for output in $(getAllOutputNames); do 628 if [ "$output" = debug ]; then continue; fi 629 LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | ${ 630 if atLeast17 then "sort -u" else "sort | uniq" 631 } | tr '\n' ':'):$LIBDIRS" 632 done 633 # Add the local library paths to remove dependencies on the bootstrap 634 for output in $(getAllOutputNames); do 635 if [ "$output" = debug ]; then continue; fi 636 OUTPUTDIR=$(eval echo \$$output) 637 BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*) 638 echo "$BINLIBS" | while read i; do 639 patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true 640 patchelf --shrink-rpath "$i" || true 641 done 642 done 643 ''; 644 645 # TODO: The OpenJDK 8 derivation got this wrong. 646 disallowedReferences = [ 647 (if atLeast11 then jdk-bootstrap' else jdk-bootstrap) 648 ]; 649 650 passthru = { 651 home = "${finalAttrs.finalPackage}/lib/openjdk"; 652 inherit jdk-bootstrap; 653 inherit (source) updateScript; 654 } 655 // (if atLeast11 then { inherit gtk3; } else { inherit gtk2; }) 656 // lib.optionalAttrs (!atLeast23) { 657 inherit architecture; 658 }; 659 660 meta = { 661 description = "Open-source Java Development Kit"; 662 homepage = "https://openjdk.java.net/"; 663 license = lib.licenses.gpl2Only; 664 maintainers = with lib.maintainers; [ 665 edwtjo 666 infinidoge 667 ]; 668 teams = [ lib.teams.java ]; 669 mainProgram = "java"; 670 platforms = [ 671 "i686-linux" 672 "x86_64-linux" 673 "aarch64-linux" 674 ] 675 ++ lib.optionals atLeast11 [ 676 "armv7l-linux" 677 "armv6l-linux" 678 "powerpc64le-linux" 679 ] 680 ++ lib.optionals atLeast17 [ 681 "riscv64-linux" 682 ]; 683 # OpenJDK 8 was broken for musl at 2024-01-17. Tracking issue: 684 # https://github.com/NixOS/nixpkgs/issues/281618 685 # error: ‘isnanf’ was not declared in this scope 686 broken = !atLeast11 && stdenv.hostPlatform.isMusl; 687 }; 688})