Hmm, I didn’t find an answer directly in that thread, but it does link to the FAQ which has two ways to do it:
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-17.09.tar.gz nix-shell -p $software
or
nix-shell -I nixpkgs=channel:nixpkgs-unstable -p somepackage
I think the latter is much nicer. So in my case, I can use:
nix-shell -I nixpkgs=channel:nixos-unstable -p haskell.compiler.ghc942