
Hi folks! I'm working on packaging Qtah (my Qt bindings) for upload to Hackage. This is somewhat complicated, as I have some C++ glue code that I build into a shared library that the Haskell library needs. Currently, my build hooks are as follows, in: https://gitlab.com/khumba/qtah/blob/packaging/qtah/Setup.hs - postConf: Generate Haskell code in src/ and C++ code in cpp/. - preBuild: Add cpp/ to HookedBuildInfo.extraLibDirs because the build phase needs this needs this. - buildHook: Run make to build the C++ code into libqtah.so before the Haskell code builds. - copyHook and instHook: Copy libqtah.so into InstallDirs.libdir (~/.cabal/lib/.../qtah-*/). This installs successfully, but ultimately doesn't work because the Haskell libHSqtah*.so that gets built can't find libqtah.so. The installation directory ~/cabal/lib/.../qtah-*/ isn't on libHSqtah*.so's RUNPATH (which makes sense, it's not known at link time). I could create a separate package for the C++ bits, but I'd rather not do that unless necessary (there's already a qtah-generator package as well). I can't see how I can avoid doing this though. Are there any Cabal experts that could point me in the right direction, or confirm that I'll need to split the package? Many thanks, Bryan