@sugarfree yeah, it's kinda what I had in mind.
I'm not very practical about shell scripting, however from what I could grasp it seems that they're creating a whole new mapping script to create evdev mappings.
Since I was trying to create a Python script that was going to be launched when a ROM had been selected and didn't want to add more dependencies, I tried to use SDL2 as library in my script: however the naming a of the buttons are extremely different from what you could get from evdev and had to make an intermediary translator between evdev and Dolphin passing through the SDL mapping of that gamepad.
Their solution is far more practical. However I think one of their bigger limits is that the script essentially creates a Dolphin profile for each gamepad, basically a 1:1 mapping between the gamepad and the GameCube controls. For the GameCube I think it's a pretty neat solution. Different matter is when you try to apply the same strategy when mapping a Wiimote: one profile isn't enough since you can have more peripherals setups on a Wii.
Two things I could think of are: making a profile for each possible setup (Wiimote, Wiimote+Nun chuck, Wiimote+Classic Gamepad etc...) and asking at each ROM load which profile should be loaded to each player, probably with a nice whiptail+joy2key TUI; or creating on the fly a configuration after asking which peripheral setup the player wants.