Some packages need a flag to make them use integer-simple rather than trying to use integer-gmp, for example

cabal-ios install -finteger-simple text

and

cabal-ios install -f-integer-gmp hashable

Similarly, some packages need to have Template Haskell disabled, such as

cabal-ios install -f-templateHaskell QuickCheck

and

cabal-ios install distributed-process --flags=-th

You can check the .cabal file to find the appropriate option.

For packages that use executables, there's not yet a flag to give to Cabal to keep it from trying and failing to build them (for example, Crypto and pretty-show). Until that flag is implemented, you'll have to use cabal get and manually comment out the executables section in the .cabal file, then cabal install'ing the edited copy. You can use this strategy to get rid of Template Haskell in packages that don't provide a flag to do so, such as aeson. But consider submitting a patch to the developers : )