Driving 12V signal from 5V pin

Well, what you need can probably be done with as little as maybe a diodes, transistor, and resistor. Too much space?