NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

In package `libfprint-2-tod1-broadcom`, `update-fw.py` is broken due to `glib` > `gobject-introspection` breaking change #343134

Open ahydronous opened 2 weeks ago

ahydronous commented 2 weeks ago

Describe the bug

The script update-fw.py errors out with

Traceback (most recent call last):
  File "/home/Username/Downloads/libfprint-2-tod1-broadcom/./debian/update-fw.py", line 3, in <module>
    from gi.repository import GLib, Gio
ModuleNotFoundError: No module named 'gi'

This is also visible in journalctl -u fprintd

sep 19 11:55:11 mylaptop fprintd[11789]: FwUpgradeError. Check Firmware Files or CID used or Hardware etc.

Installing glib , the error becomes

Traceback (most recent call last):
  File "/home/Username/Downloads/libfprint-2-tod1-broadcom/./debian/update-fw.py", line 3, in <module>
    from gi.repository import GLib, Gio
  File "/nix/store/4gw93n1msss5jgfpjlhv2nrcpwqj51nr-python3-3.12.5-env/lib/python3.12/site-packages/gi/importer.py", line 133, in create_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name GLib, introspection typelib not found

Found this issue, followed its example: https://github.com/NixOS/nixpkgs/issues/310205 (the problem is also refered to here , its apparently been since 24.05) Installed gobject-introspection, wrapGAppsHook3 and python3Packages.wrapPython to my systemPackages, still the same error.

Notify maintainers

@pitkling


Add a :+1: reaction to issues you find important.

pitkling commented 1 week ago

I'll have a look at this later this week, @ahydronous. I'm not quite sure what exactly the update-fw.py script does (which firmware versions are updated to which, etc.) and for which systems it is needed (or whether it figures this out automatically?).

The update update-fw.py script is actually currently not part of nixpkgs' libfprint-2-tod1-broadcom driver package (also not of the Arch Linux package, which I used in parts for reference). But if some systems require a firmware update for the driver to work properly, it should probably be provided (maybe as an extra package?).

I'll update this thread when I had time to take a closer look.