ModuleNotFoundError: No module named 'gi'

  1. Yeah, buildPythonApplication expects the python packages in propagatedBuildInputs, not python environment that python.withPackages.
  2. buildPythonApplication enables strict deps which breaks the hook: setup hook of gobject-introspection in nativeBuildInputs does not run with strictDeps · Issue #56943 · NixOS/nixpkgs · GitHub