On 2015-03-06 at 13:24, Michael Alan Dorman <[email protected]> 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.

Fortunately, this is easy to do.  Put the output of `cabal2nix .` in
`default.nix`.  `cabal2nix --shell .` inlines the output of the previous
command.  If you instead `callPackage` the `default.nix`, you're most of
the way there.

I have a slightly more elaborate example in [1].  It adds build tools,
and provides convenient places to add version pins or pick a GHC
version.  I imagine others have their own variations.

Daniel

Footnotes: 
[1]  https://github.com/bergey/nix-config/blob/master/bash_aliases#L49

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to