Loading
blueprint-compiler: wrap with required dependencies
without this, `blueprint-compiler` fails when trying to import GIR files
required by the compiler itself -- even for basic commands like
`blueprint-compiler --help` or `blueprint-compiler --version`.
`passthru.tests.version` passes because blueprint-compiler propagates
`gobject-introspection`, which has a setup hook that configures
`GI_TYPELIB_PATH` to have the required GIR files. but setup hooks are
only run within nix builds, and conditional on the hook being in
`nativeBuildInputs`. the result is that the following previously
_didn't_ work:
```
$ nix-build -A blueprint-compiler
$ ./result/bin/blueprint-compiler --help
```
an additional consequence of this patch is that several consumers of
blueprint-compiler now cross compile correctly:
- blanket
- komikku
- ...
previously, blueprint-compiler did not work in a cross compiling
environment, because the gobject-introspection setup-hook configures
GI_TYPELIB_PATH for the _host_, which is generally not the same host on
which blueprint-compiler is being run (i.e. the build machine).
a consumer of blueprint-compiler has (in effect) build inputs like:
```
nativeBuildInputs | buildInputs
-----------------------------------
blueprint-compiler |
gobject-introspection |
| glib
| gtk
| adwaita
... | ...
```
gobject-introspection's setup-hook populates GI_TYPELIB_PATH from the
buildInputs; this is correct when blueprint-compiler is querying
typelibs to generate code against, however before it gets to that
point it needs to import its _own_ typelib dependencies (glib and
gobject-introspection). this is made possible by wrapGAppsNoGuiHook,
which wraps blueprint-compiler with a copy of those typelibs built
for the same platform as it.