This is kinda heavy, but it should work well on 32bit and 64bit arches.
The alternative was to copy-paste a lot of cabal-install code
that is not exposed. There seems to be no value in that for a
development script.
The alternative to this script is simply running 'cabal v2-update'
twice and then copy-pasting the output manually to cabal.project.