With static-haskell-nix you can easily build most Haskell programs into fully static Linux executables.
- results are fully static executables (
not a dynamic executable)
- these executables are close to infinitely backwards/forwards compatible and work on any Linux distribution
- to make that possible, each exe and all dependencies (including ghc) are built against musl instead of glibc
stack projects are easily supported, as well as almost any Haskell package in nixpkgs.
We manage to build ~95% of Stackage executables this way!
More details at: https://github.com/nh2/static-haskell-nix