Proposal for installing prebuilt binaries on darwin

Looking at several existing packages that install prebuilt darwin packages there is quite a bit of inconsistent repetition in the unpackPhase and installPhase. For cross-platform packages a single mkDerivation may contain several lib.optional checks to include the right *buildInputs and adjust the unpack- and installPhase for each platform making it hard to understand how the package is built or installed.

#293498 is a draft PR that proposes the introduction of darwin.installBinaryPackage as a way to unify and simplify how prebuilt binaries are installed on Darwin.
The PR includes a handful of refactored packages as practical examples.

Iā€™d greatly appreciate feedback on this and if folks loop in other folks that could be helpful in driving this forward or coming to a no-go decision if the proposed changes do not fit well with the direction the nixpkgs is headed. :slightly_smiling_face: