How to generate a spherical UV ?

I can’t do a rotation f the mesh because I have the sky behind, so it would rotate the sky as well and I do want to. Otherwise, reprojecting the texture is exactly what I would like to do, but do you have any suggestion of an approach?