A recent upgrade to PyQt5 broke the build due to incompatibilities
with SIP < 5. Upstream QGIS has supported SIP >= 5 for a while now
so this patch corrects the issue by using the latest SIP and adding
the necessary dependencies.
The logic to find the PyQt5 libraries and SIP files is different
for SIP >= 5, so a patch is included to correctly supply them.
This also adds wrapGAppsHook to prevent opening file dialogs from
crashing on non-NixOS distributions.