I'm trying to build shared library containing exported ffi code into shared library. I wonder if it is possible to do it with common tools like stack or nix (so basically with cabal)? Is it? Then how?
https://github.com/bennoleslie/haskell-shared-example contains good example of such code, but with manual build instructions.