[Nix-dev] haskell / ghc installation questions

Miguel Negrão miguel.negrao-lists at friendlyvirus.org
Tue May 12 19:51:34 CEST 2015


Hi Charles,

Charles <cooper.charles.m <at> gmail.com> writes:
> There is clearly a huge gap in my understanding. How do I get ghc in my
config, and how do I install standard haskell packages? Thanks in advance
for any and all help.

Currently the haskell infrastructure is being transitioned to a new setup.
The best information is at:

http://thread.gmane.org/gmane.linux.distributions.nixos/15513
http://thread.gmane.org/gmane.linux.distributions.nixos/15530
http://thread.gmane.org/gmane.linux.distributions.nixos/16834

Depending on which commit of nixpkgs you are using you might want to use
haskellngPackages or haskellPackages (haskell-ng has become the default in
master).

Something like this should work (untested):

{
  packageOverrides = pkgs : rec {
      haskellEnv = pkgs.haskellngPackages.ghcWithPackages (pkgs: with pkgs;
[lens]);
  };
}

nix-shell -iA nixpkgs.haskellEnv

I currently search for packages by searching with a text editor inside the
file nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix (you
would need to clone nixpkgs). 

best,
Miguel



More information about the nix-dev mailing list