This is a tiny project where @aszlig did all the hard work. I am just doing the docs and marketing
Haskell programs are difficult to run in the Nix sandbox if they do any type of network access because they depend on
/etc/protocols to exist. This applies to other languages as well but Haskell likes to call
getprotobyname() a lot. You would see a failure like that:
ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)
This project implements a
LD_PRELOAD hack to load that file from another location. Add this project to your Nix fetcher and you are good to go.
In theory it’s possible to make this work on macOS. If you have any knowledge of how
DYLD_INSERT_LIBRARIES works, please ping me!