Refactor nix-shell-ghci support.