In my particuar case, I have a dependency in my Cabal file on the Haskell package bindings-libzip
. In particular, I could accept several different versions of libzip
, e.g. bindings-libzip-0.11
or bindings-libzip-0.10
. These in turn have a dependency on the respective native C libzip
libraries versions 0.11
and 0.10
.
Therefore I have bindings-libzip >= 0.10 < 0.12
in my .cabal
file.
The Haskell package bindings-libzip-x
specifies with PkgConfig-Depends
that libzip
version x
must be present on a client machine. Let's say a downstream user has version 0.10
of libzip
installed. However, when pulling down my package, this user pulls down the latest dependencies possible and transitively pulls down version 0.11
of bindings-libzip
. This causes the build process to error out with a message about an incorrect version of libzip
installed.
Is there any way I can specify in my .cabal file to use bindings-libzip-0.11
if and only if pkg-config
detects version 0.11
of libzip
and to use bindings-libzip-0.10
if and only if pkg-config
detects version 0.10
of libzip
?