The comment said "Some of the OpenJDK derivation set their `pos` by
hand" but this is no longer true since the OpenJDK deduplication into
generic.nix. Since OpenJDK no longer sets `pos`, mkDerivation's
fallback finds `meta.description` via `builtins.unsafeGetAttrPos` in
the `oldAttrs.meta // { ... }` merge, which already points to
mk-corretto.nix.
Corretto builds now include the configure flags from the corresponding
OpenJDK (Nix) package. This means that all openjdk-specific flag-based
fixes are automatically included. We probably should have always built
Corretto like this.
Importantly, this also cause Corretto builds to use adoptium/temurin as
boot jdk.
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Removes the FixNullPtrCast patch, as it failed to apply.
Need to investigate whether the patch needs to be updated for this
version, or if the patch was backported into corretto's JDK source.