gjsify / ts-for-gir

TypeScript type definition generator for GObject introspection interfaces
https://gjsify.org/pages/projects
Apache License 2.0
237 stars 18 forks source link

fix: use correct gir paths for NixOS #107

Closed samdroid-apps closed 1 year ago

samdroid-apps commented 1 year ago

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.

JumpLink commented 1 year ago

@samdroid-apps thanks you! When the CI has finished without errors, I will merge your changes

JumpLink commented 1 year ago

Okay the errors in the CI do not seem to be related to your changes, so I will merge it despite errors 👍