This is actually a follow-on question to How can I tell Cabal which dependency to use?.
The package haskell-src-meta
has two dependencies:
template-haskell >=2.7 && <2.9,
template-haskell >=2.4 && <2.7
and template-haskell 2.7
won't build on my system. I know the solution to this is:
cabal install --constraint="template-haskell == 2.5.0.0" haskell-src-meta
However, I now want to write my own cabal file for the software I've written that has these dependencies. It doesn't seem to be enough to have:
Build-depends: template-haskell-2.5.0.0
Instead, I actually want to say that haskell-src-meta
is a build dependency, but further tell cabal that it should install that dependency with the same constraint
specified above. Is there a way to do this?