This is a tricky one!
Being a B10 it will be an old E28 or 6 Series. The
sport gearbox is actually a Getrag 265, but the
casing is from the old 4 speed 262 which your CSL
has along with every other E9, E3 or E12. What you
need are the punched in serial numbers on the edge
of the bellhousing, or more specifically the letters
following the numbers.
Most B10's were 5 speed overdrive using the 260
gearbox (standard post 9/82 M30 gearbox) which is
useless in an E9 because there is no speedo drive.
The first problem with the later E28 type 265 'box
(same as the E30 M3 incidentally) is that the
gearlever is mounted on a long alloy extension that
swivels on a pin on the end of the 'box. If this is too
long or too short (very likely) then it will need to be cut
and welded. Another problem(!) is that although a
late E28 type 265 has a hole for a speedo drove,
there will probably be no gear in there meaning the
'box has to be partially stripped and the speedo
gears from your CSL box fitted.
A better unit would be an early (78-82) 635CSi sport
gearbox which had the bolt on steel extension which
I'm sure is spot on length wise and if not, is easier to
cut and weld. The also have a proper speedo cable
drive. A mate of mine in West London has one but
you'll be paying 250 quid for one these days as
they're rare. If you are running Motronic with the B10
engine then you hit another snag because these
boxes don't always have the two essential mounting
lugs for the two TDC sensors on the bellhousing.
PM me and I'll give you his number.