From gergo at erdi.hu Tue Apr 6 10:16:23 2021 From: gergo at erdi.hu (=?ISO-8859-2?Q?=C9RDI_Gerg=F5?=) Date: Tue, 6 Apr 2021 18:16:23 +0800 (+08) Subject: Interleaving per-component hooks with build In-Reply-To: References: Message-ID: 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: https://github.com/gergoerdi/clashilator/blob/c2561e8465ba235aa4836e3bfae35f84fa578d26/src/Clash/Clashilator/Cabal.hs Illustrating its use is the following module: https://github.com/gergoerdi/clashilator/blob/c2561e8465ba235aa4836e3bfae35f84fa578d26/src/Clash/Clashilator/Setup.hs I'm opening a Cabal ticket to hopefully start a conversation on adding something similar to Cabal itself. G