text: Thanks for all the work on this, it looks really close to being ready to merge! Don't forget to add a changelog entry. It should go in the major changes section; this deserves lots of attention!
  Although, regarding this Nix error about the missing attribute, to provide a more informative error message I would need to ask nix about which attributes are available, which is not easy to automate as I pointed out in the manual.
  The real fix would be to stop to depend on a GHC provided by Nix and use a GHC downloaded by Stack, but for now on Linux this results in failure to find libs in the nix store.
  Fair enough, I don't think the error message should hold up merging this, although it would be nice to improve at some point. I'm not surprised that trying to use a non-Nix GHC causes problems, so leaving that as-is is reasonable.
  Do you think this may end up with similar problems as Docker in #911 and #1367? I'm beginning work on a fix for those two now, and most likely the same approach can be used for Nix as well.
  Surrounding by ' isn't quite enough either; what if the value contain a ' itself? A reliable way to quote all characters, at least for bourne shell derivatives, is to surround the values in 's (like you did) and also replace all occurrences of ' within each value with '"'"'. Example code in Propellor's shellEscape.
  Of course it would be much nicer if nix-shell gave you a way to do this without having to escape it at all, but I guess that's not possible.
  Also, for coherence's sake, I made a slight adjustment: the section in the yaml is just called nix: now (no longer nix-shell:).
  That's because the CL option was already --nix and because soon nix will adopt a git-like CL interface. I.e. the nix-shell tool will become just another subcommand of a big nix command.