
The tarball has a list of packages in "build order". To discover this order, hptool uses cabal, run against the package database that is part of the ghc bindist for the release. I suppose the build could instead build a mock package database from the information about the release, and then use that... but it didn't seem worth the effort, rather than just using the actual one. Is the issue that you are trying to build but you already have a locally built GHC? Easiest thing would be to just go ahead and make your own bindist from your own build, and then point platform.sh at that. If you really needed to avoid the tar and untar operations... hptool has a facility for using pre-existing source files rather than downloading them with cabal for the packages. See the packageSourceDir rule in Package.hs https://github.com/haskell/haskell-platform/blob/new-build/hptool/src/Packag.... A similar facility might be employed in the ghcInstall action in GhcDist.hs https://github.com/haskell/haskell-platform/blob/new-build/hptool/src/GhcDis..., but it would be tricky as we need to configure and "install" two copies of the GHC release: one for local use to build the HP packages, and one for the target root tree. Because of this difficultly, I think the local bindist is the easier way to go. - Mark