platform tarball does not work out of the box on NixOS
[I don't really expect this to be fixed, but want to provide the information here in order to preserve it.]
The problem is that on NixOS, none of the libraries that the Haskell Platform expects (zlib, OpenGL/mesa just to name a few) are in standard paths. One sensible option if a user wants to make a user install is that a user has them in a local profile, so includes would be in $HOME/.nix-profile/include and libs in $HOME/.nix-profile/lib.
The configure script can be made to work by setting CFLAGS and LDFLAGS to make use of these dirs. However, the actual build process invokes Cabal, and Cabal has to pass these flags to the individual packages via --extra-include-dirs and --extra-lib-dirs, and I can't see a way to make that happen.
What is the current state of this? How can I do user (non-root) install of HP on NixOS?
HP isn't recommended for use on nixos. Rather, users are directed to the support for haskell already provided by nix.
There is some information in the nixpkgs manual: http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure
We perhaps should make some not of this on the haskell platform page, or at least the downloads page.
There is also what I think is an up to date description of how people use haskell on nix here (there are other good and I think current resources as well elsewhere):
https://github.com/Gabriel439/haskell-nix
On Sat, Jun 10, 2017 at 9:48 AM, Stanisław Findeisen < [email protected]> wrote:
What is the current state of this? How can I do user (non-root) install of HP on NixOS?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/haskell/haskell-platform/issues/39#issuecomment-307566245, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEt2UDVZEFis7YGBiAdV016ZHpZUJBSks5sCp7EgaJpZM4Brb42 .