The GIRepository error probably needs to be fixed in the official package ("networkmanager" in the "extra" repository), but I was able to work around it with the following patch:
--- NetworkManager/tools/generate-docs-nm-settings-docs-gir.py.orig 2025-05-02 16:49:05.857660587 +0200
+++ NetworkManager/tools/generate-docs-nm-settings-docs-gir.py 2025-05-02 16:52:41.766620480 +0200
@@ -10,22 +10,9 @@
import gi
import re
-gi.require_version("GIRepository", "2.0")
+gi.require_version("GIRepository", "3.0")
from gi.repository import GIRepository
-try:
- libs = os.environ["LD_LIBRARY_PATH"].split(":")
- libs.reverse()
- for lib in libs:
- GIRepository.Repository.prepend_library_path(lib)
-except AttributeError:
- # An old GI version, that has no prepend_library_path
- # It's alright, it probably interprets LD_LIBRARY_PATH
- # correctly.
- pass
-except KeyError:
- pass
-
gi.require_version("NM", "1.0")
from gi.repository import NM, GObject
@@ -384,8 +371,4 @@
args = parser.parse_args()
- if args.lib_path:
- for lib in args.lib_path:
- GIRepository.Repository.prepend_library_path(lib)
-
main(args.gir, args.output, args.target)
This flat out ignores any custom library paths, which doesn't seem to break anything in an obvious way on my system. There are some invocations with a --lib-path argument. I would guess those are important but I don't really understand this code well enough to say for sure. In any case this patch should only affect generated documentation.
Pinned Comments
digitalone commented on 2019-08-10 10:37 (UTC) (edited on 2019-08-15 09:14 (UTC) by digitalone)
This is a modified package configured to get NetworkManager working exclusively with iwd. Main difference with upstream version is that iwd is required and wpa_supplicant is not needed (so you can uninstall it); iwd seems more reliable on certain wireless cards, so someone could prefer it in place of wpa_supplicant.
It's recommended to enable systemd iwd.service at boot:
systemctl enable iwd.service
Tested with Plasma NM system tray applet (plasma-nm), it's working.
Note that wpa_supplicant is still needed to build the package, but you can uninstall it after the building stage.