[Nix-dev] package dependency problem: ghc-mod: cannot satisfy -package-id mtl-2.1.3.1

Paul Koerbitz paul.koerbitz at gmail.com
Mon Dec 15 12:14:34 CET 2014


Hi Carlo, Peter,

So Carlo is right, by 'hsEnv approach' I meant ghcWithPackages. Sorry for
causing confusion by using the wong name.

> Paul, I think you could benefit from this mail from Peter outlining
> how to setup a working haskell installation:
> http://article.gmane.org/gmane.linux.distributions.nixos/15045

Yes! In fact the only things I needed were (from that email)

> You can do all those things easily with ghcWithPackages. Just add
> 'ghcMod' to the package set, and add these definitions to your
> ~/.bashrc:

>   NIX_GHC_VERSION=$(ghc --numeric-version)
>   export NIX_GHC="$HOME/.nix-profile/bin/ghc"
>   export NIX_GHCPKG="$HOME/.nix-profile/bin/ghc-pkg"
>   export NIX_GHC_DOCDIR="$HOME/.nix-profile/share/doc/ghc/html"
>   export NIX_GHC_LIBDIR="$HOME/.nix-profile/lib/ghc-${NIX_GHC_VERSION}"


I'm not sure why ghc-mod needs these environment variables (shouldn't it be
finding these things on the path?), but anyway, it all works now!

Thank you!
Paul

On Sun, Dec 14, 2014 at 8:33 PM, Carlo Nucera <meditans at gmail.com> wrote:

> Hi Peter,
>
> I think that 'hsEnv approach' means essentially ghcWithPackages, as
> detailed in this wiki page: https://nixos.org/wiki/Haskell (search for
> 'hsEnv', it's in 'Local use via Nixpkgs config' section. I don't know
> if that information is outdated, but it created problems also for me
> (half a year ago, or so).
>
> Paul, I think you could benefit from this mail from Peter outlining
> how to setup a working haskell installation:
> http://article.gmane.org/gmane.linux.distributions.nixos/15045
>
> Or, if you prefer another approach, I remember this blog post to work
> (caution, it's not using ghcWithPackages, which is the suggested
> installation):
> http://www.cse.chalmers.se/~bernardy/nix.html
>
> Best regards
> Carlo
>
> 2014-12-14 19:34 GMT+01:00 Peter Simons <simons at cryp.to>:
> > Hi Paul,
> >
> >  > I have a problem keeping ghc-mod happy. After trying a number of other
> >  > approaches I have opted to install all haskell packages to my profile
> >  > via the 'hsEnv' approach.
> >
> > what exactly is an hsEnv approach?
> >
> > Best regards,
> > Peter
> >
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141215/3718892e/attachment.html 


More information about the nix-dev mailing list