Comply with Cabal 3.0 API changes
Comply with Cabal 3.0 API changes

Cabal 3.0 removed a number of deprecated functions[1] and renamed
Macros.generate[2]. Fix CabalDependenciesMacros by inlining the previous
definition of externalPackageDeps as a stopgap, and using a conditional
import for `generate'.

These are more of a workaround, in the long run we should consider
to stop using Cabal's internals and switch over to using `cabal build'
directly.

[1] https://github.com/haskell/cabal/pull/6022/files
[2] https://github.com/haskell/cabal/pull/6077/files

Signed-off-by: Apollon Oikonomopoulos <ed81ed0a45ccd5c8869bda52e38353a6299ee39e@dmesg.gr>

ganeti/ganeti,ganeti/ganeti,ganeti/ganeti