[Nix-dev] haskell-ng: shell.nix magic to infer .env?

Benno Fünfstück benno.fuenfstueck at gmail.com
Wed Feb 25 18:35:25 CET 2015


I now understand why we don't neccesarily want to use the with-packages
wrapper for building (Peter wrote a nice detailed response to the PR, if
anyone is interested in the reasons).

I am now wondering, why don't we make the `.env` shellHook the default
shellHook for the derivation too? I guess this can make debugging for
people working on the generic-builder more difficult, since they can no
longer use nix-shell for that. However, I think this is not the common
usecase, which is in my opinion that you just want a shell to develop in.

There is another neat trick I learned from Oliver Charles is to use
nix-shell (with .env) only for `cabal configure`. The `cabal build` command
then works fine outside the shell too, since cabal caches the path to GHC
in dist/setup-config. If you use this, you don't need to use nix-shell very
often at all.

Regards,
Benno

(previously, I forgot to send this to nix-dev too)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150225/8251fa18/attachment-0001.html 


More information about the nix-dev mailing list