Once the transmission is installed, find a slip yoke that will slide into the back of the transmission, bottom it out, then pull it out an inch or so from that point. With the weight of the vehicle on the wheels (or supported by jack stands under the axle housing) measure the distance from the center of the rear axle yoke U-joint eye to the center of the slip yoke eye. Go to a salvage yard with that measurement and find a shaft that will accept the proper diameter U-joint crosses. If you're working with a short-shaft trans, it might be necessary to go to a 2-piece driveshaft.
Jerry