I have been trying to build hoogle using cabal new-build hoogle. It fails on building unix-time with fatal error: config.h: No such file or directory.
This is likely due to a missing include-dirs: cbits in the cabal file for unix-time. This was determined by a successful build of kazu-yamamoto/unix-time release v0.3.7 by including that missing line. The build succeeded with cabal new-build.
This was found using cabal-install 2.2.0.0, ghc 8.0.2, WSL Ubuntu 16.04.