Doesn’t haskell.packages.ghc865.haskell-language-server
work? If not, try https://github.com/shajra/nix-hls.
As for your specific question: do it in the install phase, e.g
phases = [ "installPhase"];
installPhase = ''
mkdir -p $out/bin
gzip -d < $src > $out/bin/haskell-language-server-macOS-8.6.5
chmod +x $out/bin/haskell-language-server-macOS-8.6.5
'';