biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / maintainers / scripts / kde / collect-missing-deps.py
blobbb2070ffe87ba4af48f9c12f05d989db494d1d46
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i python3 -p python3
3 import pathlib
5 OK_MISSING = {
6 # we don't use precompiled QML
7 'Qt6QuickCompiler',
8 'Qt6QmlCompilerPlusPrivate',
9 # usually used for version numbers
10 'Git',
11 # useless by itself, will warn if something else is not found
12 'PkgConfig',
13 # license verification
14 'ReuseTool',
15 # dev only
16 'ClangFormat',
17 # doesn't exist
18 'Qt6X11Extras',
21 OK_MISSING_BY_PACKAGE = {
22 "angelfish": {
23 "Qt6Feedback", # we don't have it
25 "attica": {
26 "Python3", # only used for license checks
28 "discover": {
29 "rpm-ostree-1", # we don't have rpm-ostree (duh)
30 "Snapd", # we don't have snaps and probably never will
31 "packagekitqt6", # intentionally disabled
33 "elisa": {
34 "UPNPQT", # upstream says it's broken
36 "extra-cmake-modules": {
37 "Sphinx", # only used for docs, bloats closure size
38 "QCollectionGenerator"
40 "gwenview": {
41 "Tiff", # duplicate?
43 "kio-extras-kf5": {
44 "KDSoapWSDiscoveryClient", # actually vendored on KF5 version
46 "kitinerary": {
47 "OsmTools", # used for map data updates, we use prebuilt
49 "kosmindoormap": {
50 "OsmTools", # same
51 "Protobuf",
53 "kpty": {
54 "UTEMPTER", # we don't have it and it probably wouldn't work anyway
56 "kpublictransport": {
57 "OsmTools", # same
58 "PolyClipping",
59 "Protobuf",
61 "krfb": {
62 "Qt6XkbCommonSupport", # not real
64 "kuserfeedback": {
65 "Qt6Svg", # all used for backend console stuff we don't ship
66 "QmlLint",
67 "Qt6Charts",
68 "FLEX",
69 "BISON",
70 "Php",
71 "PhpUnit",
73 "kwin": {
74 "display-info", # newer versions identify as libdisplay-info
75 "Libcap", # used to call setcap at build time and nothing else
77 "libksysguard": {
78 "Libcap", # used to call setcap at build time and nothing else
80 "mlt": {
81 "Qt5", # intentionally disabled
82 "SWIG",
84 "plasma-desktop": {
85 "scim", # upstream is dead, not packaged in Nixpkgs
87 "poppler-qt6": {
88 "gobject-introspection-1.0", # we don't actually want to build the GTK variant
89 "gdk-pixbuf-2.0",
90 "gtk+-3.0",
92 "powerdevil": {
93 "DDCUtil", # cursed, intentionally disabled
94 "Libcap", # used to call setcap at build time and nothing else
96 "print-manager": {
97 "PackageKitQt6", # used for auto-installing drivers which does not work for obvious reasons
99 "pulseaudio-qt": {
100 "Qt6Qml", # tests only
101 "Qt6Quick",
103 "skladnik": {
104 "POVRay", # too expensive to rerender all the assets
106 "syntax-highlighting": {
107 "XercesC", # only used for extra validation at build time
111 def main():
112 here = pathlib.Path(__file__).parent.parent.parent.parent
113 logs = (here / "logs").glob("*.log")
115 for log in sorted(logs):
116 pname = log.stem
118 missing = []
119 is_in_block = False
120 with log.open(errors="replace") as fd:
121 for line in fd:
122 line = line.strip()
123 if line.startswith("-- No package '"):
124 package = line.removeprefix("-- No package '").removesuffix("' found")
125 missing.append(package)
126 if line == "-- The following OPTIONAL packages have not been found:" or line == "-- The following RECOMMENDED packages have not been found:":
127 is_in_block = True
128 elif line.startswith("--") and is_in_block:
129 is_in_block = False
130 elif line.startswith("*") and is_in_block:
131 package = line.removeprefix("* ")
132 missing.append(package)
134 missing = {
135 package
136 for package in missing
137 if not any(package.startswith(i) for i in OK_MISSING | OK_MISSING_BY_PACKAGE.get(pname, set()))
140 if missing:
141 print(pname + ":")
142 for line in missing:
143 print(" -", line)
144 print()
146 if __name__ == '__main__':
147 main()