Work on Haskell GHC wrapping.

PR https://github.com/NixOS/nixpkgs/pull/4065, re-based on master.