I was applying patches only when making the source distribution but
patches might modify the cabal file which goes into the index (yes one
should use revisions for that).
I am now applying patches right after I have the package source.
1. Foliage takes as input a complete description of the index, where
source distributions and revisions come with a timestamp. This allows
us to recreate the entire index in a reproducible way.
2. Added a experimental command to import an index from a Hackage (as
downloaded with Cabal). This was originally a testing/development
need but there might be different use cases.