Trying to diagnose a couple bits of weirdness in my derivation of my Python module

The standard way is to add gobject-introspection to nativeBuildInputs. As python apps/modules built with buildPythonApplication/buildPythonPackage already get wrapped, we have to do a dance to avoid double-wrapping:

(wrapGAppsHook* may not be necessary in your case, but use the rest of the snippet. If it’s not a graphical module you may want wrapGAppsNoGuiHook instead.)

See https://nixos.org/manual/nixpkgs/unstable/#ssec-gnome-hooks.

FYI this is deprecated in favor of wrapGAppsHook3/wrapGAppsHook4/wrapGAppsNoGuiHook i.e. explicitly specifying the gtk version.

1 Like