In this simple case, you need gobject-introspection
for its setup hook to set GI_TYPELIB_PATH
variable. But for more complex examples, you will need other variables as well, and that is not possible to express in shebang easily – a variable extraction similar to Python + Qt woes - #2 by jtojnar will be required.