Basically the mirror needs a ground and a power only. There are some other wires that can be connected to the door contacts and the reverse lights, but these are not a "must".
I have powered my rear view mirror by connecting it to the (dash) light so it works when the lights are turned on. There is one sensor in the front and one in the rear of the mirror. When the front sensor sees just a little or no light and the rear sensor sees a certain amount of light, the mirror just starts to dim the glass. The mirror gets darker when the difference in light intensity between the two sensors gets bigger.
The other wires (that can be connected) will prevent the rear view mirror from dimming when the door is opened or the car is shifted in reverse...
with a minor 600+k