Re: [Haskell-cafe] Automation of external library installation in haskell package.

Hi Johan,
Originally, that was my intention, to have the user install the library
himself,
and I have specified the extra-libraries field in the .cabal file.
However, the problem with hackage not being able to build the package, and
therefore generate documentation, remains. So conversely my question would
be
if there is any way to get around this?
Best regards,
Max.
On Sun, Nov 18, 2012 at 8:21 PM, Johan Tibell
Hi Maksymilian,
Generally I don't recommend that you bundle C libraries with your Cabal package. On Linux users should get C libraries through their distribution's package manager. The people who package Cabal packages for Debian (as Debian packages) can then have the Debian package they create depend on the C library's package, making sure it gets installed automatically.
You can list the library name in an extra-libraries field in your .cabal file to communicate to users that they need this library installed. There's a little bit of documentation on the extra-libraries field in the Cabal User Guide (http://www.haskell.org/cabal/users-guide/developing-packages.html#library ).
Cheers, Johan

Hi, On Sun, Nov 18, 2012 at 11:51 AM, Maksymilian Owsianny < maksymilian.owsianny@gmail.com> wrote:
However, the problem with hackage not being able to build the package, and therefore generate documentation, remains. So conversely my question would be if there is any way to get around this?
In the short term I'm afraid not. The plan is to eventually let users upload the documentation (after building it on their own machines). -- Johan

* Johan Tibell
Hi,
On Sun, Nov 18, 2012 at 11:51 AM, Maksymilian Owsianny < maksymilian.owsianny@gmail.com> wrote:
However, the problem with hackage not being able to build the package, and therefore generate documentation, remains. So conversely my question would be if there is any way to get around this?
In the short term I'm afraid not. The plan is to eventually let users upload the documentation (after building it on their own machines).
Another option would be to add a configuration flag in the cabal file that would disable compiling the library-dependent code (probably through CPP). The only problem with that is that it needs to be enabled by default (since we don't know whether we're building on hackage or not) and needs to be explicitly disabled by normal users. Unfortunately, cabal cannot automatically set the flag depending on whether the library is installed or not. I wrote about it in June (and got no response): http://www.haskell.org/pipermail/cabal-devel/2012-June/008908.html Roman
participants (3)
-
Johan Tibell
-
Maksymilian Owsianny
-
Roman Cheplyaka