Interleaving per-component hooks with build

ÉRDI Gergő gergo at
Tue Apr 6 10:16:23 UTC 2021

On Mon, 15 Mar 2021, ÉRDI Gergő wrote:

> So my problem is that the package DB returned by `absolutePackageDBPaths $ 
> withPackageDB localInfo` doesn't contain the just-build library, even though 
> (supposedly) the library has already been built by that point.

I've figured out the solution to this one (after not receiving any replies 
on this thread for almost a month...): I was missing the so-called 
"internal package DB". For anyone interested, the following Haskell module 
defines `withComponentHook`, a build hook transformator that allows each 
component's `BuildInfo` to be edited just before building them:

Illustrating its use is the following module:

I'm opening a Cabal ticket to hopefully start a conversation on adding 
something similar to Cabal itself.


More information about the cabal-devel mailing list