[Nix-dev] How to add tools to a nix-shell environment for haskell development?

Richard Wallace rwallace at thewallacepack.net
Fri Mar 6 16:55:53 CET 2015


Everyone seems to have their own way of doing it. Recently I've been using
a script to create the environment I like [1].  The only prereq is that a
default.nix exists. Then it checks for a shell.nix, and if present, uses
that. This gives me the ability to override existing packages.  Otherwise
it just uses the default.nix.

Most of those tools could probably be made part of my environment, as Peter
suggests. ghc-mod is the only one that I think requires this special setup.

HTH,
Rich

[1] https://gist.github.com/purefn/9926ded12254ca763693

On Fri, Mar 6, 2015 at 6:24 AM, Michael Alan Dorman <mdorman at jaunder.io>
wrote:

> In developing a haskell library, I would like to be able to maintain
> both a default.nix (that represents the library dependencies, etc.), and
> then have a shell.nix that adds things to it in order to build a
> development environment---specifically some build tools, hasktags,
> hlint, etc.
>
> http://www.cse.chalmers.se/~bernardy/nix.html describes more or less
> exactly what I would like in the "Per-Project Configuration" section (I
> believe it's actually pulled from
> https://gist.github.com/JLimperg/82019d5603df5021603a)...but predates
> the haskell-ng work, and does not seem entirely compatible with it.
>
> I wondered if anyone had any suggestions for how it could be made to
> work?  This is the only example I've found of what seems to me a fairly
> obvious development setup.
>
> Mike.
> _______________________________________________
> 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/20150306/c4a787ae/attachment.html 


More information about the nix-dev mailing list