about summary refs log tree commit diff
path: root/pkgs/kde/plasma/kinfocenter
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-02-05 18:43:41 +0300
committerK900 <me@0upti.me>2024-02-28 18:49:23 +0300
commitce77225e21f9cf8726d197897ad9a6882a3daecc (patch)
tree64d68e597c2a1875962305608ec42e3b02016b8a /pkgs/kde/plasma/kinfocenter
parentfc40d637fe78d717b7909e710ccb310458c2410f (diff)
pkgs/kde: init at 6.0.0 / 24.02.0, the Nix bits
This is the thing you want to look at.
Diffstat (limited to 'pkgs/kde/plasma/kinfocenter')
-rw-r--r--pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch51
-rw-r--r--pkgs/kde/plasma/kinfocenter/default.nix29
2 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch b/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch
new file mode 100644
index 0000000000000..543aecdec43fc
--- /dev/null
+++ b/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch
@@ -0,0 +1,51 @@
+diff --git a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
+index 0de6973e..30035768 100644
+--- a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
++++ b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in
+@@ -85,6 +85,6 @@
+         "Name[zh_CN]": "窗口管理器",
+         "Name[zh_TW]": "視窗管理員"
+     },
+-    "TryExec": "@QtBinariesDir@/qdbus",
++    "TryExec": "@qdbus@",
+     "X-KDE-KInfoCenter-Category": "graphical_information"
+ }
+diff --git a/Modules/kwinsupportinfo/main.cpp b/Modules/kwinsupportinfo/main.cpp
+index 6ae168b5..89d0a2ff 100644
+--- a/Modules/kwinsupportinfo/main.cpp
++++ b/Modules/kwinsupportinfo/main.cpp
+@@ -18,7 +18,7 @@ public:
+     explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data)
+         : KQuickConfigModule(parent, data)
+     {
+-        m_outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"),
++        m_outputContext = new CommandOutputContext(QStringLiteral("@qdbus@"),
+                                                    {QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")},
+                                                    parent);
+     }
+diff --git a/Modules/xserver/kcm_xserver.json b/Modules/xserver/kcm_xserver.json
+index b3f1ce24..dc610932 100644
+--- a/Modules/xserver/kcm_xserver.json
++++ b/Modules/xserver/kcm_xserver.json
+@@ -141,7 +141,7 @@
+         "Name[zh_CN]": "X 服务器",
+         "Name[zh_TW]": "X 伺服器"
+     },
+-    "TryExec": "xdpyinfo",
++    "TryExec": "@xdpyinfo@",
+     "X-DocPath": "kinfocenter/graphical.html#xserver",
+     "X-KDE-KInfoCenter-Category": "graphical_information",
+     "X-KDE-Keywords": "X,X-Server,XServer,XFree86,Display,VideoCard,System Information",
+diff --git a/Modules/xserver/main.cpp b/Modules/xserver/main.cpp
+index 6d4d1e25..d39fe19e 100644
+--- a/Modules/xserver/main.cpp
++++ b/Modules/xserver/main.cpp
+@@ -16,7 +16,7 @@ public:
+     explicit KCMXServer(QObject *parent, const KPluginMetaData &data)
+         : KQuickConfigModule(parent, data)
+     {
+-        m_outputContext = new CommandOutputContext(QStringLiteral("xdpyinfo"), {}, parent);
++        m_outputContext = new CommandOutputContext(QStringLiteral("@xdpyinfo@"), {}, parent);
+     }
+     CommandOutputContext *outputContext() const
+     {
diff --git a/pkgs/kde/plasma/kinfocenter/default.nix b/pkgs/kde/plasma/kinfocenter/default.nix
new file mode 100644
index 0000000000000..cc216dd22a7b5
--- /dev/null
+++ b/pkgs/kde/plasma/kinfocenter/default.nix
@@ -0,0 +1,29 @@
+{
+  lib,
+  mkKdeDerivation,
+  substituteAll,
+  qttools,
+  xdpyinfo,
+  systemsettings,
+  libusb1,
+}:
+mkKdeDerivation {
+  pname = "kinfocenter";
+
+  patches = [
+    (substituteAll {
+      src = ./0001-tool-paths.patch;
+      qdbus = "${lib.getBin qttools}/bin/qdbus";
+      xdpyinfo = lib.getExe xdpyinfo;
+    })
+  ];
+
+  # fix wrong symlink of infocenter pointing to a 'systemsettings5' binary in
+  # the same directory, while it is actually located in a completely different
+  # store path
+  preFixup = ''
+    ln -sf ${systemsettings}/bin/systemsettings $out/bin/kinfocenter
+  '';
+
+  extraBuildInputs = [libusb1];
+}