You get a nut blank (I use bone), then work it to the proper thickness - a tight fit is what you are aiming for. Then lay out the rough contour, slightly oversized, and cut the blank to that. I then would fit onto the bass (don't glue it yet) and lay out the outer two string locations to you preference from the fingerboard edge. Before cutting any slots I would use a graduated string-spacing rule to lay out the other slot locations. I use a knife to mark in the locations. I go back with a saw with a kerf of about 20 thou and start each of the slots with a few strokes. This gives a good registration point for the files that follow.
Next I would take a nut slotting file of the appropriate gauge, and start working the slots down to a bit above final level. The next step for me is to then start working the top of the nut down to a level where half of the B-string diameter is below the top of the nut, but most of the D-string is below the top. I would then remove the nut gradually cut is to length, by filing a bit at a time and checking frequently until it is a perfect fit. Next I do final shaping and polishing of the surfaces. Then glue the nut in place, using the strings as the clamping method, set it aside for the glue to dry. Once dry, it's back to the graduated slot files to bring them to the precise height, checking every two or three strokes. Finally, polish the nut slots, tune up, and rock on.