The nipples come premade in various lengths. Worse comes to worse, you might get one made, but it needs a special machine, not the standard pipe threading one. You will have a little leaway by using more or less wraps of teflon tape at both the in-wall elbow and at the spout. Unless this is a divertor tub spout, there isn't much pressure, so it doesn't take much to keep it from leaking. If it has a divertor on it, that is not as true. Some of the fittings in those things are plastic, if yours is, don't overtighten it or you could split it. The better ones are metal, but even then it can be split from over tightening.