https://gitlab.gnome.org/GNOME/gnome-shell/issues/997
The README describes the steps in detail, but most of it is abstracted away by the update-osk-layouts.sh script.