Upstream is pretty good about using availability checks, and there
are runtime‐checked features for macOS 10.13, 11, and 12 that
are only available if we build with a modern SDK. This impacts,
e.g. hardware‐accelerated video decoding in mpv.
FFmpeg should still continue to build and run on all our supported
macOS releases, with runtime functionality being no worse than before
on older versions.
All of these are supplied in the standard environment as part of the
SDK now, so there’s no closure difference at build or runtime and
no reason to turn them off.
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"
```
It is best to keep as many FFmpeg dependencies unpinned as possible,
so that only the packages that actually break are kept behind on old
versions. I ran into many cases recently where a package was pinned
to an old version of FFmpeg but worked fine with the latest one,
making the older versions look more necessary than they actually were.
This will make it easier to find packages that need intervention to
be updated to newer versions and speed up the process of jettisoning
old FFmpeg versions. The cost of potentially holding back the default
version for a little while to let major parts of the ecosystem catch
up is minor by comparison, especially since it has happened with 7
anyway due to Darwin problems.