This is in preparation for native builds of DXVK, but it also allows
users to choose to use an older version if that is more compatible with
their hardware.
Upstream will remove the `setup_dxvk.sh` in DXVK 2.1. To avoid breaking
users of the current derivation, vendor `setup_dxvk.sh`. This script is
based on the upstream script with some modifications:
- Update command-line parsing; and
- Reorganized action processing logic.
While it’s unlikely, it’s possible that different MoltenVK versions
could require their own compatability patches. Support that by making
the `moltenvk` derivation provide the patch via `passthru`. There is no
package with the patch applied because the patch should never be used by
anything other than DXVK.
- Move the synchronization primitive changes to their own patch, so it
can be applied conditionally on Darwin. Also, document why this change
is needed; and
- Refactor how `src` is handled to support allowing Darwin and Linux to
diverge in case the Darwin patches do not apply to the latest version.
This should address some post-merger concerns that were raised about
Darwin’s blocking updates for Linux.