I’m working on making a derivation for polydock. I’ve sucessfully got a working build using pnpm2nix - however I end up with an error when trying to run the produced binary.
(gjs:53948): Gjs-CRITICAL **: 18:47:54.412: JS ERROR: Error: Requiring GdkX11, version 3.0: Typelib file for namespace 'GdkX11', version '3.0' not found
I’m not sure I’ve packaged a GTK based app before, so I’m not too sure what to do. I have what I thought were the relevant libraries in buildInputs. I tried using wrapGAppsHook, but it doesn’t seem to work. I Imagine it’s something simple that I just don’t know at the moment.
(Also - if anyone happens to know why the CI has failed then I’d appreciate knowing. Building on my own system is fine. I’ll post separately if I get a fully working package first though!)
You need to add gobject-introspection to nativeBuildInputs. The
package contains a setup hook that will collect paths to typelibs and
pass them inside GI_TYPELIB_PATH to the wrapper. See also the introspection typelibs
of the Nixpkgs manual.
Also gtk3-x11 already contains gtk3 so you only want to provide one
of them (and on Linux, they are the same derivation).