Problem: running the CLI would error on NixOS as it does not have /usr/share:
$ yarn build; and yarn ts-for-gir generate
ERROR: No module found in /usr/share/gir-1.0!
Please make sure that you have installed the necessary gir files.
For example with "sudo apt install libgtk-3-dev" for Gtk3 on Ubuntu or "sudo dnf install gtk3-devel" on Fedora. []
Solution: use XDG_DATA_DIRS as commented in code. I think this is harmless on other distros.
Problem: running the CLI would error on NixOS as it does not have
/usr/share
:Solution: use
XDG_DATA_DIRS
as commented in code. I think this is harmless on other distros.