[Nix-dev] How to handle shared library dependencies of template haskell code?

Corey O'Connor coreyoconnor at gmail.com
Tue Dec 27 19:58:02 CET 2011


Hi all!
I'm slowly getting up to speed with using Nix to deploy a Haskell
based web server.

I ran into an issue with the template haskell code of Yesod: The ghc
template haskell system requires the shared libraries of dependencies
to be available at *build* time. Not just run time. For yesod I hacked
around the issue with the following patch:

https://github.com/coreyoconnor/nixpkgs/commit/a68bf0ce0f18b9b455c2cdf0778cc0fe32c69649

This is not ideal because the same change is required for all packages
transitively dependent on the haskell zlib bindings. Clearly this is
not ideal. If a haskell package is transitively dependent on the zlib
bindings the zlib shared library should automatically added to the
LD_LIBRARY_PATH on build. Is there such functionality already
available?

NOTE: I'm going to rebuild my github clones of the svn nixpkgs and
nixos repos soon. So if you clone them be careful!

-Corey O'Connor
coreyoconnor at gmail.com
http://corebotllc.com/


More information about the nix-dev mailing list